[Fai-commit] r5803 - in trunk: bin debian man

Thomas Lange lange at alioth.debian.org
Mon Jun 14 18:26:36 UTC 2010


Author: lange
Date: 2010-06-14 18:26:36 +0000 (Mon, 14 Jun 2010)
New Revision: 5803

Modified:
   trunk/bin/make-fai-nfsroot
   trunk/debian/changelog
   trunk/man/make-fai-nfsroot.8
Log:
make-fai-nfsroot, make-fai-nfsroot.8: add option -B, (closes: #576092)
(thanks to Mika Prokop for the patch)

Modified: trunk/bin/make-fai-nfsroot
===================================================================
--- trunk/bin/make-fai-nfsroot	2010-06-14 11:47:53 UTC (rev 5802)
+++ trunk/bin/make-fai-nfsroot	2010-06-14 18:26:36 UTC (rev 5803)
@@ -87,9 +87,10 @@
 fi
 
 # option e currently does nothing
-while getopts hervC:f:kKpU opt ; do
+while getopts hervC:B:f:kKpU opt ; do
     case "$opt" in
         C) cfdir=$OPTARG ;;
+        B) basetgz=$OPTARG ;;
         v) verbose=1 ; v=-v ;;
         r) recover=1 ;;
         f) die "Option -f is not supported any more. Use option -C instead" ;;
@@ -283,12 +284,31 @@
     fi
 }
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+extract_base() {
+
+    if [ ! -r "$basetgz" ] ; then
+      die "Specified $basetgz could not be used."
+    else
+       if cd $NFSROOT ; then
+	 printf "Extracting $basetgz: "
+	 tar -C $NFSROOT -zxpf "$basetgz" || die "Error while extracting ${basetgz} in ${NFSROOT}."
+	 cp "$basetgz" $NFSROOT/var/tmp/base.tgz
+	 touch $NFSROOT/.THIS_IS_THE_FAI_NFSROOT
+	 echo done
+       fi
+    fi
+}
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 create_nfsroot() {
 
     mkdir -p $NFSROOT/$FAI
     cd $NFSROOT || die "Can't cd to $NFSROOT"
 
-    call_with_stamp create_base
+    if [ -n "$basetgz" ] ; then
+      call_with_stamp extract_base
+    else
+      call_with_stamp create_base
+    fi
     # save the list of all packages in the base.tgz
     $ROOTCMD dpkg --get-selections | awk '/install$/ {print $1}' > var/tmp/base-pkgs.lis
 

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2010-06-14 11:47:53 UTC (rev 5802)
+++ trunk/debian/changelog	2010-06-14 18:26:36 UTC (rev 5803)
@@ -7,8 +7,10 @@
   * sources.list: fix security.geo.debian.org domain entries
   * install_packages: Fix typo in info message (thanks Adrian Glaubitz)
   * updatebase: remove pre-lenny code
+  * make-fai-nfsroot, make-fai-nfsroot.8: add option -B, (closes: #576092)
+    (thanks to Mika Prokop for the patch)
 
- -- Thomas Lange <lange at debian.org>  Sun, 13 Jun 2010 22:16:24 +0200
+ -- Thomas Lange <lange at debian.org>  Mon, 14 Jun 2010 20:26:25 +0200
 
 fai (3.3.5) unstable; urgency=high
 

Modified: trunk/man/make-fai-nfsroot.8
===================================================================
--- trunk/man/make-fai-nfsroot.8	2010-06-14 11:47:53 UTC (rev 5802)
+++ trunk/man/make-fai-nfsroot.8	2010-06-14 18:26:36 UTC (rev 5803)
@@ -1,7 +1,7 @@
 .\"                                      Hey, EMACS: -*- nroff -*-
 .if \n(zZ=1 .ig zZ
 .if \n(zY=1 .ig zY
-.TH make-fai-nfsroot 8 "19 april 2009" "FAI 3.2"
+.TH make-fai-nfsroot 8 "14 june 2010" "FAI 3"
 .de }1
 .ds ]X \&\\*(]B\\
 .nr )E 0
@@ -37,6 +37,10 @@
 successfully and >0 if an error occurs.
 .SH OPTIONS
 .TP
+.B \-B BASETGZ
+Use specified BASETGZ file as base.tgz for the nfsroot. This avoids
+calling debootstrap and therefore reduces the buildtime for the nfsroot.
+.TP
 .B \-C CFDIR
 Use CFDIR as configuration directory. Default is /etc/fai. You can
 also set the environment variable FAI_ETC_DIR.




More information about the Fai-commit mailing list