From owner-freebsd-isp Thu Feb 15 22:53:29 2001 Delivered-To: freebsd-isp@freebsd.org Received: from ns.internet.dk (ns.internet.dk [194.19.140.1]) by hub.freebsd.org (Postfix) with ESMTP id 359CB37B491 for ; Thu, 15 Feb 2001 22:53:26 -0800 (PST) Received: (from uucp@localhost) by ns.internet.dk (8.11.2/8.11.2) id f1G6rOj89276 for freebsd-isp@FreeBSD.ORG.AVP; Fri, 16 Feb 2001 07:53:24 +0100 (CET) (envelope-from leifn@neland.dk) Received: (from uucp@localhost) by ns.internet.dk (8.11.2/8.11.2) with UUCP id f1G6rOC89217; Fri, 16 Feb 2001 07:53:24 +0100 (CET) (envelope-from leifn@neland.dk) Received: from localhost (localhost [127.0.0.1]) by arnold.neland.dk (8.11.1/8.11.0) with ESMTP id f1G6rDx11560; Fri, 16 Feb 2001 07:53:13 +0100 (CET) (envelope-from leifn@neland.dk) Date: Fri, 16 Feb 2001 07:53:13 +0100 (CET) From: Leif Neland To: Brian Reichert Cc: Udo Erdelhoff , freebsd-isp@FreeBSD.ORG Subject: Re: detecting uncontrolled reboot? In-Reply-To: <20010215141541.P91352@numachi.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Thu, 15 Feb 2001, Brian Reichert wrote: > On Thu, Feb 15, 2001 at 07:34:42PM +0100, Udo Erdelhoff wrote: > > Please not that this isn't 100% proof. For a better solution, you should > > convert the flag file into an entry in your database. After all, you don't > > care if the system crashes, you only care if the system crashes while > > your database is running. > > I do realize that how to handle a messy shutdown can vary on a > service-by-service basis. I was hoping to tap into that part of > the boot process that tries to mount the filesystema. > > I'm going to poke at patching 'rc'. I _think_ that if $1 is > 'autoboot', then it's beginning the disk checks. It'd be cool if > there was a 'dirty boot' kernel variable I could set... > Wouldn't just checking for a /var/db/mysql/${uname}.pid do? I think the pid-file is removed at a clean database shutdown. Leif To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isp" in the body of the message