From ecc64049caf281e5f18fd6996f3716c83aacdad3 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 85a8880b..bcf75cd2 100644 --- a/sysconfig/network-scripts/network-functions +++ b/sysconfig/network-scripts/network-functions @@ -515,10 +515,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 @@ -536,7 +536,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