summaryrefslogtreecommitdiffstats
path: root/perl-install/install_any.pm
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2001-06-21 17:47:09 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2001-06-21 17:47:09 +0000
commit014a1102307fdf7a894aff048dd8858e74260296 (patch)
tree866dd3a1aa9940eda36ff5524e20ed3d4671041c /perl-install/install_any.pm
parent96523a38ffde244945986cdacb24ba88d1614a46 (diff)
downloaddrakx-014a1102307fdf7a894aff048dd8858e74260296.tar
drakx-014a1102307fdf7a894aff048dd8858e74260296.tar.gz
drakx-014a1102307fdf7a894aff048dd8858e74260296.tar.bz2
drakx-014a1102307fdf7a894aff048dd8858e74260296.tar.xz
drakx-014a1102307fdf7a894aff048dd8858e74260296.zip
generate_automatic_stage1_params: listize
Diffstat (limited to 'perl-install/install_any.pm')
-rw-r--r--perl-install/install_any.pm21
1 files changed, 10 insertions, 11 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index 6650c82f3..6902f64a8 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -728,35 +728,34 @@ sub loadO {
sub generate_automatic_stage1_params {
my ($o) = @_;
+ my @ks = ();
- my $ks = "automatic=";
-
if ($o->{method} =~ /hd/) {
- $ks .= "method:disk,";
+ push @ks, "method:disk";
} else {
- $ks .= "method:" . $o->{method} . ",";
+ push @ks, "method:" . $o->{method};
}
if ($o->{method} =~ /http/) {
"$ENV{URLPREFIX}" =~ m|http://(.*)/(.*)| or die;
- $ks .= "server:$1,directory:$2,";
+ push @ks, "server:$1", "directory:$2";
} elsif ($o->{method} =~ /ftp/) {
- $ks .= "server:$ENV{HOST},directory:$ENV{PREFIX},user:$ENV{LOGIN},pass:$ENV{PASSWORD},";
+ push @ks, "server:$ENV{HOST}", "directory:$ENV{PREFIX}", "user:$ENV{LOGIN}", "pass:$ENV{PASSWORD}";
} elsif ($o->{method} =~ /nfs/) {
cat_("/proc/mounts") =~ m|(\S+):(\S+)\s+/tmp/image nfs| or die;
- $ks .= "server:$1,directory:$2,";
+ push @ks, "server:$1", "directory:$2";
}
my ($intf) = values %{$o->{intf}};
if ($intf->{BOOTPROTO} =~ /dhcp/) {
- $ks .= "network:dhcp,";
+ push @ks, "network:dhcp";
} else {
require network;
- $ks .= "network:static,ip:$intf->{IPADDR},netmask:$intf->{NETMASK},gateway:$o->{netc}{GATEWAY},";
+ push @ks, "network:static", "ip:$intf->{IPADDR}", "netmask:$intf->{NETMASK}", "gateway:$o->{netc}{GATEWAY}";
my @dnss = network::dnsServers($o->{netc});
- $ks .= "dns:$dnss[0]," if @dnss;
+ push @ks, "dns:$dnss[0]" if @dnss;
}
- $ks;
+ "automatic=".join(',', @ks);
}
sub guess_mount_point {