diff options
author | hrs <hrs@FreeBSD.org> | 2015-09-13 04:05:27 +0000 |
---|---|---|
committer | hrs <hrs@FreeBSD.org> | 2015-09-13 04:05:27 +0000 |
commit | 312f8936e8f9983804df0fefddc4a55202c721ab (patch) | |
tree | 28b41d6a76b720a3e2a083656912908ff1af127c | |
parent | 7c3e3acd8e82fa5e996bc7b4a3417edffc319614 (diff) | |
download | FreeBSD-src-312f8936e8f9983804df0fefddc4a55202c721ab.zip FreeBSD-src-312f8936e8f9983804df0fefddc4a55202c721ab.tar.gz |
MFC 287615:
Use read to parse a line instead of set.
-rwxr-xr-x | etc/rc.d/jail | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/etc/rc.d/jail b/etc/rc.d/jail index ea62f48..d1307db 100755 --- a/etc/rc.d/jail +++ b/etc/rc.d/jail @@ -419,7 +419,7 @@ jail_status() jail_start() { - local _j _jid _jl + local _j _jid _jl _id _name if [ $# = 0 ]; then return @@ -432,10 +432,9 @@ jail_start() command_args="-f $jail_conf -c" _tmp=`mktemp -t jail` || exit 3 if $command $rc_flags $command_args >> $_tmp 2>&1; then - $jail_jls jid name | while read IN; do - set -- $IN - echo -n " $2" - echo $1 > /var/run/jail_$2.id + $jail_jls jid name | while read _id _name; do + echo -n " $_name" + echo $_id > /var/run/jail_${_name}.id done else tail -1 $_tmp |