Author: hrs
Date: Thu Sep 10 06:56:56 2015
New Revision: 287615
URL: https://svnweb.freebsd.org/changeset/base/287615

Log:
  Use read to parse a line instead of set.
  
  MFC after:    3 days

Modified:
  head/etc/rc.d/jail

Modified: head/etc/rc.d/jail
==============================================================================
--- head/etc/rc.d/jail  Thu Sep 10 06:55:28 2015        (r287614)
+++ head/etc/rc.d/jail  Thu Sep 10 06:56:56 2015        (r287615)
@@ -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
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to