Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Sep 2015 04:05:28 +0000 (UTC)
From:      Hiroki Sato <hrs@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r287739 - stable/10/etc/rc.d
Message-ID:  <201509130405.t8D45SeG021175@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hrs
Date: Sun Sep 13 04:05:27 2015
New Revision: 287739
URL: https://svnweb.freebsd.org/changeset/base/287739

Log:
  MFC 287615:
  
  Use read to parse a line instead of set.

Modified:
  stable/10/etc/rc.d/jail
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/etc/rc.d/jail
==============================================================================
--- stable/10/etc/rc.d/jail	Sun Sep 13 04:02:52 2015	(r287738)
+++ stable/10/etc/rc.d/jail	Sun Sep 13 04:05:27 2015	(r287739)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201509130405.t8D45SeG021175>