diff options
author | Lukas Nykryn <lnykryn@redhat.com> | 2015-10-27 10:12:19 +0100 |
---|---|---|
committer | Lukas Nykryn <lnykryn@redhat.com> | 2015-10-27 13:07:44 +0100 |
commit | 45193c71307564c6cc7f8506a15b5c714dc1a147 (patch) | |
tree | d307dea90078a3436d7127bde4ec10654911e6db | |
parent | 856e98acf9c69906069c4f6520cfd6759010a54a (diff) | |
download | initscripts-45193c71307564c6cc7f8506a15b5c714dc1a147.tar initscripts-45193c71307564c6cc7f8506a15b5c714dc1a147.tar.gz initscripts-45193c71307564c6cc7f8506a15b5c714dc1a147.tar.bz2 initscripts-45193c71307564c6cc7f8506a15b5c714dc1a147.tar.xz initscripts-45193c71307564c6cc7f8506a15b5c714dc1a147.zip |
network-scripts: DEVICE and HWADRR could be quoted by apostrophe
Resolves: #1210732
-rwxr-xr-x | sysconfig/network-scripts/ifdown-eth | 2 | ||||
-rwxr-xr-x | sysconfig/network-scripts/ifup-eth | 2 | ||||
-rw-r--r-- | sysconfig/network-scripts/network-functions | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/sysconfig/network-scripts/ifdown-eth b/sysconfig/network-scripts/ifdown-eth index f56e4c57..842ed702 100755 --- a/sysconfig/network-scripts/ifdown-eth +++ b/sysconfig/network-scripts/ifdown-eth @@ -53,7 +53,7 @@ fi fi if is_bonding_device ${DEVICE} ; then - for device in $(LANG=C grep -l "^[[:space:]]*MASTER=\"\?${DEVICE}\"\?\([[:space:]#]\|$\)" /etc/sysconfig/network-scripts/ifcfg-*) ; do + for device in $(LANG=C grep -l "^[[:space:]]*MASTER=['\"]\?${DEVICE}['\"]\?\([[:space:]#]\|$\)" /etc/sysconfig/network-scripts/ifcfg-*) ; do is_ignored_file "$device" && continue /sbin/ifdown ${device##*/} done diff --git a/sysconfig/network-scripts/ifup-eth b/sysconfig/network-scripts/ifup-eth index 14ada9fb..24f37295 100755 --- a/sysconfig/network-scripts/ifup-eth +++ b/sysconfig/network-scripts/ifup-eth @@ -122,7 +122,7 @@ fi if [ "$ISALIAS" = no ] && is_bonding_device ${DEVICE} ; then install_bonding_driver ${DEVICE} /sbin/ip link set dev ${DEVICE} up - for device in $(LANG=C grep -l "^[[:space:]]*MASTER=\"\?${DEVICE}\"\?\([[:space:]#]\|$\)" /etc/sysconfig/network-scripts/ifcfg-*) ; do + for device in $(LANG=C grep -l "^[[:space:]]*MASTER=['\"]\?${DEVICE}['\"]\?\([[:space:]#]\|$\)" /etc/sysconfig/network-scripts/ifcfg-*) ; do is_ignored_file "$device" && continue /sbin/ifup ${device##*/} done diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions index bcf75cd2..2a9bb811 100644 --- a/sysconfig/network-scripts/network-functions +++ b/sysconfig/network-scripts/network-functions @@ -22,14 +22,14 @@ get_hwaddr () get_config_by_device () { - LANG=C grep -l "^[[:space:]]*DEVICE=\"\?${1}\"\?\([[:space:]#]\|$\)" \ + LANG=C grep -l "^[[:space:]]*DEVICE=['\"]\?${1}['\"]\?\([[:space:]#]\|$\)" \ /etc/sysconfig/network-scripts/ifcfg-* \ | LC_ALL=C sed -e "$__sed_discard_ignored_files" } get_config_by_hwaddr () { - LANG=C grep -il "^[[:space:]]*HWADDR=${1}\([[:space:]#]\|$\)" /etc/sysconfig/network-scripts/ifcfg-* \ + LANG=C grep -il "^[[:space:]]*HWADDR=['\"]\?${1}['\"]\?\([[:space:]#]\|$\)" /etc/sysconfig/network-scripts/ifcfg-* \ | LC_ALL=C sed -e "$__sed_discard_ignored_files" } |