summaryrefslogtreecommitdiff
path: root/scripts/install/install-functions
diff options
context:
space:
mode:
authorMichael Larson <mike@vyatta.com>2011-05-10 14:21:27 -0700
committerMichael Larson <mike@vyatta.com>2011-05-10 14:21:27 -0700
commit55e7248013601a6120d343fc6a345f0e0ae98cfb (patch)
treefff4c8497fc815bae227c6151986de8192a49838 /scripts/install/install-functions
parentb80896ac4629da68853e51ee10c5146be4420b78 (diff)
downloadvyatta-cfg-system-55e7248013601a6120d343fc6a345f0e0ae98cfb.tar.gz
vyatta-cfg-system-55e7248013601a6120d343fc6a345f0e0ae98cfb.zip
support interactive mode for rest api for install image op mode commands.
Diffstat (limited to 'scripts/install/install-functions')
-rwxr-xr-xscripts/install/install-functions11
1 files changed, 8 insertions, 3 deletions
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