summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-11-23 17:25:21 +0000
committerOlivier Blin <oblin@mandriva.org>2005-11-23 17:25:21 +0000
commit77dacd42d71007af5c14356293a30f4d83a85cde (patch)
tree1c7df6d3660f9ea9dc1a5d4106216dfc18e0f787
parent258ce3ea840fb90f23808bfe93772725fa05c298 (diff)
downloaddrakx-backup-do-not-use-77dacd42d71007af5c14356293a30f4d83a85cde.tar
drakx-backup-do-not-use-77dacd42d71007af5c14356293a30f4d83a85cde.tar.gz
drakx-backup-do-not-use-77dacd42d71007af5c14356293a30f4d83a85cde.tar.bz2
drakx-backup-do-not-use-77dacd42d71007af5c14356293a30f4d83a85cde.tar.xz
drakx-backup-do-not-use-77dacd42d71007af5c14356293a30f4d83a85cde.zip
allow to blacklist steps in /etc/sysconfig/finish-install
-rwxr-xr-xperl-install/standalone/finish-install29
1 files changed, 18 insertions, 11 deletions
diff --git a/perl-install/standalone/finish-install b/perl-install/standalone/finish-install
index 0a18d9480..e3374ac7f 100755
--- a/perl-install/standalone/finish-install
+++ b/perl-install/standalone/finish-install
@@ -11,6 +11,8 @@ use network::netconnect;
use security::level;
$ENV{SHARE_PATH} ||= "/usr/share";
+my $conf_file = '/etc/sysconfig/finish-install';
+my %steps = getVarsFromSh($conf_file);
my $authentication = authentication::get();
my $security = security::level::get();
my $net = {};
@@ -73,20 +75,25 @@ sub ask_users() {
}
sub call {
- my ($f_name) = @_;
- log::l("calling $f_name");
- my $f = $::{$f_name} or internal_error "bad function $f_name";
- eval { $f->() };
- log::l("$f_name failed: $@") if $@;
+ my ($step_name) = @_;
+ my $f_name = 'ask_' . $step_name;
+ if (member('no', map { lc($steps{$_}) } lc($step_name), uc($step_name))) {
+ log::l("ignoring $f_name");
+ } else {
+ log::l("calling $f_name");
+ my $f = $::{$f_name} or internal_error "bad function $f_name";
+ eval { $f->() };
+ log::l("$f_name failed: $@") if $@;
+ }
}
-call('ask_language');
-call('ask_keyboard');
-call('ask_network');
+call('language');
+call('keyboard');
+call('network');
$::WizardWindow->destroy; undef $::WizardWindow;
$::Wizard_pix_up = 'redhat-config-users';
-call('ask_authentication');
-call('ask_users');
-setVarsInSh('/etc/sysconfig/finish-install', { FINISH_INSTALL => 'no' });
+call('authentication');
+call('users');
+setVarsInSh($conf_file, { FINISH_INSTALL => 'no' });
$in->exit(0);