diff options
author | Olivier Blin <oblin@mandriva.org> | 2005-12-27 16:54:05 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.org> | 2005-12-27 16:54:05 +0000 |
commit | e2a00e6f774be9199d47004440fce9ff1978ccb7 (patch) | |
tree | b78fd3e60bdf3e8399974fd95192e9a936ebfad5 | |
parent | 46e21cf03550c3abb71b6cf7b694efbc9de6a9be (diff) | |
download | drakx-backup-do-not-use-e2a00e6f774be9199d47004440fce9ff1978ccb7.tar drakx-backup-do-not-use-e2a00e6f774be9199d47004440fce9ff1978ccb7.tar.gz drakx-backup-do-not-use-e2a00e6f774be9199d47004440fce9ff1978ccb7.tar.bz2 drakx-backup-do-not-use-e2a00e6f774be9199d47004440fce9ff1978ccb7.tar.xz drakx-backup-do-not-use-e2a00e6f774be9199d47004440fce9ff1978ccb7.zip |
allow to blacklist steps in /etc/sysconfig/finish-install (backport)
-rwxr-xr-x | perl-install/standalone/finish-install | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/perl-install/standalone/finish-install b/perl-install/standalone/finish-install index f6538a7d3..00a9f893f 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 = {}; @@ -77,21 +79,26 @@ 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_license'); -call('ask_language'); -call('ask_keyboard'); -call('ask_network'); +call('license'); +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); |