[Fai-commit] r3154 - trunk/examples/simple/scripts/FAIBASE

fai-repository at svn.debian.org fai-repository at svn.debian.org
Mon Dec 5 23:13:00 UTC 2005


Author: lange
Date: 2005-12-05 23:12:59 +0000 (Mon, 05 Dec 2005)
New Revision: 3154

Modified:
   trunk/examples/simple/scripts/FAIBASE/30-interface
Log:
make more idempotent


Modified: trunk/examples/simple/scripts/FAIBASE/30-interface
===================================================================
--- trunk/examples/simple/scripts/FAIBASE/30-interface	2005-12-05 22:51:56 UTC (rev 3153)
+++ trunk/examples/simple/scripts/FAIBASE/30-interface	2005-12-05 23:12:59 UTC (rev 3154)
@@ -11,7 +11,7 @@
 	iface eth0 inet dhcp
 EOF
 else
-    cat > $target/etc/network/interfaces <<-EOF
+      [ -n "$IPADDR" ] && cat > $target/etc/network/interfaces <<-EOF
 	# generated by FAI
 	auto lo eth0
 	iface lo inet loopback
@@ -21,9 +21,9 @@
 	  broadcast $BROADCAST
 	  gateway $GATEWAYS
 EOF
-    echo "localnet $NETWORK" > $target/etc/networks
-    [ -s /tmp/etc/resolv.conf -a ! -L $target/etc/resolv.conf ] && cp -p /tmp/etc/resolv.conf $target/etc
-    fcopy -li /etc/resolv.conf
+    [ -n "$NETWORK" ] && echo "localnet $NETWORK" > $target/etc/networks
+    [ -s /tmp/etc/resolv.conf ] && cp -p /tmp/etc/resolv.conf $target/etc
+    fcopy -i /etc/resolv.conf
 fi
 
 # here fcopy is mostly used, when installing a client for running in a




More information about the Fai-commit mailing list