[Fai-commit] r4918 - trunk/bin
lange at alioth.debian.org
lange at alioth.debian.org
Tue May 27 13:27:10 UTC 2008
Author: lange
Date: 2008-05-27 13:27:09 +0000 (Tue, 27 May 2008)
New Revision: 4918
Modified:
trunk/bin/make-fai-nfsroot
Log:
check if NFSROOT directory is mounted with bad options
Modified: trunk/bin/make-fai-nfsroot
===================================================================
--- trunk/bin/make-fai-nfsroot 2008-05-27 13:25:36 UTC (rev 4917)
+++ trunk/bin/make-fai-nfsroot 2008-05-27 13:27:09 UTC (rev 4918)
@@ -6,7 +6,7 @@
# make-fai-nfsroot -- create nfsroot directory and add additional packages
#
# This script is part of FAI (Fully Automatic Installation)
-# (c) 2000-2007 by Thomas Lange, lange at informatik.uni-koeln.de
+# (c) 2000-2008 by Thomas Lange, lange at informatik.uni-koeln.de
# Universitaet zu Koeln
#
#*********************************************************************
@@ -31,7 +31,7 @@
usage() {
cat <<-EOF
- Copyright (C) 1999-2007 Thomas Lange
+ Copyright (C) 1999-2008 Thomas Lange
Report bugs to <fai at informatik.uni-koeln.de>.
Usage: make-fai-nfsroot [OPTIONS]
@@ -239,6 +239,12 @@
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
call_debootstrap() {
+ # check if NFSROOT directory is mounted with bad options
+ fs=$(df $NFSROOT | tail -1 | awk '{print $6}')
+ if mount | grep "on $fs " | awk '{print $6}' | egrep -q "nosuid|nodev"; then
+ die "NFSROOT directory $NFSROOT is mounted using nosuid or nodev. Aborting"
+ fi
+
local dversion=$(dpkg -l debootstrap | grep debootstrap | cut -f7 -d' ')
echo "Creating base system using debootstrap version $dversion"
echo "Calling debootstrap $1 $NFSROOT $2"
More information about the Fai-commit
mailing list