network.init 328 B

12345678910111213141516171819202122232425
  1. #!/bin/sh
  2. #FWINIT 40
  3. . /etc/rc.conf
  4. case $1 in
  5. autostart)
  6. test x"${network:-NO}" = x"NO" && exit 0
  7. exec sh $0 start
  8. ;;
  9. start)
  10. [ -f /etc/network/interfaces ] || exit 1
  11. ifup -a
  12. ;;
  13. autostop|stop)
  14. ifdown -a
  15. ;;
  16. restart)
  17. sh $0 stop
  18. exec sh $0 start
  19. ;;
  20. *)
  21. echo "Usage: $0 {start | stop | restart}"
  22. exit 1
  23. ;;
  24. esac
  25. exit $?