Date: Tue, 29 Aug 2000 15:15:08 -0500 (CDT) From: Mike Meyer <mwm@mired.org> To: Ronald Klop <ronald@klop.yi.org> Cc: questions@freebsd.org Subject: detecting reboot Message-ID: <14764.6604.38405.949046@guru.mired.org> In-Reply-To: <84696825@toto.iv>
next in thread | previous in thread | raw e-mail | index | archive | help
Ronald Klop writes: > 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. Ok, I'm curious - why do you want to do this? Answering could benefit you as well, as someone may have a better way of doing what you're trying to do than this particular test. My solution would be to tweak init to leave a cookie whenever it either forked a single user shell, or shut down to single user, depending on how you wanted to count the case of booting to single user and then going multi-user. The script could then check for the existence (or lack thereof) of the cookie. Having the source is a *wonderful* thing. <mike To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?14764.6604.38405.949046>