wait rather than nodown

This commit is contained in:
Bob Mottram 2016-10-22 16:56:29 +01:00
parent 115e846da8
commit 412ada5d6a
3 changed files with 7 additions and 7 deletions

View File

@ -420,7 +420,7 @@ EOF
echo " echo 'User=root' >> /etc/systemd/system/wifistart.service" >> $rootdir/root/.bashrc
echo " echo 'Group=root' >> /etc/systemd/system/wifistart.service" >> $rootdir/root/.bashrc
echo " echo 'WorkingDirectory=/root' >> /etc/systemd/system/wifistart.service" >> $rootdir/root/.bashrc
echo " echo 'ExecStart=/usr/local/bin/freedombone-wifi --nodown y' >> /etc/systemd/system/wifistart.service" >> $rootdir/root/.bashrc
echo " echo 'ExecStart=/usr/local/bin/freedombone-wifi --wait 5 2> /dev/null' >> /etc/systemd/system/wifistart.service" >> $rootdir/root/.bashrc
echo " echo '' >> /etc/systemd/system/wifistart.service" >> $rootdir/root/.bashrc
echo " echo '[Install]' >> /etc/systemd/system/wifistart.service" >> $rootdir/root/.bashrc
echo " echo 'WantedBy=multi-user.target' >> /etc/systemd/system/wifistart.service" >> $rootdir/root/.bashrc

View File

@ -562,7 +562,7 @@ function create_wifi_startup_script {
echo 'User=root' >> $systemd_file
echo 'Group=root' >> $systemd_file
echo 'WorkingDirectory=/root' >> $systemd_file
echo "ExecStart=/usr/local/bin/${PROJECT_NAME}-wifi --nodown y" >> $systemd_file
echo "ExecStart=/usr/local/bin/${PROJECT_NAME}-wifi --wait 5 2> /dev/null" >> $systemd_file
echo '' >> $systemd_file
echo '[Install]' >> $systemd_file
echo 'WantedBy=multi-user.target' >> $systemd_file

View File

@ -46,7 +46,7 @@ WIFI_CONFIG=/etc/wpa_supplicant/wpa_supplicant.conf
WIFI_NETWORKS_FILE=~/${PROJECT_NAME}-wifi.cfg
NETWORKS_INTERACTIVE=
WIFI_DISABLE=
NODOWN=
WAIT_SEC=
IFACE=
IFACE_SECONDARY=
@ -87,9 +87,9 @@ do
wifi_interface_specified=1
write_config_param "WIFI_INTERFACE" "$WIFI_INTERFACE"
;;
--nodown)
--wait|--sleep|--pause)
shift
NODOWN=1
WAIT_SEC=${1}
;;
-t|--type)
shift
@ -138,11 +138,11 @@ if [ ${NETWORKS_INTERACTIVE} ]; then
fi
if [ ! ${wifi_interface_specified} ]; then
if [ ! $NODOWN ]; then
if [ ! $WAIT_SEC ]; then
wpa_action ${WIFI_INTERFACE} stop
wpa_cli -i ${WIFI_INTERFACE} terminate
else
sleep 5
sleep ${WAIT_SEC}
fi
update_wifi_adaptors
if [ ! $IFACE ]; then