summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/drakpxe
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-06-03 07:14:48 +0000
committerOlivier Blin <oblin@mandriva.org>2005-06-03 07:14:48 +0000
commit8fc41a1333f01496878ca0561f3ca1ad186b6d64 (patch)
tree2dd030c580d5b8e954bce95508ac7ecacc6127b9 /perl-install/standalone/drakpxe
parent671adafbfbb78f044970bc4af895ed43dff99757 (diff)
downloaddrakx-8fc41a1333f01496878ca0561f3ca1ad186b6d64.tar
drakx-8fc41a1333f01496878ca0561f3ca1ad186b6d64.tar.gz
drakx-8fc41a1333f01496878ca0561f3ca1ad186b6d64.tar.bz2
drakx-8fc41a1333f01496878ca0561f3ca1ad186b6d64.tar.xz
drakx-8fc41a1333f01496878ca0561f3ca1ad186b6d64.zip
- merge network settings in a $net hash (it modifies $o fields too):
o $netc becomes $net->{network} and $net->{resolv} o $intf becomes $net->{ifcfg} - move zeroconf config stuff in write_zeroconf - read_tmdns_conf -> read_zeroconf - read_all_conf -> read_net_conf - configureNetwork2 -> configure_network - configure_network: write ifcfg files for ppp interfaces too - don't install wireless-tools in configure_network, this package is in basesystem - most functions don't need the file path as an argument in network::network - drop network::tools::remove_initscript - don't export too much from network::network - don't export from network::tools - remove adsl_unsupported_eci step in drakconnect - drop passwd2 field in network::adsl - drop $net->{isdn_internal} - network::netconnect : main -> safe_main - use network::netconnect::real_main during install - don't read network config in network::netconnect::real_main - install_steps::upNetwork : resolv.conf is already symlinked by network::network::configure_network when appropriate - try to fix install_any::generate_automatic_stage1_params to use a real interface configuration - put authentication stuff in $net->{auth} - drop network::ethernet::write_ether_conf - drop network::adsl::get_wizard - use 'static' instead of 'manual' as ADSL method - drop first_modem and its workarounds in network::modem - drop deprecated "multiple_internet_cnx" step in drakconnect - don't save /etc/sysconfig/drakconnect anymore - drop MDK::Common::Globals stuff - drop getIP in net_applet (Pixel) - drop $netc->{DHCP} - configure_network(): write resolv.conf even if a dhcp interface is configured
Diffstat (limited to 'perl-install/standalone/drakpxe')
-rwxr-xr-xperl-install/standalone/drakpxe18
1 files changed, 9 insertions, 9 deletions
diff --git a/perl-install/standalone/drakpxe b/perl-install/standalone/drakpxe
index a3a3f78bc..dba934265 100755
--- a/perl-install/standalone/drakpxe
+++ b/perl-install/standalone/drakpxe
@@ -47,9 +47,8 @@ my $direct = grep { /-direct/ } @ARGV;
#my $shorewall = network::shorewall::read();
#
#- get network configuration.
-my $netc = {};
-my $intf = {};
-network::network::read_all_conf('', $netc, $intf);
+my $net = {};
+network::network::read_net_conf($net);
my $in = 'interactive'->vnew('su');
$::Wizard_title = N("PXE Server Configuration");
@@ -126,7 +125,7 @@ my @intf = grep { exists $_->{NETWORK} } map {
print STDERR "$s\n";
$s =~ /^(\S+)\s+\S+\s+$_->{NETMASK}\s+.*$_->{DEVICE}/ and $_->{NETWORK} = $1;
}
- } $_ } values %$intf;
+ } $_ } values %{$net->{ifcfg}};
if (@intf < 1) {
#- no interface already configured found, ask user to configure.
$in->ask_warn(N("No network adapter on your system!"),
@@ -149,7 +148,7 @@ if (@intf < 1) {
step_ip_range:
#- read current configuration, or create a default suitable automatically.
-my $dhcpd_conf = parse_dhcpd_conf("/etc/dhcpd.conf", {}, $netc, $intf[0]);
+my $dhcpd_conf = parse_dhcpd_conf("/etc/dhcpd.conf", {}, $net, $intf[0]);
#- get back default of ip.
my $pool;
@@ -252,10 +251,10 @@ foreach my $i (0..99) {
}
defined $label or $label = "halt$i", last;
}
-my $server = $intf[0]{IPADDR} || $netc->{HOSTNAME};
+my $server = $intf[0]{IPADDR} || $net->{network}{HOSTNAME};
push @{$pxelinux_cfg->{entry}}, { label => $label,
kernel => "images/alt0/vmlinuz",
- append => "initrd=images/alt0/all.rdz ramdisk=32000 vga=788 ".($auto_inst_cfg ? "kickstart=$auto_inst_cfg " : "")."automatic=method:http,network:dhcp,interface:eth0,dns:$netc->{dnsServer},server:$server,directory:$dir root=/dev/ram3" };
+ append => "initrd=images/alt0/all.rdz ramdisk=32000 vga=788 ".($auto_inst_cfg ? "kickstart=$auto_inst_cfg " : "")."automatic=method:http,network:dhcp,interface:eth0,dns:$net->{resolv}{dnsServer},server:$server,directory:$dir root=/dev/ram3" };
build_pxelinux_cfg($pxelinux_cfg, "/var/lib/tftpboot/PXEClient/pxelinux.cfg/default");
#- make directory available for httpd.
@@ -269,7 +268,7 @@ start_daemons();
#- sub for reading/writing dhcpd.conf and pxelinux.cfg/default...
sub parse_dhcpd_conf {
- my ($file, undef, $netc, $intf) = @_;
+ my ($file, undef, $net, $intf) = @_;
my (%dhcpd_conf, $pool);
local (*F, $_);
@@ -277,7 +276,8 @@ sub parse_dhcpd_conf {
$dhcpd_conf{class_PXE} = 'PXE';
$dhcpd_conf{class} = { PXE => undef, Etherboot => undef, known => undef };
add2hash($dhcpd_conf{network} = { pool => [] }, $intf);
- add2hash($dhcpd_conf{network}, $netc);
+ add2hash($dhcpd_conf{network}, $net->{network});
+ add2hash($dhcpd_conf{network}, $net->{resolv});
if (open F, $file) {
while (<F>) {