From d7413d29ec10a275641469e261ae3ba79ec11805 Mon Sep 17 00:00:00 2001 From: Jose Date: Mon, 25 May 2020 19:35:38 -0400 Subject: [PATCH] Define local variables just once --- usr/local/share/bastille/destroy.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/usr/local/share/bastille/destroy.sh b/usr/local/share/bastille/destroy.sh index 5eff79f..b4c84a3 100644 --- a/usr/local/share/bastille/destroy.sh +++ b/usr/local/share/bastille/destroy.sh @@ -37,6 +37,7 @@ usage() { } destroy_jail() { + local OPTIONS bastille_jail_base="${bastille_jailsdir}/${TARGET}" ## dir bastille_jail_log="${bastille_logsdir}/${TARGET}_console.log" ## file @@ -60,9 +61,9 @@ destroy_jail() { if [ "${bastille_zfs_enable}" = "YES" ]; then if [ -n "${bastille_zfs_zpool}" ]; then if [ -n "${TARGET}" ]; then - local OPTIONS="-r" + OPTIONS="-r" if [ "${FORCE}" = "1" ]; then - local OPTIONS="-rf" + OPTIONS="-rf" fi ## remove jail zfs dataset recursively zfs destroy "${OPTIONS}" "${bastille_zfs_zpool}/${bastille_zfs_prefix}/jails/${TARGET}"