I am trying to integrate srvPwrCtrl to my power management system. I use
SC v 7.2.1 - 23614 @ Sat Oct 18 02:09:29 PDT 2008 - Debian - EN - utf8,
and srvPwrCtrl  v7.2-RC3-20081003

In SC/Server Power Control plugin, my settings are as this :
"Shutdown Command (include full path and cmd line args): /usr/bin/touch
/var/lock/pm/shutdown"
"Restart Command: /usr/bin/touch /var/lock/pm/reboot"
"Suspend Command: /usr/bin/touch /var/lock/pm/sleepnow"
"Defer action while sleep-playing?" yes
"Access via Sleep+Hold button?" yes -> Suspend to SqueezeNetworks
(all the rest is unset). As you see, actions are taken by another
process scanning /var/lock/pm/
I use a blocker, via the CLI, because other processes can raise flags
too, or because some critical system condition may appear.

I think there is a documentation bug about the CLI. The readme says > Blocks 
may be cleared via the CLI as well:
>       $client->execute(['srvrpowerctrl', 'clearblock', $blockcode,
> 'blockername']);
> -or-
>       #!/bin/sh
>       echo srvrpowerctrl clearblock blockcode blockername | nc -w 1
> 127.0.0.1 9090
> Again, if the clear action succeeds, the CLI return 1, or 0 if it
> fails.
> According to my tests, it returns 0 on success.

About the shutdown/suspend/reboot actions: I noticed the plugin behaves
differently after the command.
- after suspend, if my process is slow to send the actual suspend
command, my SB returns to normal state, and SC is running. This is good
for me.
- after reboot, the GUI blocks saying "Restarting", and the SC server
keeps on running until my process takes action (if it ever does). The
SC server must be restarted to unblock the GUI.
- after shutdown, something wild enough happens for my own process to
die. SC is restarted I believe. I am a bit puzzled as why I should die
as a result of shutdown. My process is not a plugin, it is only tied to
SC via the CLI, with timeouts and connection retries; my program is
written in perl.
I would like to see all commands behave like suspend, of course, if it
is possible ?

Also, a remark. Using an SB Classic, I could personally do away with
the simple "Suspend" and "Shutdown" menu options: the interesting
option is to switch to SN as well, I think. 
Could SN switching become a preference ? This way I could drop to 2
menu items instead of 4.

Thanks for any info.


-- 
epoch1970
------------------------------------------------------------------------
epoch1970's Profile: http://forums.slimdevices.com/member.php?userid=16711
View this thread: http://forums.slimdevices.com/showthread.php?t=48521

_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/plugins

Reply via email to