From 7cb0a823196182e7992e043624ad4976c1faa756 Mon Sep 17 00:00:00 2001 From: Michael Larson Date: Thu, 5 May 2011 10:33:35 -0700 Subject: suppress shutdown confirmation query if invoked by rest API. --- templates/shutdown/node.def | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'templates') 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 + -- cgit v1.2.3