From 85ab1a8cc3935538cc1f33fef7c94ba31accb53e Mon Sep 17 00:00:00 2001 From: zecke Date: Fri, 15 Oct 2004 00:49:19 +0000 Subject: Test if '/etc/resolv.conf' exists and then back it up to $tmpfile. Now we even can work with no file at all and create it to add our nameserver --- diff --git a/root/usr/bin/changedns b/root/usr/bin/changedns index 8270e86..5059d08 100755 --- a/root/usr/bin/changedns +++ b/root/usr/bin/changedns @@ -15,7 +15,7 @@ usage ( ) { shift -cp /etc/resolv.conf $tmpfile +[ -f /etc/resolv.conf ] && cp /etc/resolv.conf $tmpfile case "$arg1" in "-a") -- cgit v0.9.0.2