2007-02-15 16:11:34 +01:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Start the network....
|
|
|
|
#
|
|
|
|
|
2014-11-27 18:00:28 +01:00
|
|
|
# Debian ifupdown needs the /run/network lock directory
|
|
|
|
mkdir -p /run/network
|
|
|
|
|
2007-02-15 16:11:34 +01:00
|
|
|
case "$1" in
|
|
|
|
start)
|
2016-08-02 23:38:03 +02:00
|
|
|
printf "Starting network: "
|
2008-12-08 15:52:16 +01:00
|
|
|
/sbin/ifup -a
|
2016-08-02 23:38:03 +02:00
|
|
|
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
2007-02-15 16:11:34 +01:00
|
|
|
;;
|
|
|
|
stop)
|
2016-08-02 23:38:03 +02:00
|
|
|
printf "Stopping network: "
|
2008-12-08 15:52:16 +01:00
|
|
|
/sbin/ifdown -a
|
2016-08-02 23:38:03 +02:00
|
|
|
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
2007-02-15 16:11:34 +01:00
|
|
|
;;
|
|
|
|
restart|reload)
|
2008-12-08 15:52:16 +01:00
|
|
|
"$0" stop
|
|
|
|
"$0" start
|
2007-02-15 16:11:34 +01:00
|
|
|
;;
|
|
|
|
*)
|
2012-03-15 22:08:09 +01:00
|
|
|
echo "Usage: $0 {start|stop|restart}"
|
2007-02-15 16:11:34 +01:00
|
|
|
exit 1
|
|
|
|
esac
|
|
|
|
|
|
|
|
exit $?
|
|
|
|
|