diff options
author | Matthias Schwarzott <zzam@gentoo.org> | 2007-01-11 16:43:37 +0000 |
---|---|---|
committer | Matthias Schwarzott <zzam@gentoo.org> | 2007-01-11 16:43:37 +0000 |
commit | 19340c10403c2afb3f4a84432537e63723787bbf (patch) | |
tree | 721c4b1ba9519a14520bd3a03b30bdb52deb58cf | |
parent | Add missing changelog-entry. (diff) | |
download | gentoo-vdr-scripts-19340c10403c2afb3f4a84432537e63723787bbf.tar.gz gentoo-vdr-scripts-19340c10403c2afb3f4a84432537e63723787bbf.tar.bz2 gentoo-vdr-scripts-19340c10403c2afb3f4a84432537e63723787bbf.zip |
Added first version of no-operation wakeup. Moved shutdown-now message around.
svn path=/gentoo-vdr-scripts/trunk/; revision=386
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | usr/share/vdr/bin/vdrshutdown-gate.sh | 13 | ||||
-rw-r--r-- | usr/share/vdr/shutdown/wakeup-none.sh | 22 |
3 files changed, 34 insertions, 6 deletions
@@ -2,6 +2,11 @@ # $Id$ 11 Jan 2007; Matthias Schwarzott <zzam@gentoo.org> + usr/share/vdr/bin/vdrshutdown-gate.sh, + +usr/share/vdr/shutdown/wakeup-none.sh: + Added first version of no-operation wakeup. Moved shutdown-now message around. + + 11 Jan 2007; Matthias Schwarzott <zzam@gentoo.org> trunk/usr/share/vdr/bin/vdrshutdown-gate.sh, trunk/usr/share/vdr/bin/vdrshutdown-really.sh: Use exitcodes different from sudo. diff --git a/usr/share/vdr/bin/vdrshutdown-gate.sh b/usr/share/vdr/bin/vdrshutdown-gate.sh index e34142b..322385d 100644 --- a/usr/share/vdr/bin/vdrshutdown-gate.sh +++ b/usr/share/vdr/bin/vdrshutdown-gate.sh @@ -255,12 +255,6 @@ if is_shutdown_aborted; then exit_cleanup 0 fi -if is_forced_shutdown && forced_tests_count_greater_zero; then - mesg_q "Shutting down, shutdown forced by user." -else - mesg_q "Shutting down now" -fi - # You have to edit sudo-permissions to grant vdr permission to execute # privileged commands. Start visudo and add a line like # vdr ALL= NOPASSWD: /usr/share/vdr/bin/vdrshutdown-really.sh @@ -284,5 +278,12 @@ else fi date +%s > ${shutdown_data_dir}/shutdown-time-written + +if is_forced_shutdown && forced_tests_count_greater_zero; then + mesg_q "Shutting down, shutdown forced by user." +else + mesg_q "Shutting down now" +fi + exit_cleanup 0 diff --git a/usr/share/vdr/shutdown/wakeup-none.sh b/usr/share/vdr/shutdown/wakeup-none.sh new file mode 100644 index 0000000..9191d91 --- /dev/null +++ b/usr/share/vdr/shutdown/wakeup-none.sh @@ -0,0 +1,22 @@ +# $Id: wakeup-acpi.sh 370 2007-01-04 23:15:45Z zzam $ +# Author: +# Matthias Schwarzott <zzam@gmx.de> +# Various other contributors from gentoo.de +# + +ACPI_WAKEUP=/usr/sbin/acpi-wakeup.sh + +wakeup_check() { + # always works + return 0 +} + +wakeup_set() { + if [[ ${1} != 0 ]]; then + # it is not possible to wakeup the system! + error_mesg "You have some timer set. System will not wakeup on its own!" + return 0 + fi + + return 0 +} |