Opened 17 years ago
Closed 17 years ago
#3420 closed enhancement (fixed)
Suggested Enhancement: allow nested "mythshutdown --lock" calls
Reported by: | anonymous | Owned by: | paulh |
---|---|---|---|
Priority: | minor | Milestone: | 0.21 |
Component: | mythtv | Version: | head |
Severity: | low | Keywords: | |
Cc: | Ticket locked: | no |
Description
I find it useful to "nest" calls to "mythshutdown --lock", i.e. if "mythshutdown --lock" is executed n times than it takes n calls to "mythshutdown --unlock" to fully unlock rather than just one call. This makes it possible to run multiple long running tasks on a myth box and for the box to shutdown when the tasks are complete, using this simple script:
myth_master / # cat /media/bin/myth_task #!/bin/sh
trap "/usr/local/bin/mythshutdown --unlock" SIGHUP SIGINT SIGQUIT SIGABRT SIGKILL SIGALRM SIGSEGV SIGTERM
/usr/local/bin/mythshutdown --lock "$@" /usr/local/bin/mythshutdown --unlock trap - SIGHUP SIGINT SIGQUIT SIGABRT SIGKILL SIGALRM SIGSEGV SIGTERM myth_master / #
I've attached a diff for this enhancement - I hope that it gets included :-)
Attachments (1)
Change History (3)
Changed 17 years ago by
Attachment: | mythshutdown_nested_locks.diff added |
---|
comment:1 Changed 17 years ago by
Milestone: | unknown → 0.21 |
---|---|
Owner: | changed from Isaac Richards to paulh |
This patch fails to apply with a malformed patch error. Even the usual trick of converting the line ends to unix style didn't work.
Patch to allow nested calls to "mythshutdown --lock"