Unix Technical Forum

Power off system programmatically

This is a discussion on Power off system programmatically within the comp.unix.bsd.openbsd.misc forums, part of the OpenBSD category; --> Hello All: I have a P4 based system which I am trying to power off programmatically through the use ...


Go Back   Unix Technical Forum > Unix Operating Systems > OpenBSD > comp.unix.bsd.openbsd.misc

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-16-2008, 06:07 AM
Jim Lambert
 
Posts: n/a
Default Power off system programmatically

Hello All:

I have a P4 based system which I am trying to power off programmatically
through the use of a menu system I am writing. I tried the "-p" flag to
"shutdown" but it did not work. Is there another way anyone knows of to
shutdown and turnoff an Openbsd system programmatically? I am currently
using version 3.3 but will be upgrading to 3.4.

TIA,

Jim


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-16-2008, 06:07 AM
Marco S Hyman
 
Posts: n/a
Default Re: Power off system programmatically

"Jim Lambert" <jaylamb_ert@futrx.com> writes:

> I have a P4 based system which I am trying to power off programmatically
> through the use of a menu system I am writing. I tried the "-p" flag to


shutdown -hp should do the trick. If that fails try this:

sysctl -w machdep.apmhalt=1

and then issue your shutdown command. That is a workaround required
for some hardware. If it solved your problem you can enable the sysctl
in /etc/sysctl.conf.

If it still doesn't work then OpenBSD doesn't know how to tell your
hardware to shut down (or your hardware doesn't support programatic
shutdown).

// marc
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-16-2008, 06:07 AM
Jim Lambert
 
Posts: n/a
Default Re: Power off system programmatically (apm hangs boot)

Marco S Hyman wrote:
> "Jim Lambert" <jaylamb_ert@futrx.com> writes:
>
>> I have a P4 based system which I am trying to power off
>> programmatically through the use of a menu system I am writing. I
>> tried the "-p" flag to

>
> shutdown -hp should do the trick. If that fails try this:
>
> sysctl -w machdep.apmhalt=1
>
> and then issue your shutdown command. That is a workaround required
> for some hardware. If it solved your problem you can enable the
> sysctl in /etc/sysctl.conf.
>
> If it still doesn't work then OpenBSD doesn't know how to tell your
> hardware to shut down (or your hardware doesn't support programatic
> shutdown).
>


I checked my bios and saw that I didn't have apm enabled in the bios. My
problem now is that when I boot the system it hangs at "apm0 at bios0".
Anyone have any ideas why this might be doing this?

Thanks,

Jim


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:18 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com