diff options
author | erdgeist <erdgeist@erdgeist.org> | 2006-02-02 22:57:38 +0000 |
---|---|---|
committer | erdgeist <erdgeist@erdgeist.org> | 2006-02-02 22:57:38 +0000 |
commit | 1a43c488bc63ee815a24d85dd79fee6565996ed4 (patch) | |
tree | 7d96e48b1956830e24ab33b6fdeeeb0ddfee7eef /ezjail.sh | |
parent | c5753e553f67b34f64fa95cd03fbcfea41bacde0 (diff) |
Reflect character whitelisting in rc.d-script
Diffstat (limited to 'ezjail.sh')
-rwxr-xr-x | ezjail.sh | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -27,7 +27,7 @@ stop_cmd="do_stop" | |||
27 | 27 | ||
28 | do_start() | 28 | do_start() |
29 | { | 29 | { |
30 | [ -n "$*" ] && jail_list=`echo $* | tr /~. ___` || echo " ezjail" | 30 | [ -n "$*" ] && jail_list=`echo -n $* | tr -c [:alnum:] _` || echo " ezjail" |
31 | jail_list=${jail_list:-`ls ${ezjail_prefix}/etc/ezjail/`} | 31 | jail_list=${jail_list:-`ls ${ezjail_prefix}/etc/ezjail/`} |
32 | for jail in $jail_list; do . ${ezjail_prefix}/etc/ezjail/${jail}; done | 32 | for jail in $jail_list; do . ${ezjail_prefix}/etc/ezjail/${jail}; done |
33 | sh /etc/rc.d/jail onestart $jail_list | 33 | sh /etc/rc.d/jail onestart $jail_list |
@@ -35,7 +35,7 @@ do_start() | |||
35 | 35 | ||
36 | do_restart() | 36 | do_restart() |
37 | { | 37 | { |
38 | [ -n "$*" ] && jail_list=`echo $* | tr /~. ___`; | 38 | [ -n "$*" ] && jail_list=`echo -n $* | tr -c [:alnum:] _`; |
39 | jail_list=${jail_list:-`ls ${ezjail_prefix}/etc/ezjail/`} | 39 | jail_list=${jail_list:-`ls ${ezjail_prefix}/etc/ezjail/`} |
40 | for jail in $jail_list; do . ${ezjail_prefix}/etc/ezjail/${jail}; done | 40 | for jail in $jail_list; do . ${ezjail_prefix}/etc/ezjail/${jail}; done |
41 | sh /etc/rc.d/jail onestop $jail_list | 41 | sh /etc/rc.d/jail onestop $jail_list |
@@ -44,7 +44,7 @@ do_restart() | |||
44 | 44 | ||
45 | do_stop() | 45 | do_stop() |
46 | { | 46 | { |
47 | [ -n "$*" ] && jail_list=`echo $* | tr /~. ___` || echo " ezjail" | 47 | [ -n "$*" ] && jail_list=`echo -n $* | tr -c [:alnum:] _` || echo " ezjail" |
48 | jail_list=${jail_list:-`ls ${ezjail_prefix}/etc/ezjail/`} | 48 | jail_list=${jail_list:-`ls ${ezjail_prefix}/etc/ezjail/`} |
49 | for jail in $jail_list; do . ${ezjail_prefix}/etc/ezjail/${jail}; done | 49 | for jail in $jail_list; do . ${ezjail_prefix}/etc/ezjail/${jail}; done |
50 | sh /etc/rc.d/jail onestop $jail_list | 50 | sh /etc/rc.d/jail onestop $jail_list |