suffix some README files to .md
[dragora.git] / archive / wpa_supplicant / rc.main
blobc7a43cce645d47eaf0ee36b19ac682ec5d5402e3
1 #! /bin/sh -
3 # wpa_supplicant/rc.main
5 # Wi-Fi Protected Access client and IEEE 802.1X supplicant.
8 # Redirects the standard error to the standard output
9 exec 2>&1
11 TARGET="$1"
12 SVNAME="${2:-wpa_supplicant}"
14 start()
16 echo "*** ${SVNAME}: Starting wpa_supplicant ..."
18 # Check if the dbus daemon is running
19 if ! perpok -u3 dbus
20 then
21 echo "${SVNAME}: Dependency 'dbus' not running." 1>&2
22 exit 1
25 exec /usr/sbin/wpa_supplicant -u -c /etc/wpa_supplicant.conf
28 reset()
30 case $3 in
31 exit)
32 echo "*** ${SVNAME}: Exited status $4"
34 signal)
35 echo "*** ${SVNAME}: Killed on signal $5"
38 echo "*** ${SVNAME}: Stopped (${3})"
40 esac
43 # Branch to target
44 eval ${TARGET} "$@"