[Lunar-commits] <moonbase> Fix: you can't link to /etc/ppp/resolv.conf if it does not exist.

Auke Kok sofar at foo-projects.org
Wed Jun 4 23:01:56 CEST 2008


commit f3c04b13b7076023101e47244ef128b093e1437b
Author: Auke Kok <auke at foo-projects.org>
Date:   Wed Jun 4 23:01:56 2008 +0200

    Fix: you can't link to /etc/ppp/resolv.conf if it does not exist.
    
    exposed by the iso builds - adding && to all the lines now shows that
    /etc/ppp/resolv.conf was linked before it existed. this will break the
    compile in an iso build. touching the file should work around that
    and hopefully not crash anything else.
    
    but why is this needed anyway? it should work fine without this file...
---
 net/ppp/BUILD |   39 ++++++++++++++++++++-------------------
 1 files changed, 20 insertions(+), 19 deletions(-)

diff --git a/net/ppp/BUILD b/net/ppp/BUILD
index 2e4d9cd..4d23131 100644
--- a/net/ppp/BUILD
+++ b/net/ppp/BUILD
@@ -1,29 +1,30 @@
 (
 
-        add_priv_group ppp &&
+  add_priv_group ppp &&
 
-        default_build &&
-        make install-etcppp &&
-        
-        mkdir  -p  /etc/ppp/{peers,chat}  &&
+  default_build &&
+  make install-etcppp &&
 
-        if ! [ -f /etc/resolv.conf ]; then
-                ln  -f  /etc/ppp/resolv.conf /etc/resolv.conf
-          fi &&
+  mkdir  -p  /etc/ppp/{peers,chat}  &&
 
-        install -m755  $SCRIPT_DIRECTORY/pon \
-                       $SCRIPT_DIRECTORY/poff  /usr/bin  &&
+  if ! [ -f /etc/resolv.conf ]; then
+    touch /etc/ppp/resolv.conf
+    ln  -f  /etc/ppp/resolv.conf /etc/resolv.conf
+  fi &&
 
-        if  [  !  -e  /etc/ppp/peers/isp  ];  then
-                install -m644  $SCRIPT_DIRECTORY/peers /etc/ppp/peers/isp
-          fi &&
+  install -m755  $SCRIPT_DIRECTORY/pon \
+     $SCRIPT_DIRECTORY/poff  /usr/bin  &&
 
-        if  [  !  -e  /etc/ppp/chat/isp  ];  then
-                install -m644  $SCRIPT_DIRECTORY/isp  /etc/ppp/chat/isp
-        fi &&
+  if  [  !  -e  /etc/ppp/peers/isp  ];  then
+    install -m644  $SCRIPT_DIRECTORY/peers /etc/ppp/peers/isp
+    fi &&
 
-        chown -R root:ppp /usr/sbin/pppd /etc/ppp &&
-        chmod 4750 /usr/sbin/pppd  &&
-        chmod 600 /etc/ppp/*-secrets
+  if  [  !  -e  /etc/ppp/chat/isp  ];  then
+          install -m644  $SCRIPT_DIRECTORY/isp  /etc/ppp/chat/isp
+  fi &&
+
+  chown -R root:ppp /usr/sbin/pppd /etc/ppp &&
+  chmod 4750 /usr/sbin/pppd  &&
+  chmod 600 /etc/ppp/*-secrets
 
 ) > $C_FIFO 2>&1


More information about the Lunar-commits mailing list