From owner-freebsd-questions Sat Jan 5 17:18:55 2002 Delivered-To: freebsd-questions@freebsd.org Received: from fremont.bolingbroke.com (adsl-216-102-90-210.dsl.snfc21.pacbell.net [216.102.90.210]) by hub.freebsd.org (Postfix) with ESMTP id B214A37B405 for ; Sat, 5 Jan 2002 17:18:47 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by fremont.bolingbroke.com (8.12.1/8.12.1) with ESMTP id g061IXs6095037; Sat, 5 Jan 2002 17:18:35 -0800 (PST) Date: Sat, 5 Jan 2002 17:18:33 -0800 (PST) From: Ken Bolingbroke X-X-Sender: ken@fremont.bolingbroke.com To: Ken McGlothlen Cc: questions@FreeBSD.ORG Subject: Re: Adding a message to shutdown. In-Reply-To: <87ell48gx6.fsf@ralf.artlogix.com> Message-ID: <20020105171522.C66447-100000@fremont.bolingbroke.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 5 Jan 2002, Ken McGlothlen wrote: > I know this must seem an incredibly minor point, but I'd like to write the > uptime to /var/log/messages before the system shuts down whenever I do > "shutdown" or "reboot" or the like. > > What would be the best way to go about that? I know I could hack it into > rc.shutdown or something, but is there a gentler way? I think the best approach would be to stick a *.sh script in /usr/local/etc that runs the following for the "stop" argument: /usr/bin/uptime | /usr/bin/logger Ken Bolingbroke hacker@bolingbroke.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message