diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2000-10-04 13:05:07 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2000-10-04 13:05:07 +0000 |
commit | b355c7624b8c48db238faefe40b59ca8ad886fba (patch) | |
tree | 2c1f1038dc33002cc7fea5f4bf826249731a4781 /perl-install | |
parent | 88f4628c4f91a35a0d36dbf55e7bdb47e097dfe9 (diff) | |
download | drakx-b355c7624b8c48db238faefe40b59ca8ad886fba.tar drakx-b355c7624b8c48db238faefe40b59ca8ad886fba.tar.gz drakx-b355c7624b8c48db238faefe40b59ca8ad886fba.tar.bz2 drakx-b355c7624b8c48db238faefe40b59ca8ad886fba.tar.xz drakx-b355c7624b8c48db238faefe40b59ca8ad886fba.zip |
no_comment
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/ChangeLog | 9 | ||||
-rw-r--r-- | perl-install/Xconfigurator.pm | 2 | ||||
-rw-r--r-- | perl-install/bootloader.pm | 6 | ||||
-rw-r--r-- | perl-install/install_any.pm | 43 |
4 files changed, 37 insertions, 23 deletions
diff --git a/perl-install/ChangeLog b/perl-install/ChangeLog index a9d7488dd..9b4ad240b 100644 --- a/perl-install/ChangeLog +++ b/perl-install/ChangeLog @@ -1,3 +1,12 @@ +2000-10-04 Pixel <pixel@mandrakesoft.com> + + * Xconfigurator.pm (main): kill prefdm instead of autologin + + * install_any.pm (find_root_parts): don't use + suggest_mount_points, it couldn't do what we wanted + (guess_mount_point): created, contains the common stuff between + suggest_mount_points and find_root_parts + 2000-10-04 Guillaume Cottenceau <gc@mandrakesoft.com> * standalone/drakgw: fix some failing/untranslated i18n messages diff --git a/perl-install/Xconfigurator.pm b/perl-install/Xconfigurator.pm index fb9b0be10..203d184fe 100644 --- a/perl-install/Xconfigurator.pm +++ b/perl-install/Xconfigurator.pm @@ -1106,7 +1106,7 @@ Current configuration is: exec qw(perl -e), q{ my $wm = shift; for (my $nb = 30; $nb && `pidof "$wm"` > 0; $nb--) { sleep 1 } - system("killall X ; killall -15 xdm gdm kdm autologin") unless `pidof "$wm"` > 0; + system("killall X ; killall -15 xdm gdm kdm prefdm") unless `pidof "$wm"` > 0; }, $_; } $found = 1; last; diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index e20a6a270..0d33fb8ca 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -194,7 +194,7 @@ sub dev2prompath { #- SPARC only $dev; } -sub suggest($$$$$;$) { +sub suggest { my ($prefix, $lilo, $hds, $fstab, $kernelVersion, $vga_fb) = @_; my $root_part = fsedit::get_root($fstab); my $root = isLoopback($root_part) ? "loop7" : $root_part->{device}; @@ -233,9 +233,7 @@ sub suggest($$$$$;$) { my $msg_en = __("Welcome to %s the operating system chooser! -To list the possible choices, press <TAB>. - -To load one of them, write its name and press <ENTER> or +Choose an operating system in the list above or wait %d seconds for default boot. "); diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index fdd52c6a1..4cb1fc98b 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -616,11 +616,8 @@ sub generate_ks_cfg { $ks; } -sub suggest_mount_points { - my ($hds, $prefix, $uniq) = @_; - my @parts = grep { isTrueFS($_) } fsedit::get_fstab(@$hds); - - my (%mntpoints, $user); +sub guess_mount_point { + my ($part, $prefix, $user) = @_; my %l = ( '/' => 'etc/fstab', @@ -630,32 +627,42 @@ sub suggest_mount_points { '/var' => 'catman', ); - foreach my $part (@parts) { + my $handle = any::inspect($part, $prefix) or return; + my $d = $handle->{dir}; + my ($mnt) = grep { -e "$d/$l{$_}" } keys %l; + $mnt ||= (stat("$d/.bashrc"))[4] ? '/root' : '/home/user' . ++$$user if -e "$d/.bashrc"; + $mnt ||= (grep { -d $_ && (stat($_))[4] >= 500 && -e "$_/.bashrc" } glob_("$d")) ? '/home' : ''; + ($mnt, $handle); +} + +sub suggest_mount_points { + my ($hds, $prefix, $uniq) = @_; + my @fstab = fsedit::get_fstab(@$hds); + + my $user; + foreach my $part (grep { isTrueFS($_) } @fstab) { $part->{mntpoint} && !$part->{unsafeMntpoint} and next; #- if already found via an fstab - my $handle = any::inspect($part, $prefix) or return; - my $d = $handle->{dir}; - my ($mnt) = grep { -e "$d/$l{$_}" } keys %l; - $mnt ||= (stat("$d/.bashrc"))[4] ? '/root' : '/home/user' . ++$user if -e "$d/.bashrc"; - $mnt ||= (grep { -d $_ && (stat($_))[4] >= 500 && -e "$_/.bashrc" } glob_("$d")) ? '/home' : ''; + my ($mnt, $handle) = guess_mount_point($part, $prefix, \$user) or next; - next if $uniq && fsedit::mntpoint2part($mnt, \@parts); + next if $uniq && fsedit::mntpoint2part($mnt, \@fstab); $part->{mntpoint} = $mnt; delete $part->{unsafeMntpoint}; #- try to find other mount points via fstab - fs::get_mntpoints_from_fstab([ fsedit::get_fstab(@$hds) ], $d, $uniq) if $mnt eq '/'; + fs::get_mntpoints_from_fstab([ fsedit::get_fstab(@$hds) ], $handle->{dir}, $uniq) if $mnt eq '/'; } -#- $_->{mntpoint} || fsedit::suggest_part($_, $hds) foreach @parts; - - $_->{mntpoint} and log::l("suggest_mount_points: $_->{device} -> $_->{mntpoint}") foreach fsedit::get_fstab(@$hds); + $_->{mntpoint} and log::l("suggest_mount_points: $_->{device} -> $_->{mntpoint}") foreach @fstab; } #- mainly for finding the root partitions for upgrade sub find_root_parts { my ($hds, $prefix) = @_; log::l("find_root_parts"); - suggest_mount_points($hds, $prefix); - grep { delete($_->{mntpoint}) eq '/' } fsedit::get_fstab(@$hds); + my $user; + grep { + my ($mnt) = guess_mount_point($_, $prefix, \$user); + $mnt eq '/'; + } fsedit::get_fstab(@$hds); } sub use_root_part { my ($fstab, $part, $prefix) = @_; |