From 90caf58048fc0351621ee656e7d08ea1d851177e Mon Sep 17 00:00:00 2001 From: erdgeist Date: Mon, 11 Jan 2010 03:23:23 +0000 Subject: Make non runnable jails stoppable --- ezjail.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ezjail.sh b/ezjail.sh index 49d43cb..ae4ffb2 100755 --- a/ezjail.sh +++ b/ezjail.sh @@ -50,8 +50,9 @@ do_cmd() fi for ezjail in ${ezjail_list}; do - # If jail is temporary disabled (dot in name), skip it - [ -f "${ezjail_prefix}/etc/ezjail/${ezjail}.norun" -o "${ezjail%.*}" != "${ezjail}" ] && echo -n " skipping ${ezjail}" && continue + # If jail is temporary disabled (dot in name), skip it for starts + case "${action}" in *stop) ezjail=${ezjail%%.*};; esac + [ "${ezjail%.*}" != "${ezjail}" ] && echo -n " skipping ${ezjail}" && continue # Check for jails config [ ! -r "${ezjail_prefix}/etc/ezjail/${ezjail}" ] && echo " Warning: Jail ${ezjail} not found." && continue -- cgit v1.2.3