wait rather than nodown
This commit is contained in:
parent
115e846da8
commit
412ada5d6a
|
@ -420,7 +420,7 @@ EOF
|
||||||
echo " echo 'User=root' >> /etc/systemd/system/wifistart.service" >> $rootdir/root/.bashrc
|
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 'Group=root' >> /etc/systemd/system/wifistart.service" >> $rootdir/root/.bashrc
|
||||||
echo " echo 'WorkingDirectory=/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 '' >> /etc/systemd/system/wifistart.service" >> $rootdir/root/.bashrc
|
||||||
echo " echo '[Install]' >> /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
|
echo " echo 'WantedBy=multi-user.target' >> /etc/systemd/system/wifistart.service" >> $rootdir/root/.bashrc
|
||||||
|
|
|
@ -562,7 +562,7 @@ function create_wifi_startup_script {
|
||||||
echo 'User=root' >> $systemd_file
|
echo 'User=root' >> $systemd_file
|
||||||
echo 'Group=root' >> $systemd_file
|
echo 'Group=root' >> $systemd_file
|
||||||
echo 'WorkingDirectory=/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 '' >> $systemd_file
|
||||||
echo '[Install]' >> $systemd_file
|
echo '[Install]' >> $systemd_file
|
||||||
echo 'WantedBy=multi-user.target' >> $systemd_file
|
echo 'WantedBy=multi-user.target' >> $systemd_file
|
||||||
|
|
|
@ -46,7 +46,7 @@ WIFI_CONFIG=/etc/wpa_supplicant/wpa_supplicant.conf
|
||||||
WIFI_NETWORKS_FILE=~/${PROJECT_NAME}-wifi.cfg
|
WIFI_NETWORKS_FILE=~/${PROJECT_NAME}-wifi.cfg
|
||||||
NETWORKS_INTERACTIVE=
|
NETWORKS_INTERACTIVE=
|
||||||
WIFI_DISABLE=
|
WIFI_DISABLE=
|
||||||
NODOWN=
|
WAIT_SEC=
|
||||||
|
|
||||||
IFACE=
|
IFACE=
|
||||||
IFACE_SECONDARY=
|
IFACE_SECONDARY=
|
||||||
|
@ -87,9 +87,9 @@ do
|
||||||
wifi_interface_specified=1
|
wifi_interface_specified=1
|
||||||
write_config_param "WIFI_INTERFACE" "$WIFI_INTERFACE"
|
write_config_param "WIFI_INTERFACE" "$WIFI_INTERFACE"
|
||||||
;;
|
;;
|
||||||
--nodown)
|
--wait|--sleep|--pause)
|
||||||
shift
|
shift
|
||||||
NODOWN=1
|
WAIT_SEC=${1}
|
||||||
;;
|
;;
|
||||||
-t|--type)
|
-t|--type)
|
||||||
shift
|
shift
|
||||||
|
@ -138,11 +138,11 @@ if [ ${NETWORKS_INTERACTIVE} ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! ${wifi_interface_specified} ]; then
|
if [ ! ${wifi_interface_specified} ]; then
|
||||||
if [ ! $NODOWN ]; then
|
if [ ! $WAIT_SEC ]; then
|
||||||
wpa_action ${WIFI_INTERFACE} stop
|
wpa_action ${WIFI_INTERFACE} stop
|
||||||
wpa_cli -i ${WIFI_INTERFACE} terminate
|
wpa_cli -i ${WIFI_INTERFACE} terminate
|
||||||
else
|
else
|
||||||
sleep 5
|
sleep ${WAIT_SEC}
|
||||||
fi
|
fi
|
||||||
update_wifi_adaptors
|
update_wifi_adaptors
|
||||||
if [ ! $IFACE ]; then
|
if [ ! $IFACE ]; then
|
||||||
|
|
Loading…
Reference in New Issue