[Fai-commit] r4704 - trunk/bin

lange at alioth.debian.org lange at alioth.debian.org
Sun Nov 11 10:23:45 UTC 2007


Author: lange
Date: 2007-11-11 10:23:45 +0000 (Sun, 11 Nov 2007)
New Revision: 4704

Modified:
   trunk/bin/fai-mirror
Log:
mkdir mountpoint before mounting (closes: #365004)


Modified: trunk/bin/fai-mirror
===================================================================
--- trunk/bin/fai-mirror	2007-11-11 10:23:26 UTC (rev 4703)
+++ trunk/bin/fai-mirror	2007-11-11 10:23:45 UTC (rev 4704)
@@ -25,11 +25,10 @@
 # MA 02111-1307, USA.
 #*********************************************************************
 
-version="Version 1.9.8, 7-september-2007"
+version="Version 1.9.9, 11-november-2007"
 
 # variables: NFSROOT, FAI_CONFIGDIR, FAI_ETC_DIR
 
-export FAI_ROOT=/ # do not execute in chroot
 export PATH=$PATH:/usr/sbin
 
 trap "umount_dirs" EXIT ERR
@@ -100,7 +99,7 @@
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 umount_dirs() {
 
-    [ "$FAI_DEBMIRROR" ] && umount $FAI_ROOT/$MNTPOINT 2>/dev/null 1>&2 || true
+    [ "$FAI_DEBMIRROR" ] && umount $MNTPOINT 2>/dev/null 1>&2 || true
 }
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 cleandirs() {
@@ -280,7 +279,8 @@
 # otherwise mounting is not needed. call task_mirror
 
 if [ "$FAI_DEBMIRROR" ]; then
-    mount -r $FAI_DEBMIRROR $FAI_ROOT/$MNTPOINT || exit 9
+    mkdir -p $MNTPOINT
+    mount -r $FAI_DEBMIRROR $MNTPOINT || exit 9
 fi
 
 # TODO: use -p to preserve sources.list




More information about the Fai-commit mailing list