diff options
author | pad <pad@mandriva.com> | 1999-09-04 18:03:05 +0000 |
---|---|---|
committer | pad <pad@mandriva.com> | 1999-09-04 18:03:05 +0000 |
commit | e81601509dc5bddad49d75d62c571a07c917c194 (patch) | |
tree | 3f966b1319dbba9ec6ab4391bf3258833c3439ae /perl-install/install_steps.pm | |
parent | 262a638e936bf99ff539815fe35895e144fa4e2d (diff) | |
download | drakx-backup-do-not-use-e81601509dc5bddad49d75d62c571a07c917c194.tar drakx-backup-do-not-use-e81601509dc5bddad49d75d62c571a07c917c194.tar.gz drakx-backup-do-not-use-e81601509dc5bddad49d75d62c571a07c917c194.tar.bz2 drakx-backup-do-not-use-e81601509dc5bddad49d75d62c571a07c917c194.tar.xz drakx-backup-do-not-use-e81601509dc5bddad49d75d62c571a07c917c194.zip |
metter arch
Diffstat (limited to 'perl-install/install_steps.pm')
-rw-r--r-- | perl-install/install_steps.pm | 79 |
1 files changed, 49 insertions, 30 deletions
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm index 1b1c59f5f..ff5ce02ff 100644 --- a/perl-install/install_steps.pm +++ b/perl-install/install_steps.pm @@ -3,6 +3,9 @@ package install_steps; use diagnostics; use strict; +#-###################################################################################### +#- misc imports +#-###################################################################################### use common qw(:file :system :common); use install_any qw(:all); use partition_table qw(:types); @@ -29,17 +32,18 @@ my $o; 1; +#-###################################################################################### +#- misc functions +#-###################################################################################### sub new($$) { my ($type, $o_) = @_; $o = bless $o_, ref $type || $type; } -sub default { - my ($o, $field) = @_; - $o->{$field} || $o->{default}{$field}; -} - +#-###################################################################################### +#- In/Out Steps Functions +#-###################################################################################### sub enteringStep($$) { my ($o, $step) = @_; log::l("starting step `$step'"); @@ -77,46 +81,48 @@ so continue at your own risk :("), $@ ]) if $@; sub errorInStep($$) {} -sub chooseLanguage($) { - $o->default("lang"); -} -sub chooseKeyboard($) { - $o->default("keyboard"); -} -sub choosePrinter($) { - $o->default("printer"); -} +#-###################################################################################### +#- Steps Functions +#-###################################################################################### -sub selectInstallOrUpgrade($) { - $o->default("isUpgrade") || 0; -} -sub selectInstallClass($@) { - $o->default("installClass") || $_[1]; +#------------------------------------------------------------------------------ +sub selectLanguage { + $o->{keyboard} ||= keyboard::lang2keyboard($o->{lang}); + selectKeyboard($o); } -sub setupSCSI { - modules::load_thiskind('scsi'); -} - +#------------------------------------------------------------------------------ +sub selectKeyboard { keyboard::setup($o->{keyboard}) } +#------------------------------------------------------------------------------ +sub selectPath {} +#------------------------------------------------------------------------------ +sub selectInstallClass($@) {} +#------------------------------------------------------------------------------ +sub setupSCSI { modules::load_thiskind('scsi') } +#------------------------------------------------------------------------------ sub doPartitionDisks($$) { my ($o, $hds) = @_; - fsedit::auto_allocate($hds, $o->default("partitions")); + fsedit::auto_allocate($hds, $o->{partitions}); } + +#------------------------------------------------------------------------------ sub rebootNeeded($) { my ($o) = @_; log::l("Rebooting..."); exit "true"; } +#------------------------------------------------------------------------------ sub choosePartitionsToFormat($$) { my ($o, $fstab) = @_; foreach (@$fstab) { $_->{toFormat} = ($_->{mntpoint} && isExt2($_) || isSwap($_)) && - ($_->{notFormatted} || $o->{default}{partitioning}{autoformat}); + ($_->{notFormatted} || $o->{partitioning}{autoformat}); } } +#------------------------------------------------------------------------------ sub formatPartitions { my $o = shift; foreach (@_) { @@ -124,10 +130,12 @@ sub formatPartitions { } } +#------------------------------------------------------------------------------ sub choosePackages($$$) { my ($o, $packages, $compss) = @_; } +#------------------------------------------------------------------------------ sub beforeInstallPackages { my ($o) = @_; @@ -150,12 +158,14 @@ sub afterInstallPackages($) { # configPCMCIA($o->{rootPath}, $o->{pcmcia}); } +#------------------------------------------------------------------------------ sub mouseConfig($) { my ($o) = @_; setVarsInSh("$o->{prefix}/etc/sysconfig/mouse", $o->{mouse}); symlink $o->{mouse}{DEVICE}, "$o->{prefix}/dev/mouse" or log::l("creating /dev/mouse symlink failed"); } +#------------------------------------------------------------------------------ sub configureNetwork($) { my ($o) = @_; my $etc = "$o->{prefix}/etc"; @@ -171,9 +181,10 @@ sub configureNetwork($) { #res_init(); # reinit the resolver so DNS changes take affect } +#------------------------------------------------------------------------------ sub timeConfig { my ($o, $f) = @_; - my $t = $o->default("timezone"); + my $t = $o->{timezone}; setVarsInSh($f, { ZONE => $t->{timezone}, @@ -182,17 +193,20 @@ sub timeConfig { }); } +#------------------------------------------------------------------------------ sub servicesConfig {} +#------------------------------------------------------------------------------ sub printerConfig { my($o) = @_; - my $printer = $o->default("printer"); if ($o->{printer}{complete}) { + pkgs::select($o->{packages}, $o->{packages}{'rhs-printfilters'}); $o->installPackages($o->{packages}); - printer::configure_queue($printer) if $o->{printer}{complete}; + + printer::configure_queue($o->{printer}); } } - +#------------------------------------------------------------------------------ sub setRootPassword($) { my ($o) = @_; my %u = %{$o->{superuser}}; @@ -216,6 +230,7 @@ sub setRootPassword($) { } } +#------------------------------------------------------------------------------ sub addUser($) { my ($o) = @_; my %u = %{$o->{user}}; @@ -249,6 +264,7 @@ sub addUser($) { commands::chown_("-r", "$u{uid}.$u{gid}", "$p$u{home}"); } +#------------------------------------------------------------------------------ sub createBootdisk($) { my $dev = $o->default("mkbootdisk") or return; @@ -263,14 +279,17 @@ sub createBootdisk($) { $o->{mkbootdisk} = $dev; } +#------------------------------------------------------------------------------ sub setupBootloader($) { my ($o) = @_; my $versionString = versionString(); - lilo::install($o->{prefix}, $o->{hds}, $o->{fstab}, $versionString, $o->default("bootloader")); + lilo::install($o->{prefix}, $o->{hds}, $o->{fstab}, $versionString, $o->{bootloader}); } +#------------------------------------------------------------------------------ sub setupXfree { my ($o) = @_; } +#------------------------------------------------------------------------------ sub exitInstall {} |