summaryrefslogtreecommitdiffstats
path: root/perl-install/install_steps.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-11-07 11:52:51 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-11-07 11:52:51 +0000
commite9d5cd96b2054cad8cca21bc1e7c10e4f4e135ed (patch)
tree6d1b334d8a1cd664289f674aa537be6d4344158f /perl-install/install_steps.pm
parent96510efce15225384a474e81ef2ea91d1ae3a4ee (diff)
downloaddrakx-backup-do-not-use-e9d5cd96b2054cad8cca21bc1e7c10e4f4e135ed.tar
drakx-backup-do-not-use-e9d5cd96b2054cad8cca21bc1e7c10e4f4e135ed.tar.gz
drakx-backup-do-not-use-e9d5cd96b2054cad8cca21bc1e7c10e4f4e135ed.tar.bz2
drakx-backup-do-not-use-e9d5cd96b2054cad8cca21bc1e7c10e4f4e135ed.tar.xz
drakx-backup-do-not-use-e9d5cd96b2054cad8cca21bc1e7c10e4f4e135ed.zip
no_comment
Diffstat (limited to 'perl-install/install_steps.pm')
-rw-r--r--perl-install/install_steps.pm42
1 files changed, 26 insertions, 16 deletions
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index 4ae18d73d..bbe35e2f7 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -99,7 +99,15 @@ sub selectKeyboard {
#------------------------------------------------------------------------------
sub selectPath {}
#------------------------------------------------------------------------------
-sub selectInstallClass($@) {}
+sub selectInstallClass($@) {
+ my ($o) = @_;
+ $o->{installClass} ||= "normal";
+ $o->{security} || ${{
+ normal => 2,
+ developer => 3,
+ server => 4,
+ }}{$o->{installClass}};
+}
#------------------------------------------------------------------------------
sub setupSCSI { modules::load_thiskind('scsi') }
#------------------------------------------------------------------------------
@@ -197,6 +205,7 @@ sub installPackages($$) {
}
push @toInstall, grep { $_->{base} && $_->{selected} && !$_->{installed} && !$firstInstalled{$_->{name}} } values %$packages;
push @toInstall, grep { !$_->{base} && $_->{selected} && !$_->{installed} && !$firstInstalled{$_->{name}} } values %$packages;
+ print int @toInstall, "<<<<<<\n";
pkgs::install($o->{prefix}, \@toInstall);
}
@@ -316,22 +325,23 @@ sub addUser($) {
my (%uids, %gids);
foreach (glob_("$p/home")) { my ($u, $g) = (stat($_))[4,5]; $uids{$u} = 1; $gids{$g} = 1; }
- my @l = @{$o->{users} || []};
my %done;
- foreach (@l) {
- next if !$_->{name} || getpwnam($_->{name}) || $done{$_->{name}};
-
- my $u = $_->{uid} || ($_->{oldu} = (stat("$p$_->{home}"))[4]);
- my $g = $_->{gid} || ($_->{oldg} = (stat("$p$_->{home}"))[5]);
- if (!$u || getpwuid($u)) { for ($u = 500; getpwuid($u) || $uids{$u}; $u++) {} }
- if (!$g || getgrgid($g)) { for ($g = 500; getgrgid($g) || $gids{$g}; $g++) {} }
-
- $_->{home} ||= "/home/$_->{name}";
- $_->{uid} = $u;
- $_->{gid} = $g;
- $_{pw} ||= $_->{password} && install_any::crypt($_->{password});
- $done{$_->{name}} = 1;
- }
+ my @l = grep {
+ if (!$_->{name} || getpwnam($_->{name}) || $done{$_->{name}}) {
+ 0;
+ } else {
+ my $u = $_->{uid} || ($_->{oldu} = (stat("$p$_->{home}"))[4]);
+ my $g = $_->{gid} || ($_->{oldg} = (stat("$p$_->{home}"))[5]);
+ if (!$u || getpwuid($u)) { for ($u = 500; getpwuid($u) || $uids{$u}; $u++) {} }
+ if (!$g || getgrgid($g)) { for ($g = 500; getgrgid($g) || $gids{$g}; $g++) {} }
+
+ $_->{home} ||= "/home/$_->{name}";
+ $_->{uid} = $u;
+ $_->{gid} = $g;
+ $_{pw} ||= $_->{password} && install_any::crypt($_->{password});
+ $done{$_->{name}} = 1;
+ }
+ } @{$o->{users} || []};
my @passwd = cat_("$p/etc/passwd");;
local *F;