aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig
diff options
context:
space:
mode:
Diffstat (limited to 'sysconfig')
-rw-r--r--sysconfig/network-scripts/network-functions8
1 files changed, 4 insertions, 4 deletions
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;