Browse Source

ifcfg: write DNS1=... for nameserver= args (RHBZ#815369)

If you're using a static network config, you'll want to keep your
nameservers around when NM starts. Write DNS1 (and DNS2, DNS3, etc..)
into the ifcfg file.

Thanks to Mark Hamzy <hamzy@us.ibm.com>
and Will Woods <wwoods@redhat.com> for the patch.
master
Harald Hoyer 13 years ago
parent
commit
eb6e141adb
  1. 5
      modules.d/45ifcfg/write-ifcfg.sh

5
modules.d/45ifcfg/write-ifcfg.sh

@ -138,6 +138,11 @@ for netif in $IFACES ; do
} >> /tmp/ifcfg/ifcfg-$ethname } >> /tmp/ifcfg/ifcfg-$ethname
fi fi
fi fi
i=1
for ns in $(getargs nameserver); do
echo "DNS${i}=${ns}" >> /tmp/ifcfg/ifcfg-$netif
i=$((i+1))
done
done done


# Pass network opts # Pass network opts

Loading…
Cancel
Save