]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Test for wpa_supplicant.conf in /etc/wpa_supplicant as well
authorRoy Marples <roy@marples.name>
Sat, 21 Sep 2013 14:47:17 +0000 (14:47 +0000)
committerRoy Marples <roy@marples.name>
Sat, 21 Sep 2013 14:47:17 +0000 (14:47 +0000)
dhcpcd-hooks/10-wpa_supplicant

index af429d00601fb60cfe5eac2f68600f85b8592222..8e065789b5840fddfc272222d678bd9b1fe3868b 100644 (file)
@@ -3,6 +3,17 @@
 # and the user should not be expected to have to wire it into their system
 # if the base system doesn't do this itself.
 
+if [ -z "$wpa_supplicant_conf" ]; then
+       for x in \
+               /etc/wpa_supplicant.conf \
+               /etc/wpa_supplicant/wpa_supplicant.conf \
+       ; do
+               if [ -s "$x" ]; then
+                       wpa_supplicant_conf="$x"
+                       break
+               fi
+       done
+fi
 : ${wpa_supplicant_conf:=/etc/wpa_supplicant.conf}
 
 wpa_supplicant_start()