From be5e6338fa2c46429d9516659d33273de56a06ef Mon Sep 17 00:00:00 2001 From: Lukas Nykryn Date: Thu, 9 Apr 2015 16:09:37 +0200 Subject: network-functions: fix change_resolv_conf after grep update --- sysconfig/network-scripts/network-functions | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sysconfig') diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions index 9a5e359c..3afa9122 100644 --- a/sysconfig/network-scripts/network-functions +++ b/sysconfig/network-scripts/network-functions @@ -542,10 +542,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 @@ -563,7 +563,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; -- cgit v1.2.1