How to shut down

2003-09-17 Thread lrnobs
I am a new user learning about Unix. I found the shutdown command and have been using shutdown now to shut down before powering off. When the pc boots up it complains that it was incorrectly shut down. Am I following an incorrect procedure? Thanks, Larry Nobs

RE: How to shut down

2003-09-17 Thread Charles Howse
I am a new user learning about Unix. I found the shutdown command and have been using shutdown now to shut down before powering off. When the pc boots up it complains that it was incorrectly shut down. Am I following an incorrect procedure? 'shutdown now' will take you to single user

Re: How to shut down

2003-09-17 Thread Greg J.
On Wed, 17 Sep 2003 08:15:59 -0500 lrnobs [EMAIL PROTECTED] wrote: I am a new user learning about Unix. I found the shutdown command and have been using shutdown now to shut down before powering off. When the pc boots up it complains that it was incorrectly shut down. Am I following an

Re: How to shut down

2003-09-17 Thread Jon Mercer
'shutdown -p now' will switch off the computer if the PC supports APM or ACPI. Charles Howse wrote: I am a new user learning about Unix. I found the shutdown command and have been using shutdown now to shut down before powering off. When the pc boots up it complains that it was incorrectly

Re: How to shut down

2003-09-17 Thread lrnobs
Thanks to everyone who responded. Larry Nobs ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]

Re: How to shut down cleanly by killing power

2002-09-27 Thread Petri Riihikallio
I have a small program that monitors an APC smart 700 that does what you are talking about... I do not really remember how it does it. If you are interested I can email you the source code. Thank you, but I have the BackUPS 650, which is dumb. The serial control is completely different from

Re: How to shut down cleanly by killing power

2002-09-27 Thread Petri Riihikallio
Thanks for your reply! Maybe the question wasn't the clearest? The problem is hard to explain. The post should be short, but include all information. Apparently I was too terse. It doesn't feel right to crash after the UPS has run dry. (I don't have a generator.) About the first thing I was

Re: How to shut down cleanly by killing power

2002-09-27 Thread Petri Riihikallio
Thank you for your thoughts. I haven't actually done this, so take my advice with a grain of salt. I think that the biggest hurdle will be making sure that your filesystems are cleanly unmounted. I would *think* that: umount -af sync; sync; sync umount -fr / should unmount

Re: How to shut down cleanly by killing power

2002-09-27 Thread Brian T. Schellenberger
On Friday 27 September 2002 07:01 am, Petri Riihikallio wrote: | h I use apcupsd from ports which has shown to be very | reliable and has great docs. It has been months since I looked at | this stuff, but remember something like this issue you make was | covered in detail. | |

Re: How to shut down cleanly by killing power

2002-09-27 Thread Oliver Fromme
Petri Riihikallio [EMAIL PROTECTED] wrote: I have a FreeBSD 4.6.2 box and an UPS. I have chosen NUT (http://www.exploits.org/nut) as my UPS monitor. Everything compiles and runs fine. I have a problem with the shutdown script. How do I shut down the system properly? [...] stop

Re: How to shut down cleanly by killing power

2002-09-27 Thread Petri Riihikallio
I didn't discover this problem myself. It is documented in http://www.apcupsd.com/users_manual/shutdown.html (automatic reboot) and http://www.exploits.org/nut/docs/1.0.0/shutdown.html (power race). It is just that I haven't found any FreeBSD solution. Now I'm with you ... I think you

Re: How to shut down cleanly by killing power

2002-09-27 Thread Kirk Strauser
At 2002-09-27T11:21:18Z, Petri Riihikallio [EMAIL PROTECTED] writes: Thank you for your thoughts. You are quite welcome. I think that the biggest hurdle will be making sure that your filesystems are cleanly unmounted. Yes, something like that should be done. There are still all the

Re: How to shut down cleanly by killing power

2002-09-27 Thread Petri Riihikallio
The fact of the matter is that if the timing is *just* wrong you probably can't automatically recover. How likely is that to happen? Power outages are rare and short around here. I remember one that lasted for an hour in the last five years. It made headlines. My UPS is good for ca. 15 min.

Re: How to shut down cleanly by killing power

2002-09-27 Thread Kirk Strauser
At 2002-09-27T13:45:42Z, Kirk Strauser [EMAIL PROTECTED] writes: I would think so. Other people have mentioned the 'shutdown -p' command; does it do what you need? I wrote that before reading some of the other messages - feel free to ignore it. -- Kirk Strauser In Googlis non est, ergo non

Re: How to shut down cleanly by killing power

2002-09-27 Thread Jack L. Stone
At 05:11 PM 9.27.2002 +0300, Petri Riihikallio wrote: Have you looked at the script I'm referring to...?? It's the one provided by apccontrol as I recall which contains several shutdown -h commands which can be stopped and go back to business if the power returns because apcupsd checks to see if

Re: How to shut down cleanly by killing power

2002-09-27 Thread Petri Riihikallio
=== What happens if power returns AFTER this final decision, but BEFORE the system is actually shut down? The time frame can be over a minute.=== Interesting! This is the most I can recall being discussed about UPS for the past year. Glad we are doing it, but I still don't see the problem here.

Re: How to shut down cleanly by killing power

2002-09-27 Thread Petri Riihikallio
I don't *think* that any of those daemons would be harmed by unmounting the drives. After all, you can 'kill -9' them without any permanent bad effects. kern_shutdown.c kills all processes with signals, flushes and syncs disks etc. It just seems silly to try to duplicate a kernel function

Re: How to shut down cleanly by killing power

2002-09-27 Thread Petri Riihikallio
The way I've set it up, upsmon (part of NUT) issues a 'shutdown -p' when the battery is low. A local hack to rc.shutdown then instructs the UPS to turn itself off a few seconds later, by running: /usr/local/libexec/nut/newapc -a su1000 -k -d 3 In the scenario you describe, things would

Re: How to shut down cleanly by killing power

2002-09-27 Thread Gary W. Swearingen
I've never tried this and it's not the ideal method, but it's simple, so I offer it for your consideration: Put your UPS software on the root partition. In the software which initiates the mains-failure shutdown, just do shutdown -r now or init 6 or reboot or whatever. At the top of /etc/rc,

Re: How to shut down cleanly by killing power

2002-09-27 Thread Petri Riihikallio
I have several SmartUPS (APC 1500s) that run the most critical machines and dictate to the slaves. I believe the SmartUPS can be programmed to wait before they start to supply power. If I read the apcupsd docs correctly you can check you settings with apcaccess eeprom. It should return the

Re: How to shut down cleanly by killing power

2002-09-27 Thread Petri Riihikallio
I've never tried this and it's not the ideal method, but it's simple, so I offer it for your consideration: Put your UPS software on the root partition. In the software which initiates the mains-failure shutdown, just do shutdown -r now or init 6 or reboot or whatever. At the top of /etc/rc,

Re: How to shut down cleanly by killing power

2002-09-27 Thread Jack L. Stone
At 08:45 PM 9.27.2002 +0300, Petri Riihikallio wrote: I have several SmartUPS (APC 1500s) that run the most critical machines and dictate to the slaves. I believe the SmartUPS can be programmed to wait before they start to supply power. If I read the apcupsd docs correctly you can check you

Re: How to shut down cleanly by killing power

2002-09-27 Thread Gary W. Swearingen
This way the system reboots, but the reboot is interrupted with powerdown at early stage. Not ideal, I agree, but a solution still. And it has the side-benefit of nicely handling the fairly common case of where the power comes back on just long enough to get your UPS going again, especially if

Re: How to shut down cleanly by killing power

2002-09-27 Thread Petri Riihikallio
Thanks for your reply! sync is pretty much useless, it doesn't buy you anything. Particularly, it won't mark your filesystems clean (so fsck will still have to run on the next boot), and it does not guarantee that there's no unwritten data left in memory. Yes, this I found out by testing. Still

How to shut down cleanly by killing power

2002-09-26 Thread Petri Riihikallio
Hello A couple of days ago I sent a message asking how to shut down a FreeBSD system when I KNOW the power will be off after the next script command. Nobody has commented yet. Am I the only one using an UPS with FreeBSD? It doesn't feel right to crash after the UPS has run dry. (I don't

Re: How to shut down cleanly by killing power

2002-09-26 Thread Jack L. Stone
At 05:02 PM 9.26.2002 +0300, Petri Riihikallio wrote: Hello A couple of days ago I sent a message asking how to shut down a FreeBSD system when I KNOW the power will be off after the next script command. Nobody has commented yet. Am I the only one using an UPS with FreeBSD? lot chopped off

Re: How to shut down cleanly by killing power

2002-09-26 Thread Rob B
At 17:02 26/09/2002 +0300, Petri Riihikallio sent this up the stick: A couple of days ago I sent a message asking how to shut down a FreeBSD system when I KNOW the power will be off after the next script command. Nobody has commented yet. Maybe the question wasn't the clearest? Am I the only

How to shut down cleanly by killing power

2002-09-22 Thread Petri Riihikallio
Hello I have a FreeBSD 4.6.2 box and an UPS. I have chosen NUT (http://www.exploits.org/nut) as my UPS monitor. Everything compiles and runs fine. I have a problem with the shutdown script. How do I shut down the system properly? The problem is that I want to issue the command upsdrvctl