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

svn at pcbsd.org svn at pcbsd.org
Wed Aug 1 17:47:48 PDT 2012


Author: kris
Date: 2012-08-02 00:47:48 +0000 (Thu, 02 Aug 2012)
New Revision: 18086

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

Fix creating jails with full hostnames with a "." in them.



Modified: pcbsd/current/src-sh/warden/scripts/backend/startjail.sh
===================================================================
--- pcbsd/current/src-sh/warden/scripts/backend/startjail.sh	2012-08-02 00:42:19 UTC (rev 18085)
+++ pcbsd/current/src-sh/warden/scripts/backend/startjail.sh	2012-08-02 00:47:48 UTC (rev 18086)
@@ -121,10 +121,18 @@
 fi
 
 # Start the jail now
-echo "jail -c name=${HOST} path=${JDIR}/${IP} host.hostname=${HOST} ${_ipflags} ${jFlags} persist"
-jail -c name=${HOST} path=${JDIR}/${IP} host.hostname=${HOST} ${_ipflags} ${jFlags} persist
+echo "jail -c path=${JDIR}/${IP} host.hostname=${HOST} ${_ipflags} ${jFlags} persist"
+jail -c path=${JDIR}/${IP} host.hostname=${HOST} ${_ipflags} ${jFlags} persist
 if [ $? -ne 0 ] ; then
    echo "ERROR: Failed starting jail with above command..."
+
+   # Do cleanup now
+   isV6 "${_ip}"
+   if [ $? -eq 0 ] ; then
+      ifconfig $NIC inet6 ${_ip} delete
+   else
+      ifconfig $NIC inet -alias ${_ip}
+   fi
    umountjailxfs "${IP}"
    exit 1
 fi



More information about the Commits mailing list