From owner-freebsd-current Wed Dec 26 4: 4:12 2001 Delivered-To: freebsd-current@freebsd.org Received: from melchior.cuivre.fr.eu.org (melchior.enst.fr [137.194.161.6]) by hub.freebsd.org (Postfix) with ESMTP id 8214337B41B for ; Wed, 26 Dec 2001 04:04:09 -0800 (PST) Received: from melusine.cuivre.fr.eu.org (melusine.enst.fr [137.194.160.34]) by melchior.cuivre.fr.eu.org (Postfix) with ESMTP id C76E57E31 for ; Wed, 26 Dec 2001 13:04:06 +0100 (CET) Received: by melusine.cuivre.fr.eu.org (Postfix, from userid 1000) id 35BB685; Wed, 26 Dec 2001 13:04:06 +0100 (CET) Date: Wed, 26 Dec 2001 13:04:06 +0100 From: Thomas Quinot To: freebsd-current@freebsd.org Subject: reboot -p Message-ID: <20011226130406.A79031@melusine.cuivre.fr.eu.org> Reply-To: thomas@cuivre.fr.eu.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i 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 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) whould be unaffected and still pass RB_HALT|RB_POWEROFF when invoked as halt -p. What do others think of this change: --- reboot.c Thu Aug 2 12:01:20 2001 +++ /tmp/reboot.c Wed Dec 26 13:03:45 2001 @@ -93,7 +93,7 @@ break; case 'p': pflag = 1; - howto |= (RB_POWEROFF | RB_HALT); + howto |= RB_POWEROFF; break; case 'q': qflag = 1; -- Thomas.Quinot@Cuivre.FR.EU.ORG To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message