From 7ffcc74f18c26ddce5cf8ccfc86e624a2c71c605 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Mon, 11 Jan 2010 04:06:54 +0000 Subject: Make non runnable jails stoppable, fourth attempt, non runnable now won't start now --- ezjail.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ezjail.sh b/ezjail.sh index 2bde07f..426025f 100755 --- a/ezjail.sh +++ b/ezjail.sh @@ -53,17 +53,17 @@ do_cmd() fi for ezjail in ${ezjail_list}; do - unset ezjail_config + unset ezjail_config ezjail_norun [ -e "${ezjail_cfgs}/${ezjail}" ] && ezjail_config="${ezjail_cfgs}/${ezjail}" - [ -e "${ezjail_cfgs}/${ezjail}.norun" ] && ezjail_config="${ezjail_cfgs}/${ezjail}.norun" + [ -e "${ezjail_cfgs}/${ezjail}.norun" ] && ezjail_config="${ezjail_cfgs}/${ezjail}.norun" && ezjail_norun="YES" # Check for jails config [ ! -f "${ezjail_config}" ] && echo " Warning: Jail ${ezjail} not found." && continue # If jail is temporary disabled (dot in name), skip it for starts [ "${ezjail_stop}" ] && ezjail="${ezjail%%.*}" - [ "${ezjail%.*}" != "${ezjail}" ] && echo -n " skipping ${ezjail}" && continue + [ "${ezjail%.*}" != "${ezjail}" -o "${ezjail_norun}" ] && echo -n " skipping ${ezjail}" && continue # Read config file . ${ezjail_config} -- cgit v1.2.3