diff options
author | Lukas Nykryn <lnykryn@redhat.com> | 2012-08-01 15:07:18 +0200 |
---|---|---|
committer | Lukas Nykryn <lnykryn@redhat.com> | 2012-08-07 10:01:57 +0200 |
commit | e5a5cce9011f1fac8e27581ad5eb5abd36cfab82 (patch) | |
tree | 1a84f6393d0a4529eedd1db100a0be24ace4f6cd /sysconfig/network-scripts | |
parent | 250820f3a255837df814d89711b10b222a4b596c (diff) | |
download | initscripts-e5a5cce9011f1fac8e27581ad5eb5abd36cfab82.tar initscripts-e5a5cce9011f1fac8e27581ad5eb5abd36cfab82.tar.gz initscripts-e5a5cce9011f1fac8e27581ad5eb5abd36cfab82.tar.bz2 initscripts-e5a5cce9011f1fac8e27581ad5eb5abd36cfab82.tar.xz initscripts-e5a5cce9011f1fac8e27581ad5eb5abd36cfab82.zip |
Re-read sysctl values for VLANs on ifup (#714250)
Diffstat (limited to 'sysconfig/network-scripts')
-rwxr-xr-x | sysconfig/network-scripts/ifup | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sysconfig/network-scripts/ifup b/sysconfig/network-scripts/ifup index 9479a477..b2c6b52d 100755 --- a/sysconfig/network-scripts/ifup +++ b/sysconfig/network-scripts/ifup @@ -121,6 +121,21 @@ if [ "${VLAN}" = "yes" ] && [ "$ISALIAS" = "no" ]; then exit 1 } fi + + VDEV=`echo ${DEVICE} | sed -n 's/\(.\+\)\.\([0-9]\{1,4\}\)$/\1\/\2/p'` + if [ ! "${VDEV}" = "" ]; then + + FILELIST="" + for FILE in /etc/sysctl.d/* ; do + is_ignored_file "${FILE}" && continue + test -f "${FILE}" && FILELIST=${FILELIST}" "${FILE} + done + + grep -h "\.${VDEV}\." /etc/sysctl.conf ${FILELIST} | grep -v -e "^\s*;" -e "^\s*#" | sed -n 's/^\s*\(\S\+\)\s*=\s*\(\S\+\)/\1=\2/p' | + while read LINE ; do + sysctl -w "${LINE}" + done + fi fi fi |