summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2009-02-12 14:54:51 -0800
committerStephen Hemminger <shemminger@vyatta.com>2009-02-12 14:54:51 -0800
commitef18cac8a75091924014c89e097be139161e6b71 (patch)
treec6a23fe79cbaa6cd62532b457e903392be046289
parentb2022147cb462c73a0cd22605b85d7efb59c59ab (diff)
downloadvyatta-op-ef18cac8a75091924014c89e097be139161e6b71.tar.gz
vyatta-op-ef18cac8a75091924014c89e097be139161e6b71.zip
Add shutdown command to CLI
Bug 3955 New commands: shutdown shutdown at 03:00 shutdown cancel
-rw-r--r--templates/shutdown/at/node.def1
-rw-r--r--templates/shutdown/at/node.tag/node.def3
-rw-r--r--templates/shutdown/cancel/node.def2
-rw-r--r--templates/shutdown/node.def2
4 files changed, 8 insertions, 0 deletions
diff --git a/templates/shutdown/at/node.def b/templates/shutdown/at/node.def
new file mode 100644
index 0000000..baa0023
--- /dev/null
+++ b/templates/shutdown/at/node.def
@@ -0,0 +1 @@
+help: Shutdown at a specific time
diff --git a/templates/shutdown/at/node.tag/node.def b/templates/shutdown/at/node.tag/node.def
new file mode 100644
index 0000000..ad16bc2
--- /dev/null
+++ b/templates/shutdown/at/node.tag/node.def
@@ -0,0 +1,3 @@
+help: Shutdown the system at a future time
+allowed: echo -n '<HH:MM>' '<MMDDYY>' '+MM'
+run: sudo /sbin/shutdown -h $3
diff --git a/templates/shutdown/cancel/node.def b/templates/shutdown/cancel/node.def
new file mode 100644
index 0000000..6d70f54
--- /dev/null
+++ b/templates/shutdown/cancel/node.def
@@ -0,0 +1,2 @@
+help: Cancel a pending shutdown
+run: sudo /sbin/shutown -c
diff --git a/templates/shutdown/node.def b/templates/shutdown/node.def
new file mode 100644
index 0000000..be56a0c
--- /dev/null
+++ b/templates/shutdown/node.def
@@ -0,0 +1,2 @@
+help: Shutdown the system
+run: sudo /sbin/shutdown -h now