#!/sbin/itype # This is a i file, used by initng parsed by install_service # NAME: wpa_supplicant # DESCRIPTION: IEEE802.1x (WPA) encryption for wireless LAN connections # WWW: http://hostap.epitest.fi/wpa_supplicant daemon daemon/wpa_supplicant/* { need = system/bootmisc; use = system/ifrename system/modules; pid_file = /var/run/wpa_supplicant-${NAME}.pid; env CONFFILE = /etc/wpa_supplicant.conf; forks; script daemon = { . ${INITNG_PLUGIN_DIR}/scripts/net/functions eval opts=\"\$\{wpa_supplicant_${ifvar}\} -i${iface} -c${CONFFILE} -B\" [ -f /sbin/wpa_cli.action ] && \ opts="${opts} -w -P/var/run/wpa_supplicant-${iface}.pid" /sbin/wpa_supplicant ${opts} if [ -f /sbin/wpa_cli.action ] then /sbin/ngc --quiet --instant -u daemon/wpa_cli/${iface} exit 0 fi source "${libdir}/wpa_supplicant" if ! wpa_supplicant_associate then /usr/sbin/wpa_cli -i${iface} terminate exit 1 fi /sbin/ngc --quiet --instant -u net/${iface} }; script kill = { /usr/sbin/pkill -f "/sbin/wpa_supplicant .* -i${NAME} " }; }