Thanks Peter for the reply.
That confirms what I am experiencing and like I said before, it seems
fine to prematurely halt as long we clean up as much as we can before
hand. I don't suppose you know if there is a way to tell the AVR on
the bat3 to toggle JP3, but only after some delay? That would give the
halt script a chance to complete successfully before power is cut. On
the other hand there is no guarantee so I suppose it may not be much
better.
Just out of interest, here's a cut and paste from a manual "shutdown
-h now" on my board that illustrates what happens when ups-monitor is
called prior to "halt" in the halt script. Unfortunately the SIGKILL
isn't processed right away, thus the confusion. Note, I believe the
"thÿ" is a console problem that really should say "the KILL signal",
at least that's what it says on my dev box. If someone from
Technologic is listening in perhaps they could chime in as the
instructions for the BAT3 seem to suggest that it should work in this
setup, but it clearly does not for me without manual intervention.
Maybe those steps are implied but since I'm a bit of Linux n00b it
just wasn't clear to me.
shutdown -h now
INIT: Switching to runlevel: 0
INIT: Sending processes the TERM signal
INIT: Sending processes thÿ
ups-monitor here
The system is going down NOW !!
Sending SIGTERM to all processes.
INIT: no more processes left in this runlevel
Sending SIGKILL to all processes.
flushing ide devices: hda
System halted.
--- In "PeterElliot" <> wrote:
>
> Hi Mike,
>
> I'm running the BAT3 board on a TS-7300, running mainly in the
> fastboot envornment, with the bat3 daemon started from the
> 'startfpga' script.
>
> My application reads the bat3 information and when it's been on
> battery for the preset length of time (shoter than the value set in
> bat3) it kills the bat3 daemon and issues a 'ups-monitor poweroff'
> after saving data, closing files and unmounting - just as you have
> been doing.
>
> Using the fastboot the bat3 daemon's PID is hidden when in full boot
> mode, therefore my code can't kill the daemon and just terminates
> after saving it's data and unmounting and waits for the system by the
> normal BAT3 shutdown.
>
> If I need to reboot from the full boot environment I simply 'shutdown
> -r now'.
>
> I hope this was of help.
>
> PJE
>
>
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|