diff options
author | Florin Grad <florin@mandriva.com> | 2003-02-27 10:13:19 +0000 |
---|---|---|
committer | Florin Grad <florin@mandriva.com> | 2003-02-27 10:13:19 +0000 |
commit | e229f29cacf475d909fe51cc0de374d2f3260bbb (patch) | |
tree | 44267c41cf86a7bbda0244edc6f888256c5a03a6 | |
parent | 0418cc0625cfff05b1f1c212af20a65d1f596677 (diff) | |
download | drakx-backup-do-not-use-e229f29cacf475d909fe51cc0de374d2f3260bbb.tar drakx-backup-do-not-use-e229f29cacf475d909fe51cc0de374d2f3260bbb.tar.gz drakx-backup-do-not-use-e229f29cacf475d909fe51cc0de374d2f3260bbb.tar.bz2 drakx-backup-do-not-use-e229f29cacf475d909fe51cc0de374d2f3260bbb.tar.xz drakx-backup-do-not-use-e229f29cacf475d909fe51cc0de374d2f3260bbb.zip |
read the dhcpd conf file before hand
-rwxr-xr-x | perl-install/standalone/drakgw | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/perl-install/standalone/drakgw b/perl-install/standalone/drakgw index 302e3bb4f..84fdd5690 100755 --- a/perl-install/standalone/drakgw +++ b/perl-install/standalone/drakgw @@ -240,16 +240,20 @@ I am about to setup your Local Area Network with that adapter.", $format->($devi } log::explanations("Choosing network device: $device"); - -my $lan_address = "192.168.1.0"; -my $server_ip = "192.168.1.1"; -my $nameserver_ip = "192.168.1.1"; -my $netmask = "255.255.255.0"; -my $start_range = "16"; -my $end_range = "253"; -my $default_lease = "21600"; -my $max_lease = "43200"; -my $internal_domain_name = "homeland.net"; +my $lan_address = $conf->{NETWORK} ||= "192.168.1.0"; +my $server_ip = $conf->{IPADDR} ||= "192.168.1.1"; +my $nameserver_ip = network::network::read_dhcpd_conf_raw()->{domain_name_servers}[0] ||= "192.168.1.1"; +my $netmask = network::network::read_dhcpd_conf_raw()->{subnet_mask}[0] ||= "255.255.255.0"; +my $start_range = network::network::read_dhcpd_conf_raw()->{dynamic_bootp}[0] ||= "16"; +my $end_range = network::network::read_dhcpd_conf_raw()->{dynamic_bootp}[1] ||= "253"; +my $default_lease = network::network::read_dhcpd_conf_raw()->{max_lease_time}[0] ||= "21600"; +my $max_lease = network::network::read_dhcpd_conf_raw()->{default_lease_time}[0] ||= "43200"; +my $internal_domain_name = network::network::read_dhcpd_conf_raw()->{domain_name}[0] ||= network::network::read_resolv_conf_raw()->{nameserver}[0] ||= "homeland.net"; + +#use Data::Dumper; +#print Dumper(network::network::read_resolv_conf_raw()->{nameserver})."\n"; +#print network::network::read_resolv_conf_raw()->{nameserver}[0]."\n"; +#print Dumper(network::network::read_dhcpd_conf_raw())."\n"; my $reconf_dhcp_server_intf = 1; @@ -277,7 +281,7 @@ Driver: %s", $device, $conf->{NETWORK}, $conf->{IPADDR}, $conf->{BOOTPROTO}, $al if ($auto ne N("Yes")) { $reconf_dhcp_server_intf = 0; $server_ip = $conf->{IPADDR}; - $nameserver_ip = $conf->{IPADDR}; + $nameserver_ip = network::network::read_dhcpd_conf_raw()->{domain_name_servers}[0] ||= $conf->{IPADDR}; $lan_address = $conf->{NETWORK}; $in->ask_from('', N("I can keep your current configuration and assume you already set up a DHCP server; in that case please verify I correctly read the Network that you use for your local network; I will not reconfigure it and I will not touch your DHCP server configuration. |