diff options
author | Oliver Tappe | 2007-09-26 13:05:33 +0200 |
---|---|---|
committer | Oliver Tappe | 2007-09-26 13:05:33 +0200 |
commit | b385455b18ec7ada8ec8c9c5cc467fcf46bb5dfc (patch) | |
tree | 604c1a78357c0f4fce70c81ef4254e7b92c3651e /installer/OpenSLX/OSSetup/Engine.pm | |
parent | * reverted changeset 1347, as installPrerequiredPackages() *should* have been (diff) | |
download | core-b385455b18ec7ada8ec8c9c5cc467fcf46bb5dfc.tar.gz core-b385455b18ec7ada8ec8c9c5cc467fcf46bb5dfc.tar.xz core-b385455b18ec7ada8ec8c9c5cc467fcf46bb5dfc.zip |
* fixed problems with respect to installation of prerequired packages
* added support for setting the root-password:
+ slxos-setup now queries for the root-password
+ 'busybox cryptpw' is used to determine the hashed password as required
by the specific distribution (MD5 or Blowfish)
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1349 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'installer/OpenSLX/OSSetup/Engine.pm')
-rw-r--r-- | installer/OpenSLX/OSSetup/Engine.pm | 45 |
1 files changed, 40 insertions, 5 deletions
diff --git a/installer/OpenSLX/OSSetup/Engine.pm b/installer/OpenSLX/OSSetup/Engine.pm index 46bccc75..a3092b24 100644 --- a/installer/OpenSLX/OSSetup/Engine.pm +++ b/installer/OpenSLX/OSSetup/Engine.pm @@ -263,6 +263,7 @@ sub initialize sub installVendorOS { my $self = shift; + my $vendorOSSettings = shift; my $installInfoFile = "$self->{'vendor-os-path'}/.openslx-install-info"; if (-e $installInfoFile) { @@ -301,11 +302,16 @@ sub installVendorOS ); # create the install-info file, in order to indicate a proper installation: - spitFile($installInfoFile, - "SLX_META_PACKAGER=$self->{distro}->{'meta-packager-type'}\n"); + spitFile( + $installInfoFile, + "SLX_META_PACKAGER=$self->{distro}->{'meta-packager-type'}\n" + ); + + # base system info file is no longer needed, we have a full system now slxsystem("rm $baseSystemFile"); - # no longer needed, we have a full system now + $self->_applyVendorOSSettings($vendorOSSettings) unless !$vendorOSSettings; + vlog( 0, _tr( @@ -950,6 +956,22 @@ sub _expandSelection return; } +sub _applyVendorOSSettings +{ + my $self = shift; + my $vendorOSSettings = shift; + + if (exists $vendorOSSettings->{'root-password'}) { + # hashes password according to requirements of current distro and + # writes it to /etc/shadow + $self->{distro}->setPasswordForUser( + 'root', $vendorOSSettings->{'root-password'} + ); + } + + return; +} + sub _createVendorOSPath { my $self = shift; @@ -1320,7 +1342,12 @@ sub _stage1B_chrootAndBootstrap ); $self->{'baseURL-index'} = 0; my @pkgs = string2Array($self->{'distro-info'}->{'prereq-packages'}); + vlog( + 2, + "downloading these prereq packages:\n\t" . join("\n\t", @pkgs) + ); my @prereqPkgs = $self->_downloadBaseFiles(\@pkgs); + $self->{'prereq-packages'} = \@prereqPkgs; $self->{packager}->bootstrap(\@prereqPkgs); @pkgs = string2Array($self->{'distro-info'}->{'bootstrap-packages'}); @@ -1328,9 +1355,13 @@ sub _stage1B_chrootAndBootstrap @pkgs, string2Array( $self->{'distro-info'}->{'metapackager'} - ->{$self->{distro}->{'meta-packager-type'}} + ->{$self->{distro}->{'meta-packager-type'}}->{packages} ) ); + vlog( + 2, + "downloading bootstrap packages:\n\t" . join("\n\t", @pkgs) + ); my @bootstrapPkgs = $self->_downloadBaseFiles(\@pkgs); $self->{'bootstrap-packages'} = \@bootstrapPkgs; }, @@ -1368,7 +1399,11 @@ sub _stage1C_chrootAndInstallBasicVendorOS $self->{packager}->importTrustedPackageKeys(\@keyFiles, $stage1cDir); } - # install all bootstrap packages + # install prerequired packages (if distro requires it) + $self->{packager}->installPrerequiredPackages( + $self->{'prereq-packages'}, $stage1cDir + ); + # install bootstrap packages $self->{packager}->installPackages( $self->{'bootstrap-packages'}, $stage1cDir ); |