conf/89911: [patch] /etc/rc.d/jail restart ignores command line
jail_list
crapsh at monkeybrains.net
crapsh at monkeybrains.net
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
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sun Dec 04 01:40:07 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Rudy Rucker
>Release: FreeBSD 6.0-STABLE amd64
>Organization:
MonkeyBrains.net
>Environment:
System: FreeBSD crepe2.monkeybrains.net 6.0-STABLE FreeBSD 6.0-STABLE #1: Mon Nov 28 15:19:29 PST 2005 root at crepe2.monkeybrains.net:/usr/obj/usr/src/sys/OPTERON amd64
>Description:
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 $*.
>How-To-Repeat:
/etc/rc.d/jail restart jail_name
>Fix:
--- jail Tue Oct 25 17:39:39 2005
+++ jail.new Sat Dec 3 16:15:43 2005
@@ -248,4 +248,16 @@
shift
fi
[ -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
+fi
+if [ $cmd = 'restart' ] && [ -n $jail_list ]; then
+ _jail_restart_list=$jail_list;
+ export _jail_restart_list
+fi
+
run_rc_command "${cmd}"
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list