blob: 6b3647793ea02d7a834454a16b22430dc5a5c5f0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
--- ./pppsetup.orig Sun May 19 19:01:29 2002
+++ ./pppsetup Sun May 19 19:06:07 2002
@@ -861,10 +861,12 @@
echo "multi on" >> /etc/host.conf
fi
-if [ ! -z $DOMAINNAME ]; then
+if [ ! -z $DOMAINNAME ]; then
+# backup file
+cp -a /etc/resolv.conf /etc/resolv.conf.$$ 2> /dev/null
echo "search $DOMAINNAME" > /etc/resolv.conf
else
-rm -f /etc/resolv.conf 2>/dev/null
+rm -f /etc/resolv.conf 2>/dev/null
DOMAINNAME="unknown.com"
fi
@@ -875,6 +877,8 @@
fi
if [ ! -s /etc/hosts ]; then
+# backup file
+cp -a /etc/hosts /etc/hosts.bak.$$ 2> /dev/null
echo "127.0.0.1 localhost" > /etc/hosts
if [ "$DOMAINNAME" = "unknown.com" ]; then
echo "0.0.0.0 `hostname 2>/dev/null`.localnet `hostname 2>/dev/null`" >> /etc/hosts
|