Changeset 1f8e4d7


Ignore:
Timestamp:
05/02/13 10:07:01 (18 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, 9.2-release, releng/10.0, releng/10.0.1, releng/10.0.2, releng/10.0.3
Children:
101a6c2
Parents:
ee0d658
Message:

Add initial support for creating new jail templates via the "warden template create"
command-line option

Location:
src-sh
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • src-sh/port-files/pkg-plist

    rd9cad7c r1f8e4d7  
    3131share/warden/scripts/backend/checkupdates.sh 
    3232share/warden/scripts/backend/createjail.sh 
     33share/warden/scripts/backend/createtemplate.sh 
    3334share/warden/scripts/backend/zfslistsnap.sh 
    3435share/warden/scripts/backend/zfsrevertsnap.sh 
  • src-sh/warden/bin/warden

    re50ac20 r1f8e4d7  
    6363         stop - Stops a jail 
    6464         type - Set the jail type (portjail|pluginjail|standard) 
     65     template - Manage jail templates 
    6566    zfsmksnap - Create a ZFS snapshot of a jail  
    6667 zfslistclone - List clones of jail snapshots 
     
    324325 
    325326  warden details myjail 
     327" 
     328}; 
     329 
     330help_template() 
     331{ 
     332 title 
     333 echo "Help template 
     334 
     335Manage the jail templates used to create new FreeBSD jails 
     336 
     337Required subcommands: 
     338 
     339  create - Create a new jail template 
     340  delete - Delete a jail template 
     341    list - List jail templates on system 
     342 
     343Flags: 
     344 
     345  create: 
     346     -fbsd <version>   - FreeBSD Version, 9.1-RELEASE, 9.0-RELEASE, etc 
     347     -trueos <version> - TrueOS Version, 9-TRUEOS, 10-TRUEOS, etc 
     348     -arch <arch type> - System architecture, i386/amd64 
     349     -tar <file>       - Use tar archive as template contents (Ignores -arch / -fbsd) 
     350     -nick <nickname>  - Template nickname for creating jails / deleting templates 
     351 
     352Usage: 
     353 
     354  warden template create <flags> 
     355   or 
     356  warden template delete <template nickname> 
     357   or 
     358  warden template list 
     359 
     360Example: 
     361 
     362  warden template create -fbsd 9.1-RELEASE -arch amd64 -nick 91amd64 
    326363" 
    327364}; 
     
    634671           pkgs) help_pkgs ;; 
    635672           pbis) help_pbis ;; 
     673           template) help_template ;; 
    636674           type) help_type ;; 
    637675           get) help_get ;; 
     
    680718         $EDITOR ${JMETADIR}/fstab 
    681719         exit $? 
     720         ;; 
     721template) require_root 
     722         OPT="$2" 
     723         case $OPT in 
     724            create) shift ; shift; ${PROGDIR}/scripts/backend/createtemplate.sh $* ;; 
     725            delete) delete_template $3 ;; 
     726              list) list_templates ;; 
     727                 *) help_template ; exit 1 ;; 
     728         esac 
    682729         ;; 
    683730    get) require_root 
Note: See TracChangeset for help on using the changeset viewer.