Fix NoDogSplash Startup Failure

Fix NoDogSplash Startup Failure if Device is Not Ready. 
The function wait_for_interface() was incorporated into the nodogsplash init script to prevent startup failure if the device for nodogsplash to bind to is not yet up when nodogsplash starts at boot time.
However if option network is defined in the configuration file, the function network_get_device() is used to determine the required device. 
Unfortunately if the device is not ready when network_get_device() is called, null is returned without error resulting in an empty temporary .config file being created  in /tmp/etc. NoDogsplash then fails.
The proposed updated config file defaults to setting option gatewayinterface 'br-lan'.
This commit is contained in:
bluewavenet 2018-01-05 20:09:04 +00:00 committed by GitHub
parent 5e96695d52
commit ee4452cb37
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,8 +12,19 @@ config nodogsplash
# Use plain configuration file
#option config '/etc/nodogsplash/nodogsplash.conf'
# The network the users are connected to
option network 'lan'
# Set the network interface the users are connected to
# Must not be used with option gatewayinterface
# This option automatically identifies the active lan device for nodogsplash to bind to
# This option may fail if the device configured for this interface is not up when nodogsplash starts at boot time
# You may change this to any valid virtual lan interface that has been defined, eg lan, lan2, public_lan wlan2 etc
# option network 'lan'
# Set the device nogogsplash will bind to
# Must not be used with option network
# The nodogsplash init script will wait for this device to be up before loading the nodogsplash service
# You may change this to any valid lan device eg br-lan, wlan0, eth0.1 etc
option gatewayinterface 'br-lan'
option gatewayname 'OpenWrt Nodogsplash'
option maxclients '250'
#Client timeouts in minutes