diff options
-rwxr-xr-x | ezjail.sh | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -17,7 +17,7 @@ ezjail_prefix=EZJAIL_PREFIX | |||
17 | 17 | ||
18 | name=ezjail | 18 | name=ezjail |
19 | rcvar=`set_rcvar` | 19 | rcvar=`set_rcvar` |
20 | load_rc_config $name | 20 | load_rc_config ${name} |
21 | 21 | ||
22 | ezjail_enable=${ezjail_enable:-"NO"} | 22 | ezjail_enable=${ezjail_enable:-"NO"} |
23 | 23 | ||
@@ -30,8 +30,8 @@ do_cmd() | |||
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 | [ -n "$*" ] && jail_list=`echo -n $* | tr -c "[:alnum:] " _` || echo -n "${message##_}" |
32 | jail_list=${jail_list:-`ls ${ezjail_prefix}/etc/ezjail/`} | 32 | jail_list=${jail_list:-`ls ${ezjail_prefix}/etc/ezjail/`} |
33 | jail_pass="" | 33 | jail_pass= |
34 | for jail in $jail_list; do | 34 | for jail in ${jail_list}; do |
35 | if [ -f ${ezjail_prefix}/etc/ezjail/${jail} ]; then | 35 | if [ -f ${ezjail_prefix}/etc/ezjail/${jail} ]; then |
36 | . ${ezjail_prefix}/etc/ezjail/${jail}; | 36 | . ${ezjail_prefix}/etc/ezjail/${jail}; |
37 | jail_pass="${jail_pass} ${jail}" | 37 | jail_pass="${jail_pass} ${jail}" |
@@ -39,7 +39,7 @@ do_cmd() | |||
39 | echo " Warning: Jail ${jail} not found." | 39 | echo " Warning: Jail ${jail} not found." |
40 | fi | 40 | fi |
41 | done | 41 | done |
42 | [ "$jail_pass" ] && sh /etc/rc.d/jail one${action} $jail_pass | 42 | [ "${jail_pass}" ] && sh /etc/rc.d/jail one${action} ${jail_pass} |
43 | } | 43 | } |
44 | 44 | ||
45 | run_rc_command $* | 45 | run_rc_command $* |