diff options
author | Roy Marples <roy@marples.name> | 2009-01-21 09:25:34 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2009-01-21 09:25:34 +0000 |
commit | 4f163f9b9ae66bb4caeb192d463510c3b1434fa3 (patch) | |
tree | 4bff30a2bfd64ce17b3c97138f7ebecba0e07f4f /net | |
parent | 417a817d252f354b75b84e6ae9df5f1d79cac11c (diff) |
Allow wpa_cli_$IFACE to too send args to wpa_cli.
Diffstat (limited to 'net')
-rw-r--r-- | net/wpa_supplicant.sh | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/wpa_supplicant.sh b/net/wpa_supplicant.sh index 092dfb36..b04eabd0 100644 --- a/net/wpa_supplicant.sh +++ b/net/wpa_supplicant.sh @@ -1,4 +1,4 @@ -# Copyright 2007-2008 Roy Marples <roy@marples.name> +# Copyright 2007-2009 Roy Marples <roy@marples.name> # All rights reserved. Released under the 2-clause BSD license. wpa_supplicant_depend() @@ -45,7 +45,7 @@ fi wpa_supplicant_pre_start() { - local opts= cfgfile= ctrl_dir= wireless=true + local opts= cliopts= cfgfile= ctrl_dir= wireless=true local wpas=/usr/sbin/wpa_supplicant wpac=/usr/bin/wpa_cli local actfile=/etc/wpa_supplicant/wpa_cli.sh @@ -57,6 +57,8 @@ wpa_supplicant_pre_start() [ -e "${actfile}" ] || unset wpac eval opts=\$wpa_supplicant_${IFVAR} + eval cliopts=\$wpa_cli_${IFVAR} + [ -z "${cliopts}" ] && cliopts=${wpa_cli} case " ${opts} " in *" -Dwired "*) wireless=false;; *) _is_wireless || return 0;; @@ -157,7 +159,7 @@ wpa_supplicant_pre_start() ebegin "Starting wpa_cli on" "${IFACE}" start-stop-daemon --start --exec "${wpac}" \ --pidfile "/var/run/wpa_cli-${IFACE}.pid" \ - -- -a "${actfile}" -p "${ctrl_dir}" -i "${IFACE}" \ + -- ${cliopts} -a "${actfile}" -p "${ctrl_dir}" -i "${IFACE}" \ -P "/var/run/wpa_cli-${IFACE}.pid" -B if eend $?; then ebegin "Backgrounding ..." |