rpms/vdr/devel vdr-shutdown.sh,1.1,1.2
Ville Skytta (scop)
fedora-extras-commits at redhat.com
Tue Jan 2 20:26:17 UTC 2007
- Previous message: rpms/bdock/devel .cvsignore, 1.3, 1.4 bdock.spec, 1.2, 1.3 sources, 1.3, 1.4
- Next message: rpms/kadu/devel .cvsignore,1.9,1.10 sources,1.11,1.12
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: scop
Update of /cvs/extras/rpms/vdr/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv11049
Modified Files:
vdr-shutdown.sh
Log Message:
Simplify.
Index: vdr-shutdown.sh
===================================================================
RCS file: /cvs/extras/rpms/vdr/devel/vdr-shutdown.sh,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- vdr-shutdown.sh 17 Dec 2006 20:55:06 -0000 1.1
+++ vdr-shutdown.sh 2 Jan 2007 20:25:47 -0000 1.2
@@ -6,29 +6,15 @@
# README.package for information how to get the time written to ACPI and
# thus getting the system to wake up at the correct time.
-# How many seconds before the next timer should the computer wake up?
-secs=180
+# How many minutes before the next timer event should the system wake up,
+# ie. how long does it take to boot until VDR is running?
+delay=3
-# At least how many seconds in the future should the wake up time be?
-safe=90
+file=/var/lib/vdr/acpi-wakeup
+rm -f $file
-wakeupfile=/var/lib/vdr/acpi-wakeup
-
-rm -f $wakeupfile
if [ ${1:-0} -gt 0 -a -e /proc/acpi/alarm ] ; then
-
- UTC=
- [ -r /etc/sysconfig/clock ] && . /etc/sysconfig/clock
- export UTC
-
- cat <<\EOF | perl -MPOSIX - $2 $secs $safe > $wakeupfile
-my ($delta, $secs, $safe) = @ARGV;
-$delta -= $secs;
-$delta = $safe if ($delta < $safe);
-my $t = time() + $delta;
-my $utc = $ENV{UTC} =~ /yes|true/;
-print strftime(q{%Y-%m-%d %H:%M:%S}, $utc ? gmtime($t) : localtime($t)), "\n";
-EOF
+ date -d "1970-01-01 UTC $1 sec -$delay min" +"%Y-%m-%d %H:%M:%S" > $file
fi
# In order to make this work, the vdr user needs to be allowed to run
- Previous message: rpms/bdock/devel .cvsignore, 1.3, 1.4 bdock.spec, 1.2, 1.3 sources, 1.3, 1.4
- Next message: rpms/kadu/devel .cvsignore,1.9,1.10 sources,1.11,1.12
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list