Overlay: add check for eth0 interface

pull/1280/head
Viktor 2024-01-23 13:33:43 +01:00
parent 1dfc53bbef
commit ef8a0d81f2
1 changed files with 3 additions and 2 deletions

View File

@ -11,7 +11,7 @@ set_wireless() {
elif $path/modem "$dev"; then
ifup usb0
fi
ifconfig eth0 "${net:-192.168.2.10}"
[ -e /sys/class/net/eth0 ] && ifconfig eth0 "${net:-192.168.2.10}"
}
case "$1" in
@ -36,7 +36,7 @@ case "$1" in
fi
;;
restart|reload)
restart)
"$0" stop
"$0" start
;;
@ -44,6 +44,7 @@ case "$1" in
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac
exit 0