Date: Sat, 3 Dec 2005 16:24:39 -0800 (PST) From: crapsh@monkeybrains.net To: FreeBSD-gnats-submit@FreeBSD.org Subject: conf/89911: [patch] /etc/rc.d/jail restart ignores command line jail_list Message-ID: <200512040024.jB40Odeu064314@crepe2.monkeybrains.net> Resent-Message-ID: <200512040140.jB41e7mu031140@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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@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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200512040024.jB40Odeu064314>