[Fai-commit] r3108 - trunk/lib

fai-repository at svn.debian.org fai-repository at svn.debian.org
Sun Nov 27 00:17:07 UTC 2005


Author: lange
Date: 2005-11-27 00:17:06 +0000 (Sun, 27 Nov 2005)
New Revision: 3108

Modified:
   trunk/lib/subroutines-linux
Log:
fix idempotent code (closes: #340422)


Modified: trunk/lib/subroutines-linux
===================================================================
--- trunk/lib/subroutines-linux	2005-11-27 00:15:00 UTC (rev 3107)
+++ trunk/lib/subroutines-linux	2005-11-27 00:17:06 UTC (rev 3108)
@@ -132,8 +132,10 @@
     [ -f /tmp/etc/resolv.conf ] && cp /tmp/etc/resolv.conf $FAI_ROOT/etc
     [ -f /etc/hosts ] && cp /etc/hosts $FAI_ROOT/etc
     # set hostname in $FAI_ROOT
-    echo -e "$IPADDR\t$HOSTNAME.$DOMAIN $HOSTNAME" >>$FAI_ROOT/etc/hosts
-    echo $HOSTNAME >$FAI_ROOT/etc/hostname
+    if [ -f /var/run/fai//FAI_INSTALLATION_IN_PROGRESS ]; then
+      echo -e "$IPADDR\t$HOSTNAME.$DOMAIN $HOSTNAME" >>$FAI_ROOT/etc/hosts
+      echo $HOSTNAME >$FAI_ROOT/etc/hostname
+    fi
     cp -r /etc/apt/* $FAI_ROOT/etc/apt/
 }
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -




More information about the Fai-commit mailing list