network 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #!/bin/sh
  2. ########################################################################
  3. # Begin network
  4. #
  5. # Description : Network Control Script
  6. #
  7. # Authors : Gerard Beekmans - gerard@linuxfromscratch.org
  8. # Nathan Coulson - nathan@linuxfromscratch.org
  9. # Kevin P. Fleming - kpfleming@linuxfromscratch.org
  10. # DJ Lucas - dj@linuxfromscratch.org
  11. # Update : Bruce Dubbs - bdubbs@linuxfromscratch.org
  12. #
  13. # Version : LFS 7.0
  14. #
  15. ########################################################################
  16. ### BEGIN INIT INFO
  17. # Provides: $network
  18. # Required-Start: $local_fs swap localnet
  19. # Should-Start: $syslog
  20. # Required-Stop: $local_fs swap localnet
  21. # Should-Stop: $syslog
  22. # Default-Start: 3 4 5
  23. # Default-Stop: 0 1 2 6
  24. # Short-Description: Starts and configures network interfaces.
  25. # Description: Starts and configures network interfaces.
  26. # X-LFS-Provided-By: LFS
  27. ### END INIT INFO
  28. . /lib/lsb/init-functions
  29. case "${1}" in
  30. start)
  31. do_start_network
  32. ;;
  33. stop)
  34. do_stop_network
  35. ;;
  36. restart)
  37. ${0} stop
  38. sleep 1
  39. ${0} start
  40. ;;
  41. *)
  42. echo "Usage: ${0} {start|stop|restart}"
  43. exit 1
  44. ;;
  45. esac
  46. exit 0
  47. # End network