conf/89911: [patch] /etc/rc.d/jail restart ignores command line jail_list

crapsh at crapsh at
Sun Dec 4 01:40:09 GMT 2005

>Number:         89911
>Category:       conf
>Synopsis:       [patch] /etc/rc.d/jail restart ignores command line jail_list
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Dec 04 01:40:07 GMT 2005
>Originator:     Rudy Rucker
>Release:        FreeBSD 6.0-STABLE amd64
System: FreeBSD 6.0-STABLE FreeBSD 6.0-STABLE #1: Mon Nov 28 15:19:29 PST 2005 root at amd64

The following command:
	/etc/rc.d/jail restart jail_name
Restarts all jails configured in /etc/rc.conf.
The more desirable result is for the restart command to act like the stop and start
commands.  These commands will stop and start *individual* jail(s) listed in $*.
	/etc/rc.d/jail restart jail_name

--- jail        Tue Oct 25 17:39:39 2005
+++    Sat Dec  3 16:15:43 2005
@@ -248,4 +248,16 @@
 [ -n "$*" ] && jail_list="$*"
+# restart calls 'stop' and 'start' and loses the jail_list
+# stop the jail_list from the command line in a variable and export it.
+# Check for it and reset the jail_list
+if [ -n "$_jail_restart_list" ]; then
+       jail_list=$_jail_restart_list
+if [ $cmd = 'restart' ] && [ -n $jail_list ]; then
+       _jail_restart_list=$jail_list;
+       export _jail_restart_list
 run_rc_command "${cmd}"  


More information about the freebsd-bugs mailing list