source: src-sh/warden/scripts/backend/zfsrmclone.sh @ 0988d23

9.1-release9.2-releasereleng/10.0releng/10.0.1releng/10.0.2releng/10.0.3releng/10.1
Last change on this file since 0988d23 was 0988d23, checked in by Kris Moore <kris@…>, 21 months ago

Add my working directory for the new warden backend changes.

Includes patches from John Hixson (john@…) to change
how warden uses "nicknames" instead of IP addresses for jail
identification.

  • Property mode set to 100755
File size: 711 bytes
Line 
1#!/bin/sh
2# ZFS functionality
3# Args $1 = jail-name
4# Args $2 = zfs directive
5#######################################################################
6
7# Source our functions
8PROGDIR="/usr/local/share/warden"
9
10# Source our variables
11. ${PROGDIR}/scripts/backend/functions.sh
12
13JAILNAME="${1}"
14CLONE="${2}"
15
16if [ -z "${CLONE}" ] ; then
17   echo "ERROR: No clone specified!"
18   exit 1
19fi
20
21if [ -z "${JAILNAME}" ]
22then
23  echo "ERROR: No jail specified to start!"
24  exit 5
25fi
26
27if [ -z "${JDIR}" ]
28then
29  echo "ERROR: JDIR is unset!!!!"
30  exit 5
31fi
32
33JAILDIR="${JDIR}/${JAILNAME}"
34
35if [ ! -d "${JAILDIR}" ]
36then
37  echo "ERROR: No jail located at ${JAILDIR}"
38  exit 5
39fi
40
41rmZFSClone "${JAILDIR}" "${CLONE}" "${JAILNAME}"
Note: See TracBrowser for help on using the repository browser.