[Fai-commit] r4133 - trunk/lib

Thomas Lange lange at alioth.debian.org
Fri Nov 3 00:36:30 CET 2006


Author: lange
Date: 2006-11-03 00:36:29 +0100 (Fri, 03 Nov 2006)
New Revision: 4133

Modified:
   trunk/lib/subroutines
Log:
cd back to old dir, convert relative path to absolute for dirinstall (closes: #390346)


Modified: trunk/lib/subroutines
===================================================================
--- trunk/lib/subroutines	2006-11-02 18:39:56 UTC (rev 4132)
+++ trunk/lib/subroutines	2006-11-02 23:36:29 UTC (rev 4133)
@@ -260,7 +260,6 @@
 	    task faiend
 	    ;;
 	dirinstall)
-	    echo "Installing into directory $FAI_ROOT"
 	    task dirinstall
 	    ;;
 	softupdate)
@@ -335,6 +334,7 @@
 task_defvar() {
 
     local svar=$LOGDIR/showvar.log
+    local odir=$(pwd)
     cd $FAI/class
     for class in $classes ; do
 	if [ -f $class.var ]; then
@@ -357,7 +357,7 @@
     unset class svar
     # now all variables are defined. Dump them to variables.log
     set | perl -ne 'print if /^\w\w+=/ and not /^(BASH_VERSINFO|EUID|PPID|SHELLOPTS|UID|rootpw|ROOTPW|HOME|PWD)/' > $LOGDIR/variables.log
-    cd /
+    cd $odir
 }
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 task_mountdisks() {
@@ -463,6 +463,8 @@
     > $stamp
 
     mkdir -p $FAI_ROOT
+    FAI_ROOT=$(cd $FAI_ROOT;pwd)
+    echo "Installing into directory $FAI_ROOT"
     task extrbase
     [ -f $target/etc/fstab ] || touch $target/etc/fstab
     task mirror




More information about the Fai-commit mailing list