Ignore:
Timestamp:
May 3, 2013 9:24:32 AM (12 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, 9.2-release, releng/10.0, releng/10.0.1
Children:
95952b3
Parents:
411e12f
Message:

Add --template option to warden create, now you can use any old template
for making a new jail :)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-sh/warden/scripts/backend/createjail.sh

    rce6fcd7 rfda1ea4  
    165165# as easy as doing a zfs clone. 
    166166# 
    167 if [ "${PLUGINJAIL}" = "YES" -a ! -e "${WORLDCHROOT}" ] ; then 
     167if [ "${PLUGINJAIL}" = "YES" -a ! -e "${WORLDCHROOT}" -a -z "$TEMPLATE" ] ; then 
    168168  if [ ! -e "${WORLDCHROOT_STANDARD}" ] ; then 
    169169    downloadchroot "${WORLDCHROOT_STANDARD}" 
     
    195195  fi 
    196196 
    197 elif [ ! -e "${WORLDCHROOT}" -a "${LINUXJAIL}" != "YES" ] ; then 
     197elif [ ! -e "${WORLDCHROOT}" -a "${LINUXJAIL}" != "YES" -a -z "$TEMPLATE" ] ; then 
    198198  downloadchroot "${WORLDCHROOT}" 
    199199fi 
     
    218218 
    219219echo "Building new Jail... Please wait..." 
     220 
     221# Are we using a jail template to build / clone? 
     222if [ -n "$TEMPLATE" ] ; then 
     223   # Reset WORLDCHROOT to the dir we will clone / file to extract 
     224   WORLDCHROOT="${JDIR}/.warden-template-$TEMPLATE" 
     225   isDirZFS "${JDIR}" 
     226   if [ $? -ne 0 ] ; then 
     227     WORLDCHROOT="${WORLDCHROOT}.tbz" 
     228   fi 
     229fi 
    220230 
    221231isDirZFS "${JDIR}" 
     
    340350fi 
    341351 
    342 # Setup PC-BSD PKGNG repo / utilities 
    343 if [ "$VANILLA" != "YES" ] ; then 
     352# Setup TrueOS PKGNG repo / utilities only if on TRUEOS 
     353if [ "$VANILLA" != "YES" -a -e "${JAILDIR}/etc/rc.delay" ] ; then 
    344354  bootstrap_pkgng "${JAILDIR}" 
    345355  if [ $? -ne 0 ] ; then 
Note: See TracChangeset for help on using the changeset viewer.