[PC-BSD Commits] r1999 - pcbsd-projects/warden/scripts/backend

svn at pcbsd.org svn at pcbsd.org
Fri May 30 11:13:32 PDT 2008


Author: kris
Date: 2008-05-30 11:13:32 -0700 (Fri, 30 May 2008)
New Revision: 1999

Modified:
   pcbsd-projects/warden/scripts/backend/installinmate.sh
Log:

Make sure that inmates are installed only when the jail is running



Modified: pcbsd-projects/warden/scripts/backend/installinmate.sh
===================================================================
--- pcbsd-projects/warden/scripts/backend/installinmate.sh	2008-05-30 18:01:56 UTC (rev 1998)
+++ pcbsd-projects/warden/scripts/backend/installinmate.sh	2008-05-30 18:13:32 UTC (rev 1999)
@@ -89,6 +89,15 @@
   echo "Warning: Inmate was created on `cat inmate-platform` currently running $ARCH"
 fi
 
+# Check if the jail is running first
+${PROGDIR}/scripts/backend/checkstatus.sh "${IP}"
+if [ "$?" != "0" ]
+then
+  # Make sure the jail is started
+  ${PROGDIR}/scripts/backend/startjail.sh "${IP}" >/dev/null 2>/dev/null
+fi
+
+
 echo "Installing $INAME-$IVER into ${IP}..."
 
 SKIP="`awk '/^___INMATE_START___/ { print NR + 1; exit 0; }' ${IFILE}`"



More information about the Commits mailing list