[BACK]Return to wpa_supplicant CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / etc / rc.d

File: [cvs.NetBSD.org] / src / etc / rc.d / wpa_supplicant (download)

Revision 1.7, Fri Jun 29 12:34:15 2018 UTC (5 years, 9 months ago) by roy
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, netbsd-9-base, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, is-mlppp-base, is-mlppp
Changes since 1.6: +2 -2 lines

Remove dhclient from the base system.

Discussed here:
https://mail-index.netbsd.org/tech-userlevel/2018/06/21/msg011233.html

#!/bin/sh
#
# $NetBSD: wpa_supplicant,v 1.7 2018/06/29 12:34:15 roy Exp $
#

# PROVIDE: wpa_supplicant
# REQUIRE: network mountcritlocal
# BEFORE:  NETWORKING dhcpcd
#
#	We need to run a command that resides in /usr/sbin, and the
#	/usr file system is traditionally mounted by mountcritremote.
#	However, we cannot depend on mountcritremote, because that
#	would introduce a circular dependency.	Therefore, if you need
#	wpa_supplicant to start during the boot process, you should
#	ensure that the /usr file system is mounted by mountcritlocal,
#	not by mountcritremote.

$_rc_subr_loaded . /etc/rc.subr

name="wpa_supplicant"
rcvar=$name
command="/usr/sbin/wpa_supplicant"
reload_cmd="/usr/sbin/wpa_cli reconfigure"
extra_commands="reload"
start_precmd="wpa_supplicant_precmd"

wpa_supplicant_precmd()
{
    if [ ! -d /var/run/wpa_supplicant ]; then
        mkdir -p -m 755 /var/run/wpa_supplicant
    fi
    rc_flags="-B $rc_flags"
}

load_rc_config $name
run_rc_command "$1"