summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Harpin <development@landsofshadow.co.uk>2015-01-24 20:43:23 +0000
committerAlex Harpin <development@landsofshadow.co.uk>2015-03-09 17:09:20 +0000
commitab665a124c733ca442e47e94edc689774fa8ec1b (patch)
treea115f853336377eaf9a77e48e998dbfc31f11b8d
parent77f994076aff17271cfb5a09f0e42b16645756f3 (diff)
downloadvyatta-op-ab665a124c733ca442e47e94edc689774fa8ec1b.tar.gz
vyatta-op-ab665a124c733ca442e47e94edc689774fa8ec1b.zip
vyatta-op: replace 'show shutdown' with 'show poweroff' and use script
Rename 'show shutdown' to 'show poweroff' so it is the same as the configuration options, and set the command to use the script to show the scheduled poweroff time. Bug #461 http://bugzilla.vyos.net/show_bug.cgi?id=461
-rw-r--r--templates/show/poweroff/node.def2
-rw-r--r--templates/show/shutdown/node.def8
2 files changed, 2 insertions, 8 deletions
diff --git a/templates/show/poweroff/node.def b/templates/show/poweroff/node.def
new file mode 100644
index 0000000..a65f4e6
--- /dev/null
+++ b/templates/show/poweroff/node.def
@@ -0,0 +1,2 @@
+help: Show scheduled poweroff
+run: sudo /opt/vyatta/bin/sudo-users/vyatta-poweroff.pl --action show_poweroff
diff --git a/templates/show/shutdown/node.def b/templates/show/shutdown/node.def
deleted file mode 100644
index 52bd3a4..0000000
--- a/templates/show/shutdown/node.def
+++ /dev/null
@@ -1,8 +0,0 @@
-help: Show scheduled shutdown
-run: if [ -f /var/run/shutdown.pid ]
- then if [ -r /tmp/shutdown.at ]
- then echo -n "Shutdown pending at "; cat /tmp/shutdown.at
- else echo "Shutdown pending"
- fi
- else echo "No shutdown pending"
- fi