[PC-BSD Commits] r18077 - pcbsd/current/src-sh/warden/scripts/backend

svn at pcbsd.org svn at pcbsd.org
Wed Aug 1 11:32:08 PDT 2012


Author: kris
Date: 2012-08-01 18:32:08 +0000 (Wed, 01 Aug 2012)
New Revision: 18077

Modified:
   pcbsd/current/src-sh/warden/scripts/backend/startjail.sh
Log:

Don't try to start a jail if the users NIC is gone



Modified: pcbsd/current/src-sh/warden/scripts/backend/startjail.sh
===================================================================
--- pcbsd/current/src-sh/warden/scripts/backend/startjail.sh	2012-08-01 18:30:02 UTC (rev 18076)
+++ pcbsd/current/src-sh/warden/scripts/backend/startjail.sh	2012-08-01 18:32:08 UTC (rev 18077)
@@ -29,6 +29,13 @@
   exit 5
 fi
 
+# Check if we have a valid NIC
+ifconfig $NIC 2>/dev/null >/dev/null
+if [ $? -ne 0 ] ; then
+   echo "ERROR: Invalid network interface specified: $NIC"
+   exit 6
+fi
+
 # Make sure the jail is NOT already running
 jls | grep ${JDIR}/${IP} >/dev/null 2>/dev/null
 if [ "$?" = "0" ]



More information about the Commits mailing list