diff options
author | Michael Larson <mike@vyatta.com> | 2011-05-05 10:33:35 -0700 |
---|---|---|
committer | Michael Larson <mike@vyatta.com> | 2011-05-05 10:33:35 -0700 |
commit | 7cb0a823196182e7992e043624ad4976c1faa756 (patch) | |
tree | 18dfcda22f867b02e3463c9dd73686bae534ff4b /templates | |
parent | 2bfa80b1495cea774872c1cc91c76d27af4bf28a (diff) | |
download | vyatta-op-7cb0a823196182e7992e043624ad4976c1faa756.tar.gz vyatta-op-7cb0a823196182e7992e043624ad4976c1faa756.zip |
suppress shutdown confirmation query if invoked by rest API.
Diffstat (limited to 'templates')
-rw-r--r-- | templates/shutdown/node.def | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/templates/shutdown/node.def b/templates/shutdown/node.def index 4185f40..81cbc5f 100644 --- a/templates/shutdown/node.def +++ b/templates/shutdown/node.def @@ -1,3 +1,9 @@ help: Shutdown the system -run: ${vyatta_bindir}/yesno -y "Proceed with shutdown? [confirm]" \ - && sudo /sbin/shutdown -h now +run: if [ "$VYATTA_PROCESS_CLIENT" == "gui2_rest" ] + then + sudo /sbin/shutdown -h now + else + ${vyatta_bindir}/yesno -y "Proceed with shutdown? [confirm]" \ + && sudo /sbin/shutdown -h now + fi + |