mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2025-02-24 14:51:03 +01:00
DHCP event
This commit is contained in:
parent
4ff3e3deb2
commit
aaa9f4dde7
3 changed files with 48 additions and 13 deletions
|
@ -126,8 +126,8 @@ while :
|
|||
continue
|
||||
fi
|
||||
|
||||
# waiting for DHCP in general
|
||||
if [ "${state}" = "noIP" ]; then
|
||||
# waiting for local IP
|
||||
if [ "${state}" = "noIP-LAN" ] || [ "${state}" = "noIP-WIFI" ]; then
|
||||
l1="Waiting for Network ...\n"
|
||||
l2="Not able to get local IP.\n"
|
||||
l3="LAN cable connected? WIFI lost?\n"
|
||||
|
@ -136,7 +136,7 @@ while :
|
|||
continue
|
||||
fi
|
||||
|
||||
# waiting for DHCP in general
|
||||
# waiting for Internet
|
||||
if [ "${state}" = "noInternet" ]; then
|
||||
l1="Waiting for Internet ...\n"
|
||||
l2="Local Network seems OK but no Internet.\n"
|
||||
|
|
|
@ -316,16 +316,16 @@ do
|
|||
# check state of network
|
||||
if [ ${dhcp} -eq 0 ]; then
|
||||
# display user waiting for DHCP
|
||||
sed -i "s/^state=.*/state=noDCHP/g" ${infoFile}
|
||||
sed -i "s/^state=.*/state=noDHCP/g" ${infoFile}
|
||||
sed -i "s/^message=.*/message='Waiting for DHCP'/g" ${infoFile}
|
||||
elif [ ${#localip} -eq 0 ]; then
|
||||
if [ ${configWifiExists} -eq 0 ]; then
|
||||
# display user to connect LAN
|
||||
sed -i "s/^state=.*/state=noIP/g" ${infoFile}
|
||||
sed -i "s/^state=.*/state=noIP-LAN/g" ${infoFile}
|
||||
sed -i "s/^message=.*/message='Connect the LAN/WAN'/g" ${infoFile}
|
||||
else
|
||||
# display user that wifi settings are not working
|
||||
sed -i "s/^state=.*/state=noIP/g" ${infoFile}
|
||||
sed -i "s/^state=.*/state=noIP-WIFI/g" ${infoFile}
|
||||
sed -i "s/^message=.*/message='WIFI Settings not working'/g" ${infoFile}
|
||||
fi
|
||||
elif [ ${online} -eq 0 ]; then
|
||||
|
|
|
@ -41,15 +41,50 @@ elif [ "${eventID}" == "reboot" ]; then
|
|||
Shutting down for reboot.
|
||||
" 5 30
|
||||
|
||||
elif [ "${eventID}" == "noDHCP" ]; then
|
||||
|
||||
elif [ "${eventID}" == "noHDD" ]; then
|
||||
|
||||
# contentWords[0] --> size string (for example '1TB')
|
||||
# this event is mostly for LCD/HDMI display
|
||||
# because if device gets no local IP
|
||||
# SSH & WEBUI would not have connected yet
|
||||
dialog --backtitle "${backtitle}" --cr-wrap --infobox "
|
||||
Waiting for HDD/SSD
|
||||
Please connect minimum ${contentWords[0]}
|
||||
HDD or SSD to the the device.
|
||||
" 7 34
|
||||
Waiting for local IP address ...
|
||||
If this takes too long please check
|
||||
your connection to internet router.
|
||||
" 7 41
|
||||
|
||||
elif [ "${eventID}" = "noIP-LAN" ] || [ "${eventID}" = "noIP-WIFI" ]; then
|
||||
|
||||
# this event is mostly for LCD/HDMI display
|
||||
# because if device gets no local IP
|
||||
# SSH & WEBUI would not have connected yet
|
||||
dialog --backtitle "${backtitle}" --cr-wrap --infobox "
|
||||
Waiting for Network ...
|
||||
Not able to get local IP.
|
||||
LAN cable connected? WIFI lost?
|
||||
" 7 41
|
||||
|
||||
elif [ "${eventID}" = "noInternet" ]; then
|
||||
|
||||
dialog --backtitle "${backtitle}" --cr-wrap --infobox "
|
||||
Waiting for Internet ...
|
||||
Local Network seems OK but no Internet.
|
||||
Is your router still online?
|
||||
" 7 43
|
||||
|
||||
elif [ "${eventID}" = "noInternet" ]; then
|
||||
|
||||
dialog --backtitle "${backtitle}" --cr-wrap --infobox "
|
||||
Waiting for Internet ...
|
||||
Local Network seems OK but no Internet.
|
||||
Is your router still online?
|
||||
" 7 43
|
||||
|
||||
elif [ "${eventID}" == "inspect-hdd" ]; then
|
||||
|
||||
dialog --backtitle "${backtitle}" --cr-wrap --infobox "
|
||||
Checking HDD/SSD ...
|
||||
Please wait.
|
||||
" 6 26
|
||||
|
||||
elif [ "${eventID}" == "sdtoosmall" ]; then
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue