Define local variables just once
This commit is contained in:
@@ -37,6 +37,7 @@ usage() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
destroy_jail() {
|
destroy_jail() {
|
||||||
|
local OPTIONS
|
||||||
bastille_jail_base="${bastille_jailsdir}/${TARGET}" ## dir
|
bastille_jail_base="${bastille_jailsdir}/${TARGET}" ## dir
|
||||||
bastille_jail_log="${bastille_logsdir}/${TARGET}_console.log" ## file
|
bastille_jail_log="${bastille_logsdir}/${TARGET}_console.log" ## file
|
||||||
|
|
||||||
@@ -60,9 +61,9 @@ destroy_jail() {
|
|||||||
if [ "${bastille_zfs_enable}" = "YES" ]; then
|
if [ "${bastille_zfs_enable}" = "YES" ]; then
|
||||||
if [ -n "${bastille_zfs_zpool}" ]; then
|
if [ -n "${bastille_zfs_zpool}" ]; then
|
||||||
if [ -n "${TARGET}" ]; then
|
if [ -n "${TARGET}" ]; then
|
||||||
local OPTIONS="-r"
|
OPTIONS="-r"
|
||||||
if [ "${FORCE}" = "1" ]; then
|
if [ "${FORCE}" = "1" ]; then
|
||||||
local OPTIONS="-rf"
|
OPTIONS="-rf"
|
||||||
fi
|
fi
|
||||||
## remove jail zfs dataset recursively
|
## remove jail zfs dataset recursively
|
||||||
zfs destroy "${OPTIONS}" "${bastille_zfs_zpool}/${bastille_zfs_prefix}/jails/${TARGET}"
|
zfs destroy "${OPTIONS}" "${bastille_zfs_zpool}/${bastille_zfs_prefix}/jails/${TARGET}"
|
||||||
|
|||||||
Reference in New Issue
Block a user