summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Southworth <john.southworth@vyatta.com>2011-05-03 17:24:55 -0500
committerJohn Southworth <john.southworth@vyatta.com>2011-05-03 17:24:55 -0500
commit9beeec4ef48369b488c774596ba2e8c47e0ce1e5 (patch)
tree16ff03ef4a5254e8a60ad70be8497937f4bc063b
parentb02002daf6054f466ca5eed0641d71199053a253 (diff)
downloadvyatta-op-9beeec4ef48369b488c774596ba2e8c47e0ce1e5.tar.gz
vyatta-op-9beeec4ef48369b488c774596ba2e8c47e0ce1e5.zip
Support non-interactive mode for webgui2
-rwxr-xr-xscripts/vyatta-image-tools.pl4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/vyatta-image-tools.pl b/scripts/vyatta-image-tools.pl
index 3a9bf08..fc8bfc8 100755
--- a/scripts/vyatta-image-tools.pl
+++ b/scripts/vyatta-image-tools.pl
@@ -202,6 +202,10 @@ sub curl_from {
sub y_or_n {
my ($msg) = @_;
+ my $process_client = $ENV{'VYATTA_PROCESS_CLIENT'};
+ if (defined $process_client){
+ return 1 if ($process_client =~ /gui2_rest/);
+ }
print "$msg (Y/N): ";
my $input = <>;
return 1 if ($input =~ /Y|y/);