From: cphillip Date: Thu, 12 Dec 2002 21:33:50 +0000 (+0000) Subject: o Add a noprompt flag. X-Git-Tag: OPENSSH_3_5P1_GSI_20030203~1 X-Git-Url: http://andersk.mit.edu/gitweb/gssapi-openssh.git/commitdiff_plain/571ab9526f12243306d9ae85d9c6b36ddc1ab287 o Add a noprompt flag. --- diff --git a/setup/setup-openssh.pl b/setup/setup-openssh.pl index 065ccd4..f600da6 100644 --- a/setup/setup-openssh.pl +++ b/setup/setup-openssh.pl @@ -97,10 +97,10 @@ my $keyfiles = { # to verify correct args by using anon subs in various places. # -my($interactive, $force, $verbose); +my($prompt, $force, $verbose); GetOptions( - 'interactive!' => \$interactive, + 'prompt!' => \$prompt, 'force' => \$force, 'verbose' => \$verbose, ) or pod2usage(2); @@ -226,9 +226,12 @@ print " \n"; # give the user a chance to read all of this output # -print "\n"; -print "Press to continue... "; -$trash = ; +if (!$prompt) +{ + print "\n"; + print "Press to continue... "; + $trash = ; +} print "---------------------------------------------------------------------\n"; print "$myname: Finished configuring package 'gsi_openssh'.\n"; @@ -1120,6 +1123,12 @@ sub query_boolean my($query_text, $default) = @_; my($nondefault, $foo, $bar); + if (!$prompt) + { + print "Prompt suppressed. Continuing...\n"; + return "y"; + } + # # Set $nondefault to the boolean opposite of $default. #