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

9.1-release9.2-releasereleng/10.0releng/10.0.1releng/10.0.2releng/10.0.3
Last change on this file since 0988d23 was 0988d23, checked in by Kris Moore <kris@…>, 18 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: 613 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}"
14SNAP="${2}"
15
16if [ -z "${JAILNAME}" ]
17then
18  echo "ERROR: No jail specified to start!"
19  exit 5
20fi
21
22if [ -z "${JDIR}" ]
23then
24  echo "ERROR: JDIR is unset!!!!"
25  exit 5
26fi
27
28JAILDIR="${JDIR}/${JAILNAME}"
29
30if [ ! -d "${JAILDIR}" ]
31then
32  echo "ERROR: No jail located at ${JAILDIR}"
33  exit 5
34fi
35
36rmZFSSnap "${JAILDIR}" "$SNAP"
Note: See TracBrowser for help on using the repository browser.