Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh -e
- ### BEGIN INIT INFO
- # Provides: networking
- # Required-Start: mountkernfs $local_fs
- # Required-Stop: $local_fs
- # Should-Start: ifupdown
- # Should-Stop: ifupdown
- # Default-Start: S
- # Default-Stop: 0 6
- # Short-Description: Raise network interfaces.
- ### END INIT INFO
- PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin"
- [ -x /sbin/ifup ] || exit 0
- . /lib/lsb/init-functions
- process_options() {
- [ -e /etc/network/options ] || return 0
- log_warning_msg "/etc/network/options still exists and it will be IGNORED! Read README.Debian of netbase."
- }
- check_network_file_systems() {
- [ -e /proc/mounts ] || return 0
- if [ -e /etc/iscsi/iscsi.initramfs ]; then
- log_warning_msg "not deconfiguring network interfaces: iSCSI root is mounted."
- exit 0
- fi
- exec 9<&0 < /proc/mounts
- while read DEV MTPT FSTYPE REST; do
- case $DEV in
- /dev/nbd*|/dev/nd[a-z]*|/dev/etherd/e*)
- log_warning_msg "not deconfiguring network interfaces: network devices still mounted."
- exit 0
- ;;
- esac
- case $FSTYPE in
- nfs|nfs4|smbfs|ncp|ncpfs|cifs|coda|ocfs2|gfs|pvfs|pvfs2|fuse.httpfs|fuse.curlftpfs)
- log_warning_msg "not deconfiguring network interfaces: network file systems still mounted."
- exit 0
- ;;
- esac
- done
- exec 0<&9 9<&-
- }
- check_network_swap() {
- [ -e /proc/swaps ] || return 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement