1 --- usr/share/autowifi/action 2009-09-27 15:45:10.000000000 +0200
2 +++ usr/share/autowifi/action.new 2010-04-09 14:44:37.137491193 +0200
5 IFCONFIG="/sbin/ifconfig"
7 -DHCLIENT="/sbin/dhclient"
8 +DHCLIENT="/sbin/dhcpcd"
13 lecho "Using profile '${PROFILE}'"
16 - ${DHCLIENT} -q -pf /var/run/dhclient-${INTERFACE}.pid ${INTERFACE}
17 + ${DHCLIENT} ${INTERFACE}
20 ${IFCONFIG} ${INTERFACE} ${ADDRESS} $([ -n "${NETMASK}" ] && echo -n "netmask ${NETMASK}") up
22 lecho "Unknown profile type \"${NETWORK}\", assuming \"custom\""
25 - # execute "connect" script
26 - autowifi_connect "${INTERFACE}" "${SSID}" "${PROFILE}"
28 # execute network-independant "connect" script
29 autowifi_generic_event_connected "${INTERFACE}" "${SSID}" "${PROFILE}"
30 + # execute "connect" script
31 + autowifi_connect "${INTERFACE}" "${SSID}" "${PROFILE}"
33 elif [ "${ACTION}" = "DISCONNECT" ]; then
34 # NOTE: Never bring the interface down
37 - [ -f /var/run/dhclient-${INTERFACE}.pid ] && kill $(cat /var/run/dhclient-${INTERFACE}.pid)
38 - rm -f /var/run/dhclient-${INTERFACE}.pid
39 + ${DHCLIENT} -k ${INTERFACE}
42 [ -n "${DNS}" -a -f /etc/resolv.conf.wpabak ] && mv /etc/resolv.conf.wpabak /etc/resolv.conf