diff options
author | Lukas Nykryn <lnykryn@redhat.com> | 2015-04-09 16:09:37 +0200 |
---|---|---|
committer | Lukas Nykryn <lnykryn@redhat.com> | 2015-05-06 13:48:06 +0200 |
commit | 39de27f81ed861da917155a0552bbf494b33e5ad (patch) | |
tree | 4a071dd0055cf4f3ca133c9ae6d96e0a686e98a7 /sysconfig | |
parent | 592a807c2204d35ad4ad2bf58f073d547ddd39ce (diff) | |
download | initscripts-39de27f81ed861da917155a0552bbf494b33e5ad.tar initscripts-39de27f81ed861da917155a0552bbf494b33e5ad.tar.gz initscripts-39de27f81ed861da917155a0552bbf494b33e5ad.tar.bz2 initscripts-39de27f81ed861da917155a0552bbf494b33e5ad.tar.xz initscripts-39de27f81ed861da917155a0552bbf494b33e5ad.zip |
network-functions: fix change_resolv_conf after grep update
Diffstat (limited to 'sysconfig')
-rw-r--r-- | sysconfig/network-scripts/network-functions | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions index 0e86efd0..03d62bab 100644 --- a/sysconfig/network-scripts/network-functions +++ b/sysconfig/network-scripts/network-functions @@ -532,10 +532,10 @@ is_bonding_device () change_resolv_conf () { s=$(/bin/grep '^[\ \ ]*option' /etc/resolv.conf 2>/dev/null); - if [ "x$s" != "x" ]; then - s="$s"$'\n'; - fi; if [ $# -gt 1 ]; then + if [ "x$s" != "x" ]; then + s="$s"$'\n'; + fi; n_args=$#; while [ $n_args -gt 0 ]; do @@ -553,7 +553,7 @@ change_resolv_conf () done; elif [ $# -eq 1 ]; then if [ "x$s" != "x" ]; then - s="$s"$(/bin/grep -vF "$s" $1); + s="$s"$'\n'$(/bin/grep -vF "$s" $1); else s=$(cat $1); fi; |