summaryrefslogtreecommitdiffstats
path: root/perl-install/ChangeLog
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-03-14 00:41:06 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-03-14 00:41:06 +0000
commit3087d113c7c65d2d6d7ea93af46b4ce5c743ba76 (patch)
tree1c2d0f66ba86516bed0dc38092d6170652c99d15 /perl-install/ChangeLog
parent2013c953f3f4c67904c0592c7038890aad176344 (diff)
downloaddrakx-3087d113c7c65d2d6d7ea93af46b4ce5c743ba76.tar
drakx-3087d113c7c65d2d6d7ea93af46b4ce5c743ba76.tar.gz
drakx-3087d113c7c65d2d6d7ea93af46b4ce5c743ba76.tar.bz2
drakx-3087d113c7c65d2d6d7ea93af46b4ce5c743ba76.tar.xz
drakx-3087d113c7c65d2d6d7ea93af46b4ce5c743ba76.zip
*** empty log message ***
Diffstat (limited to 'perl-install/ChangeLog')
-rw-r--r--perl-install/ChangeLog4
1 files changed, 2 insertions, 2 deletions
diff --git a/perl-install/ChangeLog b/perl-install/ChangeLog
index 95b9d19d1..98e6d1110 100644
--- a/perl-install/ChangeLog
+++ b/perl-install/ChangeLog
@@ -1,6 +1,6 @@
-2001-03-13 Yves Duret <yduret@mandrakesoft.com>
+2001/03/13 siegel
- * bootlook.pm: updated, still need to use my_gtk...
+ * share/po/de.po: Fixed typos.
2001/03/13 dam's <damien@mandrakesoft.com>
ref='#n162'>162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203
package install_steps;

use diagnostics;
use strict;

use common qw(:file :system);
use install_any qw(:all);
use partition_table qw(:types);
use run_program;
use lilo;
use lang;
use keyboard;
use pkgs;
use cpio;
use log;
use fsedit;
use commands;


my $o;

1;


sub new($$) {
    my ($type, $o_) = @_;

    $o = bless $o_, ref $type || $type;
}

sub enteringStep($$) {
    my ($o, $step) = @_;
    log::l("starting step `$step'");
}
sub leavingStep($$) {
    my ($o, $step) = @_;
    log::l("step `$step' finished");
}

sub errorInStep($$) {}

sub chooseLanguage($) {
    $o->{default}->{lang};
}
sub selectInstallOrUpgrade($) {
    $o->{default}->{isUpgrade} || 0;
}
sub selectInstallClass($@) {
    $o->{default}->{installClass} || $_[1];
}
sub setupSCSIInterfaces {
    die "TODO";
}

sub doPartitionDisks($$) {
    my ($o, $hds) = @_;
    fsedit::auto_allocate($hds, $o->{default}->{partitions});
}
sub rebootNeeded($) {
    my ($o) = @_;
    log::l("Rebooting...");
    exit(0);
}

sub choosePartitionsToFormat($$) {
    my ($o, $fstab) = @_;

    foreach (@$fstab) { 
	$_->{toFormat} = $_->{mntpoint} && (isExt2($_) || isSwap($_)) &&
	  ($_->{notFormatted} || $o->{default}->{partitionning}->{autoformat});
    }
}

sub choosePackages($$$) {
    my ($o, $packages, $compss) = @_;
}

sub beforeInstallPackages($) {

    foreach (qw(dev etc home mnt tmp var var/tmp var/lib var/lib/rpm)) {
	mkdir "$o->{prefix}/$_", 0755;
    }

    unless ($o->{isUpgrade}) {
	local *F;
	open F, "> $o->{prefix}/etc/hosts" or die "Failed to create etc/hosts: $!";
	print F "127.0.0.1		localhost localhost.localdomain\n";
    }

    pkgs::init_db($o->{prefix}, $o->{isUpgrade});
}

sub installPackages($$) {
    my ($o, $packages) = @_;
    my $toInstall = [ grep { $_->{selected} } values %$packages ];
    pkgs::install($o->{prefix}, $toInstall, $o->{isUpgrade}, 0);
}

sub afterInstallPackages($) {
    my ($o) = @_;

    unless ($o->{isUpgrade}) {
        keyboard::write($o->{prefix}, $o->{keyboard});
        lang::write($o->{prefix});
    }
    #  why not? 
    sync(); sync();

#    configPCMCIA($o->{rootPath}, $o->{pcmcia});
}

sub mouseConfig($) { 
    #TODO
}

sub finishNetworking($) {
    my ($o) = @_;
#
#    rc = checkNetConfig(&$o->{intf}, &$o->{netc}, &$o->{intfFinal},
#			 &$o->{netcFinal}, &$o->{driversLoaded}, $o->{direction});
#
#    if (rc) return rc;
#
#    sprintf(path, "%s/etc/sysconfig", $o->{rootPath});
#    writeNetConfig(path, &$o->{netcFinal}, 
#		    &$o->{intfFinal}, 0);
#    strcat(path, "/network-scripts");
#    writeNetInterfaceConfig(path, &$o->{intfFinal});
#    sprintf(path, "%s/etc", $o->{rootPath});
#    writeResolvConf(path, &$o->{netcFinal});
#
#    #  this is a bit of a hack 
#    writeHosts(path, &$o->{netcFinal}, 
#		&$o->{intfFinal}, !$o->{isUpgrade});
#
#    return 0;
}

sub timeConfig {}
sub servicesConfig {}

sub setRootPassword($) {
    my ($o) = @_;
    my $p = $o->{prefix};
    my $pw = $o->{default}->{rootPassword};
    $pw = crypt_($pw);

    my $f = "$p/etc/passwd";
    my @lines = cat_($f, "failed to open file $f");

    local *F;
    open F, "> $f" or die "failed to write file $f: $!\n";
    foreach (@lines) {
	s/^root:.*?:/root:$pw:/;
	print F $_;
    }
}

sub addUser($) {
    my ($o) = @_;
    my %u = %{$o->{default}->{user}};
    my $p = $o->{prefix};

    my $new_uid;
    #my @uids = map { (split)[2] } cat__("$p/etc/passwd");
    #for ($new_uid = 500; member($new_uid, @uids); $new_uid++) {}
    for ($new_uid = 500; getpwuid($new_uid); $new_uid++) {}

    my $new_gid;
    #my @gids = map { (split)[2] } cat__("$p/etc/group");
    #for ($new_gid = 500; member($new_gid, @gids); $new_gid++) {}
    for ($new_gid = 500; getgrgid($new_gid); $new_gid++) {}

    my $homedir = "$p/home/$u{name}";

    my $pw = crypt_($u{password});

    local *F;
    open F, ">> $p/etc/passwd" or die "can't append to passwd file: $!";
    print F "$u{name}:$pw:$new_uid:$new_gid:$u{realname}:/home/$u{name}:$u{shell}\n";
	    
    open F, ">> $p/etc/group" or die "can't append to group file: $!";
    print F "$u{name}::$new_gid:\n";

    eval { commands::cp("-f", "$p/etc/skel", $homedir) }; $@ and log::l("copying of skel failed: $@"), mkdir($homedir, 0750);
    commands::chown_("-r", "$new_uid.$new_gid", $homedir);
}

sub createBootdisk($) {
    lilo::mkbootdisk($o->{prefix}, versionString()) if $o->{default}->{mkbootdisk};
}

sub setupBootloader($) {
    my ($o) = @_;
    my $versionString = versionString();
    lilo::install($o->{prefix}, $o->{hds}, $o->{fstab}, $versionString, $o->{default}->{bootloader});
}

sub setupXfree {
    my ($o) = @_;
}

sub exitInstall {}