Parcourir la source

:bug: fix soft link for reslov.conf

Jeremy Zheng il y a 2 ans
Parent
commit
5b202c2af8
1 fichiers modifiés avec 7 ajouts et 6 suppressions
  1. 7 6
      scripts/vbox-eth.sh

+ 7 - 6
scripts/vbox-eth.sh

@@ -17,14 +17,15 @@ ip address flush dev $3
 ip address add $1.$2/24 broadcast $1.255 dev $3
 ip address add $1.$2/24 broadcast $1.255 dev $3
 ip route add default via $1.1 dev $3
 ip route add default via $1.1 dev $3
 
 
-if [ ! -f /etc/resolv.conf.orig ]
-then
-    cp -v /etc/resolv.conf /etc/resolv.conf.orig
-fi
-
-cat > /etc/resolv.conf <EOF
+cat > /etc/resolv.conf.google <EOF
 nameserver 8.8.8.8
 nameserver 8.8.8.8
 nameserver 8.8.4.4
 nameserver 8.8.4.4
 EOF
 EOF
 
 
+
+if [ -L /etc/resolv.conf ]
+then
+    ln -svf /etc/resolv.conf.google /etc/resolv.conf
+fi
+
 echo 'done.'
 echo 'done.'