spacewalk/setup/bin/cobbler-setup | 4 +++-
spacewalk/setup/bin/spacewalk-setup | 6 ++++--
2 files changed, 7 insertions(+), 3 deletions(-)
New commits:
commit 2ed45f50022c4b24f815d4df461223a58603fda7
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Nov 3 12:04:06 2009 +0100
make installer questions look more consistent
diff --git a/spacewalk/setup/bin/cobbler-setup b/spacewalk/setup/bin/cobbler-setup
index 0d7e3b2..e515288 100755
--- a/spacewalk/setup/bin/cobbler-setup
+++ b/spacewalk/setup/bin/cobbler-setup
@@ -38,10 +38,12 @@ def copy(src, dest):
def ask_yes_no(question, default_val = None):
if default_val and default_val.lower() == 'y':
default_val = 'y'
+ default_q = '[Y/n]'
else:
default_val = 'n'
+ default_q = '[y/N]'
- ans = raw_input(question + " (y/n, default = '%s')?" % default_val)
+ ans = raw_input(question + " " + default_q + "?")
if not ans:
return default_val == 'y'
diff --git a/spacewalk/setup/bin/spacewalk-setup b/spacewalk/setup/bin/spacewalk-setup
index 252a5e4..2891d80 100755
--- a/spacewalk/setup/bin/spacewalk-setup
+++ b/spacewalk/setup/bin/spacewalk-setup
@@ -222,9 +222,10 @@ sub remove_old_jvm {
Spacewalk::Setup::ask(
-noninteractive => $opts{"non-interactive"},
- -question => "Should setup remove these packages y/n",
+ -question => "Should setup remove these packages",
-test => sub { my $text = shift; return $text =~ /^[YyNn]/ },
-answer => \$answers->{"remove-old-jvm"},
+ -default => 'Y',
);
unless ( $answers->{"remove-old-jvm"} =~ /^[Yy]/ ) {
print Spacewalk::Setup::loc("** Skipping removal of old java packages.\n");
@@ -443,9 +444,10 @@ sub setup_ssl_vhost {
}
Spacewalk::Setup::ask(
-noninteractive => $opts{"non-interactive"},
- -question => "Should setup configure apache's default ssl server for you (saves original ssl.conf) y/n",
+ -question => "Should setup configure apache's default ssl server for you (saves original ssl.conf)",
-test => sub { my $text = shift; return $text =~ /^[YyNn]/ },
-answer => \$answers->{"ssl-config-sslvhost"},
+ -default => 'Y',
);
unless ( $answers->{"ssl-config-sslvhost"} =~ /^[Yy]/ ) {
print Spacewalk::Setup::loc("** Skipping SSL virtual host configuration.\n");