[Fai-commit] r3987 - trunk/bin

fai-commit at lists.alioth.debian.org fai-commit at lists.alioth.debian.org
Wed Sep 20 10:20:38 UTC 2006


Author: lange
Date: 2006-09-20 10:20:38 +0000 (Wed, 20 Sep 2006)
New Revision: 3987

Modified:
   trunk/bin/fai
Log:
replace $targetdir with $FAI_ROOT


Modified: trunk/bin/fai
===================================================================
--- trunk/bin/fai	2006-09-20 09:17:16 UTC (rev 3986)
+++ trunk/bin/fai	2006-09-20 10:20:38 UTC (rev 3987)
@@ -210,15 +210,14 @@
 
 # override FAI_ACTION later if a command line argument is given
 [ "$1" ] && action=$1
-[ "$2" ] && targetdir=$2 # only used for dirinst
+[ "$2" ] && export FAI_ROOT=$2 # only used for dirinst
 
 if [ X$action = Xdirinst ]; then
-    if [ -z "$targetdir" ]; then
+    if [ -z "$FAI_ROOT" ]; then
 	echo "Please specify a target directory. Aborted"
 	exit 3
     fi
     export NFSROOT=$(source $FAI_ETC_DIR/make-fai-nfsroot.conf; echo $NFSROOT)
-    export FAI_ROOT=$targetdir
 fi
 
 if [ $(id -u) != "0" ]; then
@@ -259,9 +258,9 @@
     set -a
     clean_exit() {
 	rm -f $stamp
-	[ -z "$targetdir" ] && return
-	[ -d $targetdir/proc/self ] && umount $targetdir/proc $targetdir/sys
-	[ -f /etc/init.d/udev ] && umount $targetdir/dev
+	[ -z "$FAI_ROOT" ] && return
+	[ -d $FAI_ROOT/proc/self ] && umount $FAI_ROOT/proc $FAI_ROOT/sys
+	[ -f /etc/init.d/udev ] && umount $FAI_ROOT/dev
     }
     set +a
     trap 'clean_exit' EXIT




More information about the Fai-commit mailing list