summaryrefslogtreecommitdiffstats
path: root/perl-install/install_any.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-03-30 14:35:23 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-03-30 14:35:23 +0000
commit18011f2e9d699e37c6da8bec2d02de2b84a96a85 (patch)
treefdf782dfce0c929d31fe317a8b22c62518c19f56 /perl-install/install_any.pm
parented9b8286889057ba6a4983d4afb266d74cac20f0 (diff)
downloaddrakx-backup-do-not-use-18011f2e9d699e37c6da8bec2d02de2b84a96a85.tar
drakx-backup-do-not-use-18011f2e9d699e37c6da8bec2d02de2b84a96a85.tar.gz
drakx-backup-do-not-use-18011f2e9d699e37c6da8bec2d02de2b84a96a85.tar.bz2
drakx-backup-do-not-use-18011f2e9d699e37c6da8bec2d02de2b84a96a85.tar.xz
drakx-backup-do-not-use-18011f2e9d699e37c6da8bec2d02de2b84a96a85.zip
no_comment
Diffstat (limited to 'perl-install/install_any.pm')
-rw-r--r--perl-install/install_any.pm27
1 files changed, 25 insertions, 2 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index 4c462f48d..663efb171 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -487,7 +487,7 @@ sub g_auto_install(;$) {
my @fields = qw(mntpoint type size);
$o->{partitions} = [ map { my %l; @l{@fields} = @$_{@fields}; \%l } grep { $_->{mntpoint} } @{$::o->{fstab}} ];
- exists $::o->{$_} and $o->{$_} = $::o->{$_} foreach qw(lang autoSCSI authentication printer mouse wacom netc timezone superuser intf keyboard mkbootdisk users installClass partitioning isUpgrade manualFstab nomouseprobe crypto modem useSupermount); #- TODO modules bootloader
+ exists $::o->{$_} and $o->{$_} = $::o->{$_} foreach qw(lang autoSCSI authentication printer mouse wacom netc timezone superuser intf keyboard mkbootdisk users installClass partitioning isUpgrade manualFstab nomouseprobe crypto security modem useSupermount); #- TODO modules bootloader
if (my $card = $::o->{X}{card}) {
$o->{X}{card}{$_} = $card->{$_} foreach qw(default_depth);
@@ -512,7 +512,7 @@ sub loadO {
if ($f =~ /^(floppy|patch)$/) {
my $f = $f eq "floppy" ? "auto_inst.cfg" : "patch";
unless ($::testing) {
- fs::mount(devices::make("fd0"), "/mnt", "vfat", 0);
+ fs::mount(devices::make("fd0"), "/mnt", "vfat", 'readonly');
$f = "/mnt/$f";
}
-e $f or $f .= ".pl";
@@ -758,5 +758,28 @@ sub move_desktop_file($) {
}
}
+sub generate_ks_cfg {
+ my ($o) = @_;
+
+ return if $o->{method} =~ /hd|cdrom/;
+
+ my $ks;
+ if ($o->{method} =~ /ftp|http/) {
+ $ks .= "url --url $ENV{URLPREFIX}\n";
+ } elsif ($o->{method} =~ /nfs/) {
+ cat_("/proc/mounts") =~ m|(\S+:\S+)\s+/tmp/rhimage nfs| or die;
+ $ks .= "nfs --server $1 --dir $2\n";
+ }
+ my %intf = %{$o->{intf}[0]};
+ if ($intf{BOOTPROTO} =~ /^(dhcp|bootp)$/) {
+ $ks .= "network --bootproto $intf{BOOTPROTO}\n";
+ } else {
+ my %l = (ip => $intf{IPADDR}, netmask => $intf{NETMASK}, gateway => $o->{netc}{GATEWAY});
+ $ks .= "network " . join(" ", map_each { $::b && "--$::a $::b" } %l);
+ $ks .= "--nameserver $_" foreach network::dnsServers($o->{netc});
+ $ks .= "\n";
+ }
+ $ks;
+}
1;