vdr/nvram-wakeup/debian README.Debian S90.nvram-wakeup vdr-nvram-wakeup.conf changelog install
Tobias Grimm
pkg-vdr-dvb-changes@lists.alioth.debian.org
Sun, 04 Jul 2004 17:02:07 +0000
Update of /cvsroot/pkg-vdr-dvb/vdr/nvram-wakeup/debian
In directory haydn:/tmp/cvs-serv18829/debian
Modified Files:
changelog install
Added Files:
README.Debian S90.nvram-wakeup vdr-nvram-wakeup.conf
Log Message:
added vdr shutdown hook stuff
Index: changelog
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/nvram-wakeup/debian/changelog,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- changelog 4 Jul 2004 10:18:38 -0000 1.2
+++ changelog 4 Jul 2004 17:02:05 -0000 1.3
@@ -2,6 +2,11 @@
* nvram-wakeup is now maintained on Alioth and also includes the
former vdr-addon-nvram-wakeup package from c't VDR
+ * using MAKEDEV instead of mknod now
+ * a regular wake up interval can be configured now
+ * the command to reboot before shutting down can be configured in
+ /etc/vdr/vdr-nvram-wakeup.conf, because there are no kernel-poweroff
+ or runlevel0-poweroff packages in the official Debian.
-- Tobias Grimm <tg@e-tobi.net> Sun, 04 Jul 2004 12:10:00 +0200
Index: install
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/nvram-wakeup/debian/install,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- install 4 Jul 2004 09:56:32 -0000 1.1
+++ install 4 Jul 2004 17:02:05 -0000 1.2
@@ -1,10 +1,13 @@
-nvram-wakeup usr/bin/
-set_timer usr/bin/
-rtc usr/sbin/
-time usr/sbin/
-biosinfo usr/sbin/
-guess usr/sbin/
-cat_nvram usr/sbin/
-guess-helper.sh usr/sbin/
-guess-helper.mo usr/share/locale/de/LC_MESSAGES/
-nvram-wakeup.conf etc/
+nvram-wakeup usr/bin/
+set_timer usr/bin/
+rtc usr/sbin/
+time usr/sbin/
+biosinfo usr/sbin/
+guess usr/sbin/
+cat_nvram usr/sbin/
+guess-helper.sh usr/sbin/
+guess-helper.mo usr/share/locale/de/LC_MESSAGES/
+nvram-wakeup.conf etc/
+
+debian/S90.nvram-wakeup usr/share/vdr/shutdown-hooks/
+debian/vdr-nvram-wakeup.conf etc/vdr/
--- NEW FILE: S90.nvram-wakeup ---
#
# VDR shutdown hook for nvram-wakeup - Tobias Grimm <tg@e-tobi.net>
# ----------------------------------
#
# This shutdown hook sets the wakeup time for the next timer using
# nvram-wakeup. If necessary the shutdown command is modified to
# use a special shutdown strategy.
#
NVRAMCMD=/usr/bin/nvram-wakeup
# read arguments for nvram-wakeup from conf-file
. /etc/vdr/vdr-nvram-wakeup.conf
# Defaults:
[ -z "$ENABLED" ] && export ENABLED="no"
[ -z "$COMMANDLINE" ] && export COMMANDLINE=""
[ -z "$SPECIALSHUTDOWN" ] && export SPECIALSHUTDOWN=""
[ -z "$REGULAR_DAYS" ] && export REGULAR_DAYS=0
[ -z "$REGULAR_TIME" ] && export REGULAR_TIME=0
LOG="logger -t vdr-nvram-wakeup"
if [ $ENABLED = "no" ] ; then
$LOG "nvram-wakeup functionality is disabled"
exit 0
fi
# calculate, at what time the machine should be powered on:
TIMER=$1
if [ $REGULAR_DAYS -gt 0 ]; then
REGULAR_TIMER=$((`date -d "$REGULAR_TIME" +%s` + $REGULAR_DAYS * 24 * 60 * 60))
# when no vdr timer is set or vdr timer starts later than regular timer:
if [ $TIMER -eq 0 ] || [ $TIMER -gt 0 -a $REGULAR_TIMER -lt $TIMER ] ; then
TIMER=$REGULAR_TIMER
fi
fi
# set wakeup time and check nvram-wakeup and check result:
$LOG "$NVRAMCMD -ls $TIMER $COMMANDLINE"
$NVRAMCMD -ls $TIMER $COMMANDLINE
case $PIPESTATUS in
0) # all went ok - new date and time set
$LOG "nvram-wakeup: everything ok"
exit 0
;;
1) # all went ok - new date and time set.
#
# *** but we need to reboot. ***
#
# for some boards this is needed after every change.
#
# for some other boards, we only need this after changing the
# status flag, i.e. from enabled to disabled or the other way.
# For plan A - (Plan A is not supported anymore---see README)
#
# For plan B - (don't forget to install the modified kernel image first)
#
$LOG "nvram-wakeup: everything ok - need to reboot first"
if [ $SPECIALSHUTDOWN -eq "" ] ; then
$LOG "nvram-wakeup: A special shutdown strategy is required but not configured."
echo "ABORT_MESSAGE=\"no special shutdown configured\""
exit 1
else
echo "SHUTDOWNCMD=\"$SPECIALSHUTDOWN\""
exit 0
fi
;;
*) # something went wrong
# don't do anything - just exit with status 1
$LOG "nvram-wakeup: could not set time, shutdown will be aborted"
echo "ABORT_MESSAGE=\"nvram-wakeup could not set time\""
exit 1
;;
esac
--- NEW FILE: vdr-nvram-wakeup.conf ---
#
# Configuration file for the VDR nvram-wakeup shutdown hook
#
# This is NOT the nvram-wakeup configuration file, which you can find in
# /etc/nvram-wakeup.conf and which must be set in COMMANDLINE (see below),
# if your mainboard ins not detected automatically.
#
# Set to "yes" to enable nvram-wakeup for VDR
#
ENABLED="no"
# Here you can specify additional command line parameters, that will be passed
# to nvram-wakeup.
#
# i.e.:
# COMMANDLINE="-I ecs_k7s5au" # mainboard of type K7S5au
# COMMANDLINE="-C /etc/nvram-wakeup.conf" # use config file
#
# see "man nvram-wakeup"
#
COMMANDLINE=""
# If your mainboard needs to reboot before shutting down, set the command(s) to
# do this here. i.e.:
#
# SPECIALSHUTDOWN="lilo -R PowerOff ; shutdown -r now"
#
SPECIALSHUTDOWN=""
# If you want your VDR machine to wakeup in regular intervals (i.e. for
# updating EPG data), specify a day interval and a wakeup time:
#
REGULAR_DAYS=0 # 0=disabled, 1=each day, 2=each 2'nd day, 3=...
REGULAR_TIME=01:00 # HH:MM
--- NEW FILE: README.Debian ---
nvram-wakeup for Debian
-----------------------
The original nvram-wakeup package has been created for the c't VDR project,
where an additional package vdr-addon-nvram-wakeup installed the necessary
shutdown hook script for VDR. This hook script is now included in nvram-wakeup
itself.
If you intend to use nvram-wakeup with VDR, be aware, that some mainboards
need to reboot once, before the wakeup time is activated. This requires a
special shutdown procedure, that may use a modified kernel image or special
kernel parameters to force booting into runlevlel 0. See
/usr/share/doc/README.reboot.gz for more detailed instructions. You can
configure a script or command sequence that is called when a reboot is needed
in /etc/vdr/vdr-nvram-wakeup.conf. i.e.:
SPECIALSHUTDOWN="lilo -R PowerOff ; shutdown -r now"
-- Tobias Grimm <tg@e-tobi.net>, Sun, 04 Jul 2004 12:54:00 +0200