summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-08-21 18:15:37 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-08-21 18:15:37 +0000
commite2df2b17c50af038bbfe15f5b6dd9a21c532ae5b (patch)
tree61b2e028ffcbbb85172104a24693a20cab0d30ba
parent12eb8608ad517afff8c323e276f2f4f4e5405896 (diff)
downloaddrakx-e2df2b17c50af038bbfe15f5b6dd9a21c532ae5b.tar
drakx-e2df2b17c50af038bbfe15f5b6dd9a21c532ae5b.tar.gz
drakx-e2df2b17c50af038bbfe15f5b6dd9a21c532ae5b.tar.bz2
drakx-e2df2b17c50af038bbfe15f5b6dd9a21c532ae5b.tar.xz
drakx-e2df2b17c50af038bbfe15f5b6dd9a21c532ae5b.zip
no_comment
-rw-r--r--perl-install/ChangeLog4
-rw-r--r--perl-install/Makefile2
-rw-r--r--perl-install/fs.pm1
-rw-r--r--perl-install/fsedit.pm25
-rw-r--r--perl-install/install2.pm31
-rw-r--r--perl-install/install_any.pm65
-rw-r--r--perl-install/install_interactive.pm142
-rw-r--r--perl-install/install_steps.pm10
-rw-r--r--perl-install/install_steps_auto_install.pm2
-rw-r--r--perl-install/install_steps_interactive.pm42
-rw-r--r--perl-install/modules.pm6
-rw-r--r--perl-install/partition_table.pm2
-rw-r--r--perl-install/partition_table_raw.pm10
13 files changed, 159 insertions, 183 deletions
diff --git a/perl-install/ChangeLog b/perl-install/ChangeLog
index 0987eda0c..72f841de5 100644
--- a/perl-install/ChangeLog
+++ b/perl-install/ChangeLog
@@ -3,6 +3,10 @@
* moved Netconnect.pm to netconnect.pm
* moved DrakFuck to drakfuck
+2000-08-18 Pixel <pixel@mandrakesoft.com>
+
+ * share/Cards+: for i810, force VideoRam
+
2000-08-18 dam's <damien@mandrakesoft.com>
* modules.pm: added isdn type in @drivers_by_category. corrected
diff --git a/perl-install/Makefile b/perl-install/Makefile
index 299a34b85..8b56ad717 100644
--- a/perl-install/Makefile
+++ b/perl-install/Makefile
@@ -9,7 +9,7 @@ TAGS: $(PMS)
clean:
for i in $(DIRS); do $(MAKE) -C $$i clean; done
- rm -rf auto
+ rm -rf auto ../drakxtools.tar.bz2
find . -name "*~" -o -name ".#*" -o -name "TAGS" -o -name "*.old" | xargs rm -f
tar-drakxtools: clean
diff --git a/perl-install/fs.pm b/perl-install/fs.pm
index c23ee948f..ece25b600 100644
--- a/perl-install/fs.pm
+++ b/perl-install/fs.pm
@@ -287,6 +287,7 @@ sub umount_part($;$) {
sub mount_all($;$$) {
my ($fstab, $prefix) = @_;
+ #- TODO fsck, create check_mount_all ?
log::l("mounting all filesystems");
#- order mount by alphabetical ordre, that way / < /home < /home/httpd...
diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm
index 813eb37e8..a868493f4 100644
--- a/perl-install/fsedit.pm
+++ b/perl-install/fsedit.pm
@@ -66,7 +66,6 @@ sub hds {
eval { partition_table::read($hd, $flags->{clearall} || member($_->{device}, @{$flags->{clear} || []})) };
if ($@) {
- cdie($@) unless $flags->{eraseBadPartitions};
partition_table_raw::zero_MBR($hd);
}
member($_->{device}, @{$flags->{clear} || []}) and partition_table::remove($hd, $_)
@@ -117,14 +116,6 @@ sub hasRAID {
$b;
}
-sub get_root {
- my ($fstab, $boot) = @_;
- if ($boot) { $_->{mntpoint} eq "/boot" and return $_ foreach @$fstab; }
- $_->{mntpoint} eq "/" and return $_ foreach @$fstab;
- undef;
-}
-sub get_root_ { get_root([ get_fstab(@{$_[0]}) ], $_[1]) }
-
sub is_one_big_fat {
my ($hds) = @_;
@$hds == 1 or return;
@@ -225,12 +216,17 @@ sub suggestions_mntpoint {
#-}
-sub has_mntpoint($$) {
+sub mntpoint2part {
+ my ($mntpoint, $fstab) = @_;
+ first(grep { $mntpoint eq $_->{mntpoint} } @$fstab);
+}
+sub has_mntpoint {
my ($mntpoint, $hds) = @_;
- scalar grep {
- $mntpoint eq $_->{mntpoint} ||
- grep { $mntpoint eq $_->{mntpoint} } @{$_->{loopback} || []}
- } get_fstab(@$hds);
+ mntpoint2part($mntpoint, [ get_fstab(@$hds) ]);
+}
+sub get_root {
+ my ($fstab, $boot) = @_;
+ $boot && mntpoint2part("/boot", $fstab) || mntpoint2part("/", $fstab);
}
#- do this before modifying $part->{mntpoint}
@@ -436,6 +432,7 @@ sub verifyHds {
partition_table_raw::zero_MBR($hd);
$hd->{primary} = { normal => [ grep { $hd->{device} eq $_->{rootDevice} } @parts ] };
}
+ $ok = 1;
}
$readonly && get_fstab(@$hds) == 0 and die _("You don't have any partitions!");
$ok;
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index cfa566187..dff89ba0f 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -580,7 +580,8 @@ sub main {
mkdir $o->{root}, 0755;
#- make sure we don't pick up any gunk from the outside world
- $ENV{PATH} = "/usr/bin:/bin:/sbin:/usr/sbin:/usr/X11R6/bin:$o->{prefix}/sbin:$o->{prefix}/bin:$o->{prefix}/usr/sbin:$o->{prefix}/usr/bin:$o->{prefix}/usr/X11R6/bin" unless $::g_auto_install;
+ my $remote_path = "$o->{prefix}/sbin:$o->{prefix}/bin:$o->{prefix}/usr/sbin:$o->{prefix}/usr/bin:$o->{prefix}/usr/X11R6/bin";
+ $ENV{PATH} = "/usr/bin:/bin:/sbin:/usr/sbin:/usr/X11R6/bin:$remote_path" unless $::g_auto_install;
$o->{interactive} ||= 'gtk';
if ($o->{interactive} eq "gtk" && availableMemory < 22 * 1024) {
@@ -608,11 +609,22 @@ sub main {
$o->{prefix} = $::testing ? "/tmp/test-perl-install" : "/mnt";
mkdir $o->{prefix}, 0755;
+ modules::unload($_) foreach qw(vfat msdos fat);
+ modules::load_deps(($::testing ? ".." : "") . "/modules/modules.dep");
+ modules::read_stage1_conf("/tmp/conf.modules");
+ modules::read_already_loaded();
+
+ eval { modules::load("af_packet") };
+
+ map_index {
+ modules::add_alias("sound-slot-$::i", $_->{driver});
+ } modules::get_that_type('sound');
+
#- needed very early for install_steps_gtk
modules::load_thiskind("usb");
eval { ($o->{mouse}, $o->{wacom}) = mouse::detect() } unless $o->{nomouseprobe} || $o->{mouse};
- lang::set($o->{lang}) if $o->{lang} ne 'en'; #- mainly for defcfg
+ lang::set($o->{lang}); #- mainly for defcfg
$o->{allowFB} = listlength(cat_("/proc/fb"));
@@ -652,19 +664,6 @@ sub main {
add2hash(network::findIntf($o->{intf} ||= [], $l->{DEVICE}), $l);
}
- modules::unload($_) foreach qw(vfat msdos fat);
- modules::load_deps(($::testing ? ".." : "") . "/modules/modules.dep");
- modules::read_stage1_conf("/tmp/conf.modules");
- modules::read_already_loaded();
-
- eval { modules::load("af_packet") };
-
- map_index {
- modules::add_alias("snd-slot-$::i", $_->{driver});
- } modules::get_that_type('sound');
-
- lang::set($o->{lang});
-
#-the main cycle
my $clicked = 0;
MAIN: for ($o->{step} = $o->{steps}{first};; $o->{step} = getNextStep()) {
@@ -713,6 +712,8 @@ sub main {
#- mainly for auto_install's
run_program::rooted($o->{prefix}, "sh", "-c", $o->{postInstall}) if $o->{postInstall};
+ do { local $ENV{PATH} = $remote_path;
+ run_program::run("bash", "-c", $o->{postInstallNonRooted}) } if $o->{postInstallNonRooted};
#- have the really bleeding edge ddebug.log
eval { commands::cp('-f', "/tmp/ddebug.log", "$o->{prefix}/root") };
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index 9655d1834..16e32b465 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -597,7 +597,7 @@ sub generate_ks_cfg {
}
sub suggest_mount_points {
- my ($hds, $prefix) = @_;
+ my ($hds, $prefix, $uniq) = @_;
my @parts = grep { isTrueFS($_) } fsedit::get_fstab(@$hds);
my (%mntpoints, $user);
@@ -617,7 +617,8 @@ sub suggest_mount_points {
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";
-
+
+ next if $uniq && fsedit::mntpoint2part($mnt, \@parts);
$part->{mntpoint} = $mnt;
# try to find other mount points via fstab
@@ -631,13 +632,69 @@ sub suggest_mount_points {
#- 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);
}
sub use_root_part {
my ($fstab, $part, $prefix) = @_;
- my $handle = any::inspect($part, $prefix) or die;
- fs::get_mntpoints_from_fstab($fstab, $handle->{dir});
+ {
+ my $handle = any::inspect($part, $prefix) or die;
+ fs::get_mntpoints_from_fstab($fstab, $handle->{dir});
+ }
+
+ map { $_->{mntpoint} = 'swap_upgrade' } grep { isSwap($_) } @$fstab; #- use all available swap.
+ fs::mount_all($fstab, $prefix);
+}
+
+sub getHds {
+ my ($o, $f_err) = @_;
+ my $ok = 1;
+ my $flags = $o->{partitioning};
+
+ my @drives = detect_devices::hds();
+# add2hash_($o->{partitioning}, { readonly => 1 }) if partition_table_raw::typeOfMBR($drives[0]{device}) eq 'system_commander';
+
+ getHds:
+ $o->{hds} = catch_cdie { fsedit::hds(\@drives, $flags) }
+ sub {
+ $ok = 0;
+ log::l("error reading partition table: $@");
+ my ($err) = $@ =~ /(.*) at /;
+ $flags->{readonly} && $f_err and $f_err->($err);
+ };
+
+ if (is_empty_array_ref($o->{hds}) && $o->{autoSCSI}) {
+ $o->setupSCSI; #- ask for an unautodetected scsi card
+ goto getHds;
+ }
+
+ $ok = fsedit::verifyHds($o->{hds}, $flags->{readonly}, $ok)
+ unless $flags->{clearall} || $flags->{clear};
+
+ $o->{fstab} = [ fsedit::get_fstab(@{$o->{hds}}) ];
+ fs::check_mounted($o->{fstab});
+ fs::merge_fstabs($o->{fstab}, $o->{manualFstab});
+
+ my @win = grep { isFat($_) && isFat({ type => fsedit::typeOfPart($_->{device}) }) } @{$o->{fstab}};
+ log::l("win parts: ", join ",", map { $_->{device} } @win) if @win;
+ if (@win == 1) {
+ $win[0]{mntpoint} = "/mnt/windows";
+ } else {
+ my %w; foreach (@win) {
+ my $v = $w{$_->{device_windobe}}++;
+ $_->{mntpoint} = "/mnt/win_" . lc($_->{device_windobe}) . ($v ? $v+1 : ''); #- lc cuz of StartOffice(!) cf dadou
+ }
+ }
+
+ my @sunos = grep { isSunOS($_) && type2name($_->{type}) =~ /root/i } @{$o->{fstab}}; #- take only into account root partitions.
+ if (@sunos) {
+ my $v = '';
+ map { $_->{mntpoint} = "/mnt/sunos" . ($v && ++$v) } @sunos;
+ }
+ #- a good job is to mount SunOS root partition, and to use mount point described here in /etc/vfstab.
+
+ $ok;
}
1;
diff --git a/perl-install/install_interactive.pm b/perl-install/install_interactive.pm
index 796402eb9..e7c7e625a 100644
--- a/perl-install/install_interactive.pm
+++ b/perl-install/install_interactive.pm
@@ -16,117 +16,6 @@ use devices;
use modules;
-sub getHds {
- my ($o) = @_;
- my ($ok, $ok2) = (1, 1);
- my $flags = $o->{partitioning};
-
- my @drives = detect_devices::hds();
-# add2hash_($o->{partitioning}, { readonly => 1 }) if partition_table_raw::typeOfMBR($drives[0]{device}) eq 'system_commander';
-
- getHds:
- $o->{hds} = catch_cdie { fsedit::hds(\@drives, $flags) }
- sub {
- log::l("error reading partition table: $@");
- my ($err) = $@ =~ /(.*) at /;
- $@ =~ /overlapping/ and $o->ask_warn('', $@), return 1;
- $o->ask_okcancel(_("Error"),
-[_("I can't read your partition table, it's too corrupted for me :(
-I'll try to go on blanking bad partitions"), $err]) unless $flags->{readonly};
- $ok = 0; 1
- };
-
- if (is_empty_array_ref($o->{hds}) && $o->{autoSCSI}) {
- $o->setupSCSI; #- ask for an unautodetected scsi card
- goto getHds;
- }
-
- $ok2 = fsedit::verifyHds($o->{hds}, $flags->{readonly}, $ok)
- unless $flags->{clearall} || $flags->{clear};
-
- $o->{fstab} = [ fsedit::get_fstab(@{$o->{hds}}) ];
- fs::check_mounted($o->{fstab});
- fs::merge_fstabs($o->{fstab}, $o->{manualFstab});
-
- $o->ask_warn('',
-_("DiskDrake failed to read correctly the partition table.
-Continue at your own risk!")) if !$ok2 && $ok && !$flags->{readonly};
-
- my @win = grep { isFat($_) && isFat({ type => fsedit::typeOfPart($_->{device}) }) } @{$o->{fstab}};
- log::l("win parts: ", join ",", map { $_->{device} } @win) if @win;
- if (@win == 1) {
- $win[0]{mntpoint} = "/mnt/windows";
- } else {
- my %w; foreach (@win) {
- my $v = $w{$_->{device_windobe}}++;
- $_->{mntpoint} = "/mnt/win_" . lc($_->{device_windobe}) . ($v ? $v+1 : ''); #- lc cuz of StartOffice(!) cf dadou
- }
- }
-
- my @sunos = grep { isSunOS($_) && type2name($_->{type}) =~ /root/i } @{$o->{fstab}}; #- take only into account root partitions.
- if (@sunos) {
- my $v = '';
- map { $_->{mntpoint} = "/mnt/sunos" . ($v && ++$v) } @sunos;
- }
- #- a good job is to mount SunOS root partition, and to use mount point described here in /etc/vfstab.
-
- $ok2;
-}
-
-
-sub searchAndMount4Upgrade {
- my ($o) = @_;
- my ($root, $found);
-
- my $w = !$::expert && $o->wait_message('', _("Searching root partition."));
-
- #- try to find the partition where the system is installed if beginner
- #- else ask the user the right partition, and test it after.
- getHds($o);
-
- #- get all ext2 partition that may be root partition.
- my %Parts = my %parts = map { $_->{device} => $_ } grep { isTrueFS($_) } @{$o->{fstab}};
- while (keys(%parts) > 0) {
- $root = $::beginner ? first(%parts) : $o->selectRootPartition(keys %parts);
- $root = delete $parts{$root};
-
- my $r; unless ($r = $root->{realMntpoint}) {
- $r = $o->{prefix};
- $root->{mntpoint} = "/";
- log::l("trying to mount partition $root->{device}");
- eval { fs::mount_part($root, $o->{prefix}, 'readonly') };
- $r = "/*ERROR*" if $@;
- }
- $found = -d "$r/etc/sysconfig" && [ fs::read_fstab("$r/etc/fstab") ];
-
- unless ($root->{realMntpoint}) {
- log::l("umounting partition $root->{device}");
- eval { fs::umount_part($root, $o->{prefix}) };
- }
-
- last if !is_empty_array_ref($found);
-
- delete $root->{mntpoint};
- $o->ask_warn(_("Information"),
- _("%s: This is not a root partition, please select another one.", $root->{device})) unless $::beginner;
- }
- is_empty_array_ref($found) and die _("No root partition found");
-
- log::l("found root partition : $root->{device}");
-
- #- test if the partition has to be fsck'ed and remounted rw.
- if ($root->{realMntpoint}) {
- ($o->{prefix}, $root->{mntpoint}) = ($root->{realMntpoint}, '/');
- } else {
- delete $root->{mntpoint};
- ($Parts{$_->{device}} || {})->{mntpoint} = $_->{mntpoint} foreach @$found;
- map { $_->{mntpoint} = 'swap_upgrade' } grep { isSwap($_) } @{$o->{fstab}}; #- use all available swap.
-
- #- TODO fsck, create check_mount_all ?
- fs::mount_all([ grep { isTrueFS($_) || isSwap($_) } @{$o->{fstab}} ], $o->{prefix});
- }
-}
-
sub partitionWizard {
my ($o, $hds, $fstab, $readonly) = @_;
my @wizlog;
@@ -252,21 +141,20 @@ Then choose action ``Mount point'' and set it to `/'"), 1) or return;
} ];
}
- if (!$readonly) { #- diskdrake only available in gtk for now
- $solutions{fdisk} =
- [ -10, _("Use fdisk"), sub {
- $o->suspend;
- foreach (@$hds) {
- print "\n" x 10, _("You can now partition %s.
+ $solutions{fdisk} =
+ [ -10, _("Use fdisk"), sub {
+ $o->suspend;
+ foreach (@$hds) {
+ print "\n" x 10, _("You can now partition %s.
When you are done, don't forget to save using `w'", partition_table_raw::description($_));
- print "\n\n";
- my $pid = fork or exec "fdisk", devices::make($_->{device});
- waitpid($pid, 0);
- }
- $o->resume;
- 0;
- } ];
- }
+ print "\n\n";
+ my $pid = fork or exec "fdisk", devices::make($_->{device});
+ waitpid($pid, 0);
+ }
+ $o->resume;
+ 0;
+ } ];
+
log::l("partitioning wizard log:\n", (map { ">>wizlog>>$_\n" } @wizlog));
%solutions;
}
@@ -297,7 +185,7 @@ sub setup_thiskind {
if (my @err = grep { $_->{error} } map { $_->{error} } @l) {
$o->ask_warn('', join("\n", @err));
}
- return if $auto && (@l || !$at_least_one);
+ return @l if $auto && (@l || !$at_least_one);
}
@l = map { $_->{description} } @l;
while (1) {
@@ -310,7 +198,7 @@ sub setup_thiskind {
push @$opt, __("See hardware info") if $::expert;
my $r = "Yes";
$r = $o->ask_from_list_('', $msg, $opt, "No") unless $at_least_one && @l == 0;
- if ($r eq "No") { return }
+ if ($r eq "No") { return @l }
if ($r eq "Yes") {
push @l, $o->load_module($type) || next;
} else {
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index 7b2ae7416..06d24c232 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -123,6 +123,7 @@ sub setupSCSI {
modules::load_ide();
modules::load_thiskind('scsi|disk');
}
+
#------------------------------------------------------------------------------
sub doPartitionDisksBefore {
my ($o) = @_;
@@ -135,7 +136,6 @@ sub doPartitionDisksBefore {
eval { fs::umount_all($o->{fstab}, $o->{prefix}) } if $o->{fstab} && !$::testing;
$o->{raid} ||= {};
- install_interactive::getHds($o);
}
#------------------------------------------------------------------------------
@@ -161,13 +161,15 @@ sub doPartitionDisksAfter {
sub doPartitionDisks {
my ($o) = @_;
+ install_any::getHds($o);
+
if ($o->{isUpgrade}) {
# either one root is defined (and all is ok), or we take the first one we find
my $p = fsedit::get_root($o->{fstab}) || first(install_any::find_root_parts($o->{hds}, $o->{prefix})) or die;
install_any::use_root_part($o->{fstab}, $p, $o->{prefix});
- } else {
- #TODO;
- }
+ } elsif ($o->{partitioning}{auto_allocate}) {
+ fsedit::auto_allocate($o->{hds}, $o->{partitions});
+ }
}
#------------------------------------------------------------------------------
diff --git a/perl-install/install_steps_auto_install.pm b/perl-install/install_steps_auto_install.pm
index 3fc5fcd09..400e2f776 100644
--- a/perl-install/install_steps_auto_install.pm
+++ b/perl-install/install_steps_auto_install.pm
@@ -66,7 +66,7 @@ sub exitInstall {
} else {
install_steps::exitInstall;
print "\a";
- print "Auto installation complete\n";
+ print "Auto installation complete (the postInstall is done yet though)\n";
print "Press <Enter> to reboot\n";
<STDIN>;
}
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index ef5760094..494c61d34 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -160,7 +160,7 @@ sub selectMouse {
[ mouse::serial_ports ]);
}
- $o->setup_thiskind('SERIAL_USB', !$::expert, 0) if $o->{mouse}{device} eq "usbmouse";
+ install_interactive::setup_thiskind($o, 'usb', !$::expert, 0) if $o->{mouse}{device} eq "usbmouse";
eval {
devices::make("usbmouse");
modules::load("usbmouse");
@@ -189,7 +189,7 @@ sub ask_mntpoint_s {
if (@fstab == 1) {
$fstab[0]{mntpoint} = '/';
} else {
- install_any::suggest_mount_points($o->{hds}, $o->{prefix});
+ install_any::suggest_mount_points($o->{hds}, $o->{prefix}, 'uniq');
$o->ask_from_entries_refH('',
_("Choose the mount points"),
[ map { partition_table_raw::description($_) =>
@@ -202,13 +202,33 @@ sub ask_mntpoint_s {
#------------------------------------------------------------------------------
sub doPartitionDisks {
my ($o) = @_;
+
+ my $warned;
+ install_any::getHds($o, sub {
+ my ($err) = @_;
+ $warned = 1;
+ if ($o->ask_okcancel(_("Error"),
+[_("I can't read your partition table, it's too corrupted for me :(
+I'll try to go on blanking bad partitions and ALL DATA will be lost
+(%s)"), $err])) {
+ 0;
+ } else {
+ $o->{partitioning}{readonly} = 1;
+ 1;
+ }
+ }) or $warned or $o->ask_warn('',
+_("DiskDrake failed to read correctly the partition table.
+Continue at your own risk!"));
+
+
if ($o->{isUpgrade}) {
# either one root is defined (and all is ok), or we take the first one we find
- my @p = fsedit::get_root($o->{fstab});
- @p = install_any::find_root_parts($o->{hds}, $o->{prefix}) if !@p;
- my $p = $o->ask_from_listf(_("Root Partition"),
- _("What is the root partition (/) of your system?"),
- \&partition_table_raw::description, [ @p ]) or die "setstep exitInstall\n";
+ my $p =
+ fsedit::get_root($o->{fstab}) ||
+ $o->ask_from_listf(_("Root Partition"),
+ _("What is the root partition (/) of your system?"),
+ \&partition_table_raw::description,
+ [ install_any::find_root_parts($o->{hds}, $o->{prefix}) ]) or die "setstep exitInstall\n";
install_any::use_root_part($o->{fstab}, $p, $o->{prefix});
} else {
my %solutions = install_interactive::partitionWizard($o, $o->{hds}, $o->{fstab}, $o->{partitioning}{readonly});
@@ -450,14 +470,14 @@ sub configureNetwork($) {
_("Local networking has already been configured. Do you want to:"),
[ @l ]) || "Do not";
} else {
- $_ = $::beginner ? "Do not" :
- ($o->ask_yesorno([ _("Network Configuration") ],
- _("Do you want to configure a local network for your system?"), 0) ? "Local LAN" : "Do not");
+ $_ = (!$::beginner || install_interactive::setup_thiskind($o, 'net', 1, 0)) &&
+ $o->ask_yesorno([ _("Network Configuration") ],
+ _("Do you want to configure a local network for your system?"), 0) ? "Local LAN" : "Do not";
}
if (/^Do not/) {
$o->{netc}{NETWORKING} = "false";
} elsif (!/^Keep/) {
- $o->setup_thiskind('net', !$::expert, 1);
+ install_interactive::setup_thiskind($o, 'net', !$::expert, 1);
my @l = detect_devices::getNet() or die _("no network card found");
my $last; foreach ($::beginner ? $l[0] : @l) {
diff --git a/perl-install/modules.pm b/perl-install/modules.pm
index 77091048d..cdee937ee 100644
--- a/perl-install/modules.pm
+++ b/perl-install/modules.pm
@@ -399,8 +399,8 @@ sub load_multi {
load_raw(map { [ $_ ] } @l);
}
-sub unload($;$) {
- my ($m, $remove_alias) = @_;
+sub unload {
+ my ($m) = @_;
if ($::testing) {
log::l("rmmod $m");
} else {
@@ -408,7 +408,6 @@ sub unload($;$) {
delete $conf{$m}{loaded};
}
}
- remove_alias($m) if $remove_alias;
}
sub load_raw {
@@ -434,6 +433,7 @@ sub load_raw {
/^irq=(\d+)/ and eval { output "/proc/parport/0/irq", $1 };
}
} elsif ($_->[0] =~ /usb-[uo]hci/) {
+ add_alias('usb-interface', $_->[0]);
#- ensure keyboard is working, the kernel must do the job the BIOS was doing
load_multi("usbkbd", "keybdev");
}
diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm
index bcfc81e14..547c1b8e1 100644
--- a/perl-install/partition_table.pm
+++ b/perl-install/partition_table.pm
@@ -401,7 +401,7 @@ sub read_one($$) {
sub read($;$) {
my ($hd, $clearall) = @_;
if ($clearall) {
- partition_table_raw::zero_MBR($hd);
+ partition_table_raw::zero_MBR_and_dirty($hd);
return 1;
}
my $pt = read_one($hd, 0) or return 0;
diff --git a/perl-install/partition_table_raw.pm b/perl-install/partition_table_raw.pm
index 70bb99fd4..7eee56f5a 100644
--- a/perl-install/partition_table_raw.pm
+++ b/perl-install/partition_table_raw.pm
@@ -115,14 +115,20 @@ sub kernel_read($) {
sync(); sleep(1);
}
-sub zero_MBR($) {
+sub zero_MBR {
my ($hd) = @_;
#- force the standard partition type for the architecture
my $type = arch() eq "alpha" ? "bsd" : arch() =~ /^sparc/ ? "sun" : arch() eq "ppc" ? "mac" : "dos";
bless $hd, "partition_table_$type";
- $hd->{isDirty} = $hd->{needKernelReread} = 1;
$hd->{primary} = $hd->clear_raw();
delete $hd->{extended};
}
+sub zero_MBR_and_dirty {
+ my ($hd) = @_;
+ zero_MBR($hd);
+ $hd->{isDirty} = $hd->{needKernelReread} = 1;
+
+}
+
1;