From owner-freebsd-questions Tue Aug 29 1:30: 9 2000 Delivered-To: freebsd-questions@freebsd.org Received: from wantadilla.lemis.com (wantadilla.lemis.com [192.109.197.80]) by hub.freebsd.org (Postfix) with ESMTP id 0EAF737B43C for ; Tue, 29 Aug 2000 01:30:04 -0700 (PDT) Received: (from grog@localhost) by wantadilla.lemis.com (8.11.0/8.9.3) id e7T8Tqt29259; Tue, 29 Aug 2000 17:59:52 +0930 (CST) (envelope-from grog) Date: Tue, 29 Aug 2000 17:59:52 +0930 From: Greg Lehey To: Ronald Klop Cc: freebsd-questions@FreeBSD.ORG Subject: Re: detecting reboot Message-ID: <20000829175952.K11422@wantadilla.lemis.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: ; from ronald@klop.yi.org on Tue, Aug 29, 2000 at 10:06:54AM +0200 Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-418-838-708 WWW-Home-Page: http://www.lemis.com/~grog X-PGP-Fingerprint: 6B 7B C3 8C 61 CD 54 AF 13 24 52 F8 6D A4 95 EF Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tuesday, 29 August 2000 at 10:06:54 +0200, Ronald Klop wrote: > How do I detect in a script in /usr/local/etc/rc.d that the machine just > rebooted in stead of going to single-user and back to multi-user. > > In the login-log (last | head) is no difference between the two > situations. And looking at an uptime of 0 days is not really accurate, > because a shutdown more times a day is possible. Right, but an uptime of less than a minute probably means that you've just rebooted. Greg -- When replying to this message, please copy the original recipients. For more information, see http://www.lemis.com/questions.html Finger grog@lemis.com for PGP public key See complete headers for address and phone numbers To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message