summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/install/install-functions11
-rwxr-xr-xscripts/install/install-image-existing6
-rwxr-xr-xscripts/install/install-image-new6
3 files changed, 18 insertions, 5 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
diff --git a/scripts/install/install-image-existing b/scripts/install/install-image-existing
index 39299507..2281eae3 100755
--- a/scripts/install/install-image-existing
+++ b/scripts/install/install-image-existing
@@ -57,7 +57,11 @@ NEWVER=`dpkg -l --root=${CD_SQUASH_ROOT} | grep "^.. vyatta-version " | awk '{p
NEWNAME=$NEWVER
echo -n "What would you like to name this image? [$NEWNAME]: "
-read response
+if [ "$VYATTA_PROCESS_CLIENT" == "gui2_rest" ]; then
+ response=$NEWNAME
+else
+ read response
+fi
if [ -n "$response" ]; then
badchars=`echo $response | sed -e 's/[a-zA-Z0-9\.\_+-]//g'`
if [ -n "$badchars" ]; then
diff --git a/scripts/install/install-image-new b/scripts/install/install-image-new
index c669da8e..3097392a 100755
--- a/scripts/install/install-image-new
+++ b/scripts/install/install-image-new
@@ -31,7 +31,11 @@ if [ -z "$image_name" ]; then
fi
echo -n "What would you like to name this image? [$image_name]: "
-read response
+if [ "$VYATTA_PROCESS_CLIENT" == "gui2_rest" ]; then
+ response=$NEWNAME
+else
+ read response
+fi
if [ -n "$response" ]; then
badchars=`echo $response | sed -e 's/[a-zA-Z0-9\.\_+-]//g'`
if [ -n "$badchars" ]; then