diff options
Diffstat (limited to 'lsb-bootscripts/etc/init.d/network')
-rw-r--r-- | lsb-bootscripts/etc/init.d/network | 84 |
1 files changed, 0 insertions, 84 deletions
diff --git a/lsb-bootscripts/etc/init.d/network b/lsb-bootscripts/etc/init.d/network deleted file mode 100644 index ddd130391..000000000 --- a/lsb-bootscripts/etc/init.d/network +++ /dev/null @@ -1,84 +0,0 @@ -#!/bin/sh -# Begin $RC_BASE/init.d/network - -### BEGIN INIT INFO -# Provides: $network -# Required-Start: $local_fs swap localnet -# Should-Start: $syslog -# Required-Stop: $local_fs swap localnet -# Should-Stop: $syslog -# Default-Start: 3 4 5 -# Default-Stop: 0 1 2 6 -# Short-Description: Starts and configures network interfaces. -# Description: Starts and configures network interfaces. -# X-LFS-Provided-By: LFS -### END INIT INFO - -. /lib/lsb/init-functions - -case "${1}" in - start) - # Start all network interfaces - for dir in ${NETWORK_DEVICES}/ifconfig.* - do - interface=${dir##*/ifconfig.} - # skip if $dir is * (because nothing was found) - if [ "${interface}" = "*" ]; then - continue - fi - # Process individual configuration files - for file in "${dir}"/* ; do - ONBOOT=`grep "ONBOOT" "${file}" | sed 's@^ONBOOT=@@'` - case "${ONBOOT}" in - Y* | y* | 0) - /sbin/ifup -c "${file}" "${interface}" - ;; - esac - done - done - ;; - - stop) - # Reverse list - DIRS="" - for dir in /run/network/ifconfig.* - do - DIRS="${dir} ${DIRS}" - done - - # Stop all network interfaces - for dir in ${DIRS}; do - interface=${dir##*/ifconfig.} - # skip if $dir is * (because nothing was found) - if [ "${interface}" = "*" ]; then - continue - fi - # Process individual configuration files - for file in "${dir}"/* ; do - # No checking necessary if it is in /run/network - /sbin/ifdown -c "${file}" "${interface}" - done - link_status=`/sbin/ip link show "${interface}" | \ - grep -o "state DOWN"` - if [ "${link_status}" != "state DOWN" ]; then - message="Shutting down the ${interface} interface..." - /sbin/ip addr flush "${interface}" && - /sbin/ip link set "${interface}" down - evaluate_retval standard - fi - done - ;; - - restart) - ${0} stop - sleep 1 - ${0} start - ;; - - *) - echo "Usage: ${0} {start|stop|restart}" - exit 1 - ;; -esac - -# End $RC_BASE/init.d/network |