[Fai-commit] r3506 - in trunk: bin debian

fai-commit at lists.alioth.debian.org fai-commit at lists.alioth.debian.org
Mon Jun 12 12:17:13 UTC 2006


Author: lange
Date: 2006-06-12 12:17:12 +0000 (Mon, 12 Jun 2006)
New Revision: 3506

Modified:
   trunk/bin/make-fai-nfsroot
   trunk/debian/changelog
Log:
grep for string before appending to file (closes: 364748)


Modified: trunk/bin/make-fai-nfsroot
===================================================================
--- trunk/bin/make-fai-nfsroot	2006-06-12 12:13:04 UTC (rev 3505)
+++ trunk/bin/make-fai-nfsroot	2006-06-12 12:17:12 UTC (rev 3506)
@@ -247,8 +247,8 @@
     [ -d $NFSROOT/var/state ] || mkdir $NFSROOT/var/state
     cp -v $cfdir/sources.list $NFSROOT/etc/apt/sources.list
 
-    echo "127.0.0.1 localhost" >> etc/hosts
-    echo "$NFSROOT_ETC_HOSTS" >> etc/hosts
+    egrep -q "127.0.0.1" etc/hosts 2>/dev/null || echo "127.0.0.1 localhost" >> etc/hosts
+    egrep -q "$NFSROOT_ETC_HOSTS" etc/hosts 2>/dev/null || echo "$NFSROOT_ETC_HOSTS" >> etc/hosts
     [ -f $cfdir/preferences ] && cp -v $cfdir/preferences $NFSROOT/etc/apt
     # we need these option before installing the first package. So we
     # can't put this into fai-nfsroot /etc/apt/apt.conf.d/90fai

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2006-06-12 12:13:04 UTC (rev 3505)
+++ trunk/debian/changelog	2006-06-12 12:17:12 UTC (rev 3506)
@@ -6,6 +6,7 @@
   * create_ramdisk: make /etc/lvm writeable (closes: 365035)
   * do not call mkrwsize if directory doe not exist (closes: 365037)
   * lib/mkrw: add option -n
+  * make-fai-nfsroot: grep before appending to file (closes: 364748)
   
  -- Thomas Lange <lange at debian.org>  Mon, 12 Jun 2006 14:12:34 +0200
 




More information about the Fai-commit mailing list