From owner-freebsd-current Thu Dec 27 9:43:19 2001 Delivered-To: freebsd-current@freebsd.org Received: from mail.rpi.edu (mail.rpi.edu [128.113.22.40]) by hub.freebsd.org (Postfix) with ESMTP id AA87737B416 for ; Thu, 27 Dec 2001 09:43:15 -0800 (PST) Received: from [128.113.24.47] (gilead.acs.rpi.edu [128.113.24.47]) by mail.rpi.edu (8.11.3/8.11.3) with ESMTP id fBRHh4M51958; Thu, 27 Dec 2001 12:43:05 -0500 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: <47197.1009447811@critter.freebsd.dk> References: <47197.1009447811@critter.freebsd.dk> Date: Thu, 27 Dec 2001 12:43:01 -0500 To: thomas@cuivre.fr.eu.org From: Garance A Drosihn Subject: Re: reboot -p Cc: freebsd-current@FreeBSD.ORG Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Scanned-By: MIMEDefang 2.1 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG >Thomas Quinot writes: >> Currently, when reboot is invoked with the '-p' command line flag >> (powerdown), it performs a shutdown with RB_HALT|RB_POWEROFF. >> In some situations, it can be useful to try to perform a poweroff, >> but reboot if it fails (e.g. when you are shutting down the system >> as a result of a power failure, you want the system to reboot, > > *not* stay down, if power was restored after the start of the > > shutdown procedure). It would be nice if reboot was changed to > > pass only RB_POWEROFF (without RB_HALT) when invoked with '-p'. > > Of course halt(8) would be unaffected and still pass > > RB_HALT|RB_POWEROFF when invoked as halt -p. > > > >What do others think of this change: If I understand what you are saying, the situation that you describe seems odd to me. If I do the command: shutdown -p now Power Failure\! then I expect the machine to power-off if possible, or at least halt if a power-off is not possible. Why would I want it to immediately reboot in that situation? If I understand your request, you would want shutdown -p now to behave the same as shutdown -r now if the operating system does not know how to power down the hardware. Is that what you want? I guess I don't object to that, if that's what you want, but it does seem a little odd to me. I assume that an explicit shutdown -h -p now would still halt the machine if the OS doesn't know how to power off the machine. By the way, what happens right now if someone does a shutdown -r -p now ? Does that behave the way you want for your situation? -- Garance Alistair Drosehn = gad@eclipse.acs.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message