summaryrefslogtreecommitdiff
path: root/ezjail.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ezjail.sh')
-rwxr-xr-xezjail.sh19
1 files changed, 10 insertions, 9 deletions
diff --git a/ezjail.sh b/ezjail.sh
index 0d0a247..f683f48 100755
--- a/ezjail.sh
+++ b/ezjail.sh
@@ -28,18 +28,19 @@ stop_cmd="do_cmd stop '_ ezjail'"
28do_cmd() 28do_cmd()
29{ 29{
30 action=$1; message=$2; shift 2; 30 action=$1; message=$2; shift 2;
31 [ -n "$*" ] && jail_list=`echo -n $* | tr -c "[:alnum:] " _` || echo -n "${message##_}" 31 ezjail_list=
32 jail_list=${jail_list:-`ls ${ezjail_prefix}/etc/ezjail/`} 32 [ -n "$*" ] && ezjail_list=`echo -n $* | tr -c "[:alnum:] " _` || echo -n "${message##_}"
33 jail_pass= 33 ezjail_list=${ezjail_list:-`ls ${ezjail_prefix}/etc/ezjail/`}
34 for jail in ${jail_list}; do 34 ezjail_pass=
35 if [ -f ${ezjail_prefix}/etc/ezjail/${jail} ]; then 35 for ezjail in ${ezjail_list}; do
36 . ${ezjail_prefix}/etc/ezjail/${jail} 36 if [ -f ${ezjail_prefix}/etc/ezjail/${ezjail} ]; then
37 jail_pass="${jail_pass} ${jail}" 37 . ${ezjail_prefix}/etc/ezjail/${ezjail}
38 ezjail_pass="${ezjail_pass} ${ezjail}"
38 else 39 else
39 echo " Warning: Jail ${jail} not found." 40 echo " Warning: Jail ${ezjail} not found."
40 fi 41 fi
41 done 42 done
42 [ "${jail_pass}" ] && sh /etc/rc.d/jail one${action} ${jail_pass} 43 [ "${ezjail_pass}" ] && sh /etc/rc.d/jail one${action} ${ezjail_pass}
43} 44}
44 45
45run_rc_command $* 46run_rc_command $*