Skip to content

Commit

Permalink
Overlay: add check for eth0 interface
Browse files Browse the repository at this point in the history
  • Loading branch information
viktorxda committed Jan 23, 2024
1 parent 1dfc53b commit ef8a0d8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions general/overlay/etc/init.d/S40network
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -36,14 +36,15 @@ case "$1" in
fi
;;

restart|reload)
restart)
"$0" stop
"$0" start
;;

*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac

exit 0

0 comments on commit ef8a0d8

Please sign in to comment.