From 55e7248013601a6120d343fc6a345f0e0ae98cfb Mon Sep 17 00:00:00 2001 From: Michael Larson Date: Tue, 10 May 2011 14:21:27 -0700 Subject: support interactive mode for rest api for install image op mode commands. --- scripts/install/install-functions | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'scripts/install/install-functions') diff --git a/scripts/install/install-functions b/scripts/install/install-functions index ffaea22d..5670f82a 100755 --- a/scripts/install/install-functions +++ b/scripts/install/install-functions @@ -96,9 +96,14 @@ get_response () { local ldefault=$(tolower "$1") local loptions=$(tolower "$2") - # get the response from the user - read myresponse - myresponse=$(tolower "$myresponse") + + if [ "$VYATTA_PROCESS_CLIENT" == "gui2_rest" ]; then + myresponse=$ldefault + else + # get the response from the user + read myresponse + myresponse=$(tolower "$myresponse") + fi # Check to see if the user accepts the default if [ -z "$myresponse" ]; then -- cgit v1.2.3