]> andersk Git - gssapi-openssh.git/commitdiff
o Complete changes to default behaviour for boolean queries.
authorcphillip <cphillip>
Mon, 11 Feb 2002 17:36:21 +0000 (17:36 +0000)
committercphillip <cphillip>
Mon, 11 Feb 2002 17:36:21 +0000 (17:36 +0000)
setup/setup-openssh.pl

index 9faf25d487326cec9ac511dbc7adc333cc65bc8b..bf506c83c01a08f03746073b74b7463b8adbb451 100644 (file)
@@ -349,7 +349,7 @@ print "\n";
 
 $response = query_boolean("Do you wish to continue with the setup package?","y");
 
-if ($response ne "y")
+if ($response eq "n")
 {
     print "\n";
     print "Okay.. exiting gsi_openssh setup.\n";
@@ -420,11 +420,24 @@ sub query_boolean
     $foo = <STDIN>;
     ($bar) = split //, $foo;
 
-    if ($bar ne $nondefault)
+    if ( grep(/\s/, $bar) )
     {
+        # this is debatable.  all whitespace means 'default'
+
+        $bar = $default;
+    }
+    elsif ($bar ne $default)
+    {
+        # everything else means 'nondefault'.
+
+        $bar = $nondefault;
+    }
+    else
+    {
+        # extraneous step.  to get here, $bar should be eq to $default anyway.
+
         $bar = $default;
     }
 
     return $bar;
 }
-
This page took 0.033319 seconds and 5 git commands to generate.