diff options
author | erdgeist <erdgeist@erdgeist.org> | 2006-02-06 02:16:30 +0000 |
---|---|---|
committer | erdgeist <erdgeist@erdgeist.org> | 2006-02-06 02:16:30 +0000 |
commit | 03175084a04ba3539d9abc41787b7e85288ab57a (patch) | |
tree | 1e67d64708220e2787f89e28cf890df689efacca | |
parent | e2f7a80daef27b9934aa6a65352ff0cdfeb8ab97 (diff) |
provide braces for variable expansion
-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 $* |