diff options
author | DJ Lucas <dj@linuxfromscratch.org> | 2011-05-14 21:00:31 +0000 |
---|---|---|
committer | DJ Lucas <dj@linuxfromscratch.org> | 2011-05-14 21:00:31 +0000 |
commit | dc55fb5e4b99cd1150afe41f7ce50333a773bb6a (patch) | |
tree | 3d49341fb38468a5f6c85b54c08171ced1e96c90 /bootscripts/contrib/lsb-v3/sbin/ifdown | |
parent | b4a678295e56da7be73a847cb460b477a54efc8a (diff) |
Changes per thread starting at http://archive.linuxfromscratch.org/mail-archives/lfs-dev/2011-May/064677.html
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@9532 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'bootscripts/contrib/lsb-v3/sbin/ifdown')
-rw-r--r-- | bootscripts/contrib/lsb-v3/sbin/ifdown | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/bootscripts/contrib/lsb-v3/sbin/ifdown b/bootscripts/contrib/lsb-v3/sbin/ifdown index 28d1f1813..f9e2a51ad 100644 --- a/bootscripts/contrib/lsb-v3/sbin/ifdown +++ b/bootscripts/contrib/lsb-v3/sbin/ifdown @@ -20,12 +20,12 @@ # Collect a list of configuration files for our interface if [ -n "${2}" ]; then for file in ${@#$1}; do # All parameters except $1 - FILES="${FILES} ${NETWORK_DEVICES}/ifconfig.${1}/${file}" + FILES="${FILES} /run/network/ifconfig.${1}/${file}" done -elif [ -d "${NETWORK_DEVICES}/ifconfig.${1}" ]; then - FILES=`echo ${NETWORK_DEVICES}/ifconfig.${1}/*` +elif [ -d "/run/network/ifconfig.${1}" ]; then + FILES=`echo /run/network/ifconfig.${1}/*` else - FILES="${NETWORK_DEVICES}/ifconfig.${1}" + FILES="/run/network/ifconfig.${1}" fi # Reverse the order configuration files are processed in @@ -46,7 +46,9 @@ for file in ${FILES}; do log_warning_msg fi ( - . ${file} + if [ ! -d "${file}" ]; then + . ${file} + fi # Will not process this service if started by boot, and ONBOOT # is not set to yes @@ -61,10 +63,13 @@ for file in ${FILES}; do fi # This will run the service script, if SERVICE is set - if [ -n "${SERVICE}" -a -x "${NETWORK_DEVICES}/services/${SERVICE}" ]; then + if [ -n "${SERVICE}" -a -x "/lib/network-services/${SERVICE}" ]; then if ip link show ${1} > /dev/null 2>&1 then - IFCONFIG=${file} ${NETWORK_DEVICES}/services/${SERVICE} ${1} down + IFCONFIG=${file} /lib/network-services/${SERVICE} ${1} down && + if [ -f "${file}" ]; then + rm ${file} + fi else message="Interface ${1} doesn't exist." log_warning_msg |