Is this better?
Code:
#!/bin/sh
#
# SrvrPowerCtrl plugin helper script for linux.
#
# This script will set the system's RTC to wake the system up in advance of a
programmed SqueezeCenter alarm.
#
# Assumes that hardware clock is set to UTC.
#
#
# Co
I think you should use 'else if' and not assume that either exists -- a
kernel without ACPI might have neither, right?
--
peterw
http://www.tux.org/~peterw/
free plugins: http://www.tux.org/~peterw/#slim
AllQuiet BlankSaver ContextMenu FuzzyTime KidsPlay
KitchenTimer PlayLog PowerCenter/Bottle
syburgh: assuming that your centos system uses /proc/acpi/alarm, would
you be willing to test the following script for me?
Code:
#!/bin/sh
#
# SrvrPowerCtrl plugin helper script for linux.
#
# This script will set the system's RTC to wake the system up in adva
syburgh;375886 Wrote:
> Yes, the sysfs path for the wakealarm is specific to the kernel version,
> and has definitely changed since RHEL/CentOS 5. Google for the specific
> versions.
If I support /proc/acpi/alarm and /sys/class/rtc/rtc0/wakealarm, will I
have covered all (or most) the bases, as f
peterw;375864 Wrote:
> If you already use sudo for the shutdown command, why not use sudo here,
> too?
>
> -Peter
Mostly out of laziness. Perhaps my brain was addled from too much
eggnog, but I had trouble getting this to work via sudo. But, yes,
that ought to be the approach if I'm going to b
gharris999;375843 Wrote:
> Also, I'm not sure in which version of the linux kernel
> /sys/class/rtc/rtc0/wakealarm started appearing. Are there major
> distros out there which aren't likely to have this interface? CentOS?
> ClarkConnect?
Yes, the sysfs path for the wakealarm is specific to th
If you already use sudo for the shutdown command, why not use sudo here,
too?
-Peter
--
peterw
http://www.tux.org/~peterw/
free plugins: http://www.tux.org/~peterw/#slim
AllQuiet BlankSaver ContextMenu FuzzyTime KidsPlay
KitchenTimer PlayLog PowerCenter/BottleRocket SaverSwitcher
SettingsMana
I'm adding a facility to the SrvrPowerCtrl plugin to program the
system's rtc wakeup alarm upon shutdown if there is a SqueezeCenter
alarm pending. The squeezecenter user normally doesn't have write
access to /sys/class/rtc/rtc0/wakealarm. Making
/sys/class/rtc/rtc0/wakealarm writeable to all us