mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-09 07:51:59 -09:00
Start networking on boot, and setup a default set of network
interfaces (just loopback for now).
This commit is contained in:
35
sources/target_skeleton/etc/init.d/S40network
Executable file
35
sources/target_skeleton/etc/init.d/S40network
Executable file
@@ -0,0 +1,35 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Start the network....
|
||||
#
|
||||
|
||||
start() {
|
||||
echo "Starting network..."
|
||||
/sbin/ifup -a
|
||||
}
|
||||
stop() {
|
||||
echo -n "Stopping network..."
|
||||
/sbin/ifdown -a
|
||||
}
|
||||
restart() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
restart|reload)
|
||||
restart
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $?
|
||||
|
||||
4
sources/target_skeleton/etc/network/interfaces
Normal file
4
sources/target_skeleton/etc/network/interfaces
Normal file
@@ -0,0 +1,4 @@
|
||||
# Configure Loopback
|
||||
auto lo
|
||||
iface lo inet loopback
|
||||
|
||||
Reference in New Issue
Block a user