added support for networkless configurations

This commit is contained in:
Calin Crisan 2016-08-25 22:12:14 +03:00
parent 88c76e9504
commit 16f67c02e0
2 changed files with 5 additions and 5 deletions

View File

@ -182,9 +182,8 @@ start() {
fi
if [ "$eth_ok" != "ok" ] && [ "$wlan_ok" != "ok" ] && [ "$ppp_ok" != "ok" ]; then
logger -t ethernet -s "no network connection available"
reboot
return 1
logger -t ethernet -s "no network connection available"
test "$watch_link" == "yes" && return 1 || return 0
fi
if [ -n "$static_gw" ]; then

View File

@ -17,8 +17,9 @@ show_gateway() {
}
show_dns() {
dns=$(cat /etc/resolv.conf | grep nameserver | cut -d ' ' -f 2)
test -n "$gateway" && msg_info "DNS server address is $dns"
test -r /etc/resolv.conf || return
dns=$(cat /etc/resolv.conf | grep nameserver | head -n 1 | cut -d ' ' -f 2)
test -n "$dns" && msg_info "DNS server address is $dns"
}
case "$1" in