diff options
Diffstat (limited to 'templates/poweroff')
-rw-r--r-- | templates/poweroff/at/node.def | 1 | ||||
-rw-r--r-- | templates/poweroff/at/node.tag/node.def | 6 | ||||
-rw-r--r-- | templates/poweroff/cancel/node.def | 2 | ||||
-rw-r--r-- | templates/poweroff/node.def | 9 | ||||
-rw-r--r-- | templates/poweroff/now/node.def | 3 |
5 files changed, 21 insertions, 0 deletions
diff --git a/templates/poweroff/at/node.def b/templates/poweroff/at/node.def new file mode 100644 index 0000000..537bfff --- /dev/null +++ b/templates/poweroff/at/node.def @@ -0,0 +1 @@ +help: Poweroff at a specific time diff --git a/templates/poweroff/at/node.tag/node.def b/templates/poweroff/at/node.tag/node.def new file mode 100644 index 0000000..ccc3b5b --- /dev/null +++ b/templates/poweroff/at/node.tag/node.def @@ -0,0 +1,6 @@ +help: Poweroff the system at a future time +allowed: echo -n '<HH:MM>' '<MMDDYY>' '+MM' +run: if /opt/vyatta/bin/vyatta-gettime.pl $3 >/tmp/shutdown.at + then (sudo /sbin/shutdown -h $3 & + disown %?sudo ) >/dev/null 2>&1 + fi diff --git a/templates/poweroff/cancel/node.def b/templates/poweroff/cancel/node.def new file mode 100644 index 0000000..c08a72d --- /dev/null +++ b/templates/poweroff/cancel/node.def @@ -0,0 +1,2 @@ +help: Cancel a pending poweroff +run: sudo /sbin/shutdown -c diff --git a/templates/poweroff/node.def b/templates/poweroff/node.def new file mode 100644 index 0000000..b3a41f1 --- /dev/null +++ b/templates/poweroff/node.def @@ -0,0 +1,9 @@ +help: Poweroff the system +run: if [ "$VYATTA_PROCESS_CLIENT" == "gui2_rest" ] + then + sudo /sbin/shutdown -h now + else + ${vyatta_bindir}/yesno -n "Proceed with poweroff? (Yes/No) [No] " \ + && sudo /sbin/shutdown -h now + fi + diff --git a/templates/poweroff/now/node.def b/templates/poweroff/now/node.def new file mode 100644 index 0000000..1117668 --- /dev/null +++ b/templates/poweroff/now/node.def @@ -0,0 +1,3 @@ +help: Poweroff the system now [disruptive] +run: sudo /sbin/shutdown -h now + |