updated on Mon Jan 9 08:00:21 UTC 2012
[aur-mirror.git] / autowifi / dhcpcd.patch
blob7b101efa9c575579420e91ebcccdb6d0862f7035
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
3 @@ -10,7 +10,7 @@
5 IFCONFIG="/sbin/ifconfig"
6 ROUTE="/sbin/route"
7 -DHCLIENT="/sbin/dhclient"
8 +DHCLIENT="/sbin/dhcpcd"
10 # obtain the ssid
11 INTERFACE="${1}"
12 @@ -56,7 +56,7 @@
13 lecho "Using profile '${PROFILE}'"
14 case "${NETWORK}" in
15 "dhcp")
16 - ${DHCLIENT} -q -pf /var/run/dhclient-${INTERFACE}.pid ${INTERFACE}
17 + ${DHCLIENT} ${INTERFACE}
19 "static")
20 ${IFCONFIG} ${INTERFACE} ${ADDRESS} $([ -n "${NETMASK}" ] && echo -n "netmask ${NETMASK}") up
21 @@ -74,16 +74,17 @@
22 lecho "Unknown profile type \"${NETWORK}\", assuming \"custom\""
24 esac
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
35 case "${NETWORK}" in
36 "dhcp")
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}
41 "static")
42 [ -n "${DNS}" -a -f /etc/resolv.conf.wpabak ] && mv /etc/resolv.conf.wpabak /etc/resolv.conf