Advertisement
Guest User

Laszio

a guest
Oct 14th, 2010
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.49 KB | None | 0 0
  1. #!/bin/sh -e
  2. ### BEGIN INIT INFO
  3. # Provides: networking
  4. # Required-Start: mountkernfs $local_fs
  5. # Required-Stop: $local_fs
  6. # Should-Start: ifupdown
  7. # Should-Stop: ifupdown
  8. # Default-Start: S
  9. # Default-Stop: 0 6
  10. # Short-Description: Raise network interfaces.
  11. ### END INIT INFO
  12.  
  13. PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin"
  14.  
  15. [ -x /sbin/ifup ] || exit 0
  16.  
  17. . /lib/lsb/init-functions
  18.  
  19. process_options() {
  20. [ -e /etc/network/options ] || return 0
  21. log_warning_msg "/etc/network/options still exists and it will be IGNORED! Read README.Debian of netbase."
  22. }
  23.  
  24. check_network_file_systems() {
  25. [ -e /proc/mounts ] || return 0
  26.  
  27. if [ -e /etc/iscsi/iscsi.initramfs ]; then
  28. log_warning_msg "not deconfiguring network interfaces: iSCSI root is mounted."
  29. exit 0
  30. fi
  31.  
  32. exec 9<&0 < /proc/mounts
  33. while read DEV MTPT FSTYPE REST; do
  34. case $DEV in
  35. /dev/nbd*|/dev/nd[a-z]*|/dev/etherd/e*)
  36. log_warning_msg "not deconfiguring network interfaces: network devices still mounted."
  37. exit 0
  38. ;;
  39. esac
  40. case $FSTYPE in
  41. nfs|nfs4|smbfs|ncp|ncpfs|cifs|coda|ocfs2|gfs|pvfs|pvfs2|fuse.httpfs|fuse.curlftpfs)
  42. log_warning_msg "not deconfiguring network interfaces: network file systems still mounted."
  43. exit 0
  44. ;;
  45. esac
  46. done
  47. exec 0<&9 9<&-
  48. }
  49.  
  50. check_network_swap() {
  51. [ -e /proc/swaps ] || return 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement