From 03175084a04ba3539d9abc41787b7e85288ab57a Mon Sep 17 00:00:00 2001 From: erdgeist Date: Mon, 6 Feb 2006 02:16:30 +0000 Subject: provide braces for variable expansion --- ezjail.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ezjail.sh') diff --git a/ezjail.sh b/ezjail.sh index 2869de2..a82de91 100755 --- a/ezjail.sh +++ b/ezjail.sh @@ -17,7 +17,7 @@ ezjail_prefix=EZJAIL_PREFIX name=ezjail rcvar=`set_rcvar` -load_rc_config $name +load_rc_config ${name} ezjail_enable=${ezjail_enable:-"NO"} @@ -30,8 +30,8 @@ do_cmd() action=$1; message=$2; shift 2; [ -n "$*" ] && jail_list=`echo -n $* | tr -c "[:alnum:] " _` || echo -n "${message##_}" jail_list=${jail_list:-`ls ${ezjail_prefix}/etc/ezjail/`} - jail_pass="" - for jail in $jail_list; do + jail_pass= + for jail in ${jail_list}; do if [ -f ${ezjail_prefix}/etc/ezjail/${jail} ]; then . ${ezjail_prefix}/etc/ezjail/${jail}; jail_pass="${jail_pass} ${jail}" @@ -39,7 +39,7 @@ do_cmd() echo " Warning: Jail ${jail} not found." fi done - [ "$jail_pass" ] && sh /etc/rc.d/jail one${action} $jail_pass + [ "${jail_pass}" ] && sh /etc/rc.d/jail one${action} ${jail_pass} } run_rc_command $* -- cgit v1.2.3