aboutsummaryrefslogtreecommitdiffstats
path: root/bootscripts/contrib/lsb-v3/sbin/ifup
diff options
context:
space:
mode:
authorDJ Lucas <dj@linuxfromscratch.org>2011-05-14 21:00:31 +0000
committerDJ Lucas <dj@linuxfromscratch.org>2011-05-14 21:00:31 +0000
commitdc55fb5e4b99cd1150afe41f7ce50333a773bb6a (patch)
tree3d49341fb38468a5f6c85b54c08171ced1e96c90 /bootscripts/contrib/lsb-v3/sbin/ifup
parentb4a678295e56da7be73a847cb460b477a54efc8a (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/ifup')
-rw-r--r--bootscripts/contrib/lsb-v3/sbin/ifup16
1 files changed, 13 insertions, 3 deletions
diff --git a/bootscripts/contrib/lsb-v3/sbin/ifup b/bootscripts/contrib/lsb-v3/sbin/ifup
index 50e173ca6..069af2f94 100644
--- a/bootscripts/contrib/lsb-v3/sbin/ifup
+++ b/bootscripts/contrib/lsb-v3/sbin/ifup
@@ -45,7 +45,9 @@ for file in ${FILES}; do
fi
(
- . ${file}
+ if [ ! -d "${file}" ]; then
+ . ${file}
+ fi
# Will not process this service if started by boot, and ONBOOT
# is not set to yes
@@ -58,7 +60,7 @@ for file in ${FILES}; do
continue
fi
- if [ -n "${SERVICE}" -a -x "${NETWORK_DEVICES}/services/${SERVICE}" ]; then
+ if [ -n "${SERVICE}" -a -x "/lib/network-services/${SERVICE}" ]; then
if [ -z "${CHECK_LINK}" -o "${CHECK_LINK}" = "y" -o "${CHECK_LINK}" = "yes" -o "${CHECK_LINK}" = "1" ]; then
if ip link show ${1} > /dev/null 2>&1; then
link_status=`ip link show ${1}`
@@ -73,7 +75,15 @@ for file in ${FILES}; do
log_warning_msg
fi
fi
- IFCONFIG=${file} ${NETWORK_DEVICES}/services/${SERVICE} ${1} up
+ IFCONFIG=${file} /lib/network-services/${SERVICE} ${1} up
+ if [ "${?}" -eq "0" ]; then
+ if [ ! -d "${file}" -a "${file}" != "${NETWORK_DEVICES}/ifconfig.${1}" ]; then
+ mkdir -p "/run/network/ifconfig.${1}"
+ cp "${file}" "/run/network/ifconfig.${1}"
+ elif [ ! -d "${file}" ]; then
+ cp "${file}" "/run/network/"
+ fi
+ fi
else
echo -e "${FAILURE}Unable to process ${file}. Either"
echo -e "${FAILURE}the SERVICE variable was not set,"