[Fai-commit] r4815 - trunk/bin

lange at alioth.debian.org lange at alioth.debian.org
Sat Dec 8 14:08:01 UTC 2007


Author: lange
Date: 2007-12-08 14:08:01 +0000 (Sat, 08 Dec 2007)
New Revision: 4815

Modified:
   trunk/bin/fai
Log:
check if target directory for dirinstall is mounted with nosuid,nodev


Modified: trunk/bin/fai
===================================================================
--- trunk/bin/fai	2007-12-08 14:07:07 UTC (rev 4814)
+++ trunk/bin/fai	2007-12-08 14:08:01 UTC (rev 4815)
@@ -223,6 +223,12 @@
 	exit 4
     fi
 
+    # 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
+	echo "Target directroy is mounted using nosuid or nodev. Aborting"
+	exit 5
+    fi
 
     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