Commit b4ce6eb2 authored by Adam Wujek's avatar Adam Wujek 💬

rootfs: create script to enable switching

Switching is enabled when interfaces are up. Bringing up interfaces is delayed
to be able to configure VLANs first.
Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent e9f5db2d
#!/bin/sh
start() {
echo -n "Enable switching: "
# bring up all interfaces
for i in `ls /sys/class/net | grep wr`
do
ifconfig $i up
done
echo "OK"
}
stop() {
echo -n "Disable switching: "
# bring down all interfaces
for i in `ls /sys/class/net | grep wr`
do
ifconfig $i down
done
echo "OK"
}
restart() {
stop
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
restart
;;
*)
echo $"Usage: $0 {start|stop|restart}"
exit 1
;;
esac
../init.d/enable_switching.sh
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment