[Fai-commit] r4900 - trunk/bin

lange at alioth.debian.org lange at alioth.debian.org
Wed May 14 17:53:30 UTC 2008


Author: lange
Date: 2008-05-14 17:53:29 +0000 (Wed, 14 May 2008)
New Revision: 4900

Modified:
   trunk/bin/fai
Log:
fai: remove local, fix regex (closes: #480685)


Modified: trunk/bin/fai
===================================================================
--- trunk/bin/fai	2008-05-13 13:52:02 UTC (rev 4899)
+++ trunk/bin/fai	2008-05-14 17:53:29 UTC (rev 4900)
@@ -223,12 +223,17 @@
 	exit 4
     fi
 
+    # two lines taken from task_dirinstall
+    mkdir -p $FAI_ROOT
+    FAI_ROOT=$(cd $FAI_ROOT;pwd)
+
     # check if target directory is mounted with bad options
-    local fs=$(df $FAI_ROOT | tail -1 | awk '{print $6}')
-    if mount | grep "on $fs" |  awk '{print $6}' | egrep -q "nosuid|nodev"; then
+    fs=$(df $FAI_ROOT | tail -1 | awk '{print $6}')
+    if mount | grep "on $fs " |  awk '{print $6}' | egrep -q "nosuid|nodev"; then
 	echo "Target directory is mounted using nosuid or nodev. Aborting"
 	exit 5
     fi
+    unset fs
 
     export NFSROOT=$(source $FAI_ETC_DIR/make-fai-nfsroot.conf; echo $NFSROOT)
     export FAI_DEBOOTSTRAP=$(source $FAI_ETC_DIR/make-fai-nfsroot.conf; echo $FAI_DEBOOTSTRAP)




More information about the Fai-commit mailing list