mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-29 04:52:32 +02:00
DHCP event
This commit is contained in:
@@ -126,8 +126,8 @@ while :
|
|||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# waiting for DHCP in general
|
# waiting for local IP
|
||||||
if [ "${state}" = "noIP" ]; then
|
if [ "${state}" = "noIP-LAN" ] || [ "${state}" = "noIP-WIFI" ]; then
|
||||||
l1="Waiting for Network ...\n"
|
l1="Waiting for Network ...\n"
|
||||||
l2="Not able to get local IP.\n"
|
l2="Not able to get local IP.\n"
|
||||||
l3="LAN cable connected? WIFI lost?\n"
|
l3="LAN cable connected? WIFI lost?\n"
|
||||||
@@ -136,7 +136,7 @@ while :
|
|||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# waiting for DHCP in general
|
# waiting for Internet
|
||||||
if [ "${state}" = "noInternet" ]; then
|
if [ "${state}" = "noInternet" ]; then
|
||||||
l1="Waiting for Internet ...\n"
|
l1="Waiting for Internet ...\n"
|
||||||
l2="Local Network seems OK but no Internet.\n"
|
l2="Local Network seems OK but no Internet.\n"
|
||||||
|
@@ -316,16 +316,16 @@ do
|
|||||||
# check state of network
|
# check state of network
|
||||||
if [ ${dhcp} -eq 0 ]; then
|
if [ ${dhcp} -eq 0 ]; then
|
||||||
# display user waiting for DHCP
|
# 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}
|
sed -i "s/^message=.*/message='Waiting for DHCP'/g" ${infoFile}
|
||||||
elif [ ${#localip} -eq 0 ]; then
|
elif [ ${#localip} -eq 0 ]; then
|
||||||
if [ ${configWifiExists} -eq 0 ]; then
|
if [ ${configWifiExists} -eq 0 ]; then
|
||||||
# display user to connect LAN
|
# 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}
|
sed -i "s/^message=.*/message='Connect the LAN/WAN'/g" ${infoFile}
|
||||||
else
|
else
|
||||||
# display user that wifi settings are not working
|
# 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}
|
sed -i "s/^message=.*/message='WIFI Settings not working'/g" ${infoFile}
|
||||||
fi
|
fi
|
||||||
elif [ ${online} -eq 0 ]; then
|
elif [ ${online} -eq 0 ]; then
|
||||||
|
@@ -41,15 +41,50 @@ elif [ "${eventID}" == "reboot" ]; then
|
|||||||
Shutting down for reboot.
|
Shutting down for reboot.
|
||||||
" 5 30
|
" 5 30
|
||||||
|
|
||||||
|
elif [ "${eventID}" == "noDHCP" ]; then
|
||||||
|
|
||||||
elif [ "${eventID}" == "noHDD" ]; then
|
# this event is mostly for LCD/HDMI display
|
||||||
|
# because if device gets no local IP
|
||||||
# contentWords[0] --> size string (for example '1TB')
|
# SSH & WEBUI would not have connected yet
|
||||||
dialog --backtitle "${backtitle}" --cr-wrap --infobox "
|
dialog --backtitle "${backtitle}" --cr-wrap --infobox "
|
||||||
Waiting for HDD/SSD
|
Waiting for local IP address ...
|
||||||
Please connect minimum ${contentWords[0]}
|
If this takes too long please check
|
||||||
HDD or SSD to the the device.
|
your connection to internet router.
|
||||||
" 7 34
|
" 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
|
elif [ "${eventID}" == "sdtoosmall" ]; then
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user