diff options
author | Lukas Nykryn <lnykryn@redhat.com> | 2015-10-27 10:12:19 +0100 |
---|---|---|
committer | Lukas Nykryn <lnykryn@redhat.com> | 2015-10-27 10:12:19 +0100 |
commit | 6b3a75f3e5da0a23fc0dcd5facd81b7b8f2f687e (patch) | |
tree | a188a6340e988186f78150d8eb9eb335c9d7b0cd /sysconfig | |
parent | 0f5fb4820a5173934a4d7c98d88037ccad21f3f1 (diff) | |
download | initscripts-6b3a75f3e5da0a23fc0dcd5facd81b7b8f2f687e.tar initscripts-6b3a75f3e5da0a23fc0dcd5facd81b7b8f2f687e.tar.gz initscripts-6b3a75f3e5da0a23fc0dcd5facd81b7b8f2f687e.tar.bz2 initscripts-6b3a75f3e5da0a23fc0dcd5facd81b7b8f2f687e.tar.xz initscripts-6b3a75f3e5da0a23fc0dcd5facd81b7b8f2f687e.zip |
network-scripts: DEVICE and HWADRR could be quoted by apostrophe
Diffstat (limited to 'sysconfig')
-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 fb2d291c..e163c8e5 100755 --- a/sysconfig/network-scripts/ifdown-eth +++ b/sysconfig/network-scripts/ifdown-eth @@ -57,7 +57,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 c44c2aee..88a4beba 100755 --- a/sysconfig/network-scripts/ifup-eth +++ b/sysconfig/network-scripts/ifup-eth @@ -138,7 +138,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##*/} || net_log "Unable to start slave device ${device##*/} for master ${DEVICE}." warning done diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions index 8a03134a..9715d8d1 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" } |