Home | History | Annotate | Line # | Download | only in rc.d
wpa_supplicant revision 1.5.4.1
      1      1.1  rpaulo #!/bin/sh
      2      1.1  rpaulo #
      3  1.5.4.1  martin # $NetBSD: wpa_supplicant,v 1.5.4.1 2015/01/23 09:47:25 martin Exp $
      4      1.1  rpaulo #
      5      1.1  rpaulo 
      6      1.1  rpaulo # PROVIDE: wpa_supplicant
      7      1.1  rpaulo # REQUIRE: network mountcritlocal
      8      1.1  rpaulo # BEFORE:  NETWORKING dhclient
      9      1.3     apb #
     10      1.3     apb #	We need to run a command that resides in /usr/sbin, and the
     11      1.3     apb #	/usr file system is traditionally mounted by mountcritremote.
     12      1.3     apb #	However, we cannot depend on mountcritremote, because that
     13      1.3     apb #	would introduce a circular dependency.	Therefore, if you need
     14      1.3     apb #	wpa_supplicant to start during the boot process, you should
     15      1.3     apb #	ensure that the /usr file system is mounted by mountcritlocal,
     16      1.3     apb #	not by mountcritremote.
     17      1.1  rpaulo 
     18      1.1  rpaulo $_rc_subr_loaded . /etc/rc.subr
     19      1.1  rpaulo 
     20      1.1  rpaulo name="wpa_supplicant"
     21      1.1  rpaulo rcvar=$name
     22      1.1  rpaulo command="/usr/sbin/wpa_supplicant"
     23      1.4    tron reload_cmd="/usr/sbin/wpa_cli reconfigure"
     24      1.2     abs extra_commands="reload"
     25      1.5     spz start_precmd="wpa_supplicant_precmd"
     26      1.5     spz 
     27      1.5     spz wpa_supplicant_precmd()
     28      1.5     spz {
     29      1.5     spz     if [ ! -d /var/run/wpa_supplicant ]; then
     30      1.5     spz         mkdir -p -m 755 /var/run/wpa_supplicant
     31      1.5     spz     fi
     32  1.5.4.1  martin     rc_flags="-B $rc_flags"
     33      1.5     spz }
     34      1.1  rpaulo 
     35      1.1  rpaulo load_rc_config $name
     36      1.1  rpaulo run_rc_command "$1"
     37