summaryrefslogtreecommitdiffstats
path: root/dhcp_wizard
diff options
context:
space:
mode:
authorFlorent Villard <warly@mandriva.com>2003-03-08 16:39:21 +0000
committerFlorent Villard <warly@mandriva.com>2003-03-08 16:39:21 +0000
commit719e1ecbe634f0571263c02906703c40cc55a5fa (patch)
tree3b830f28133146730832d9e1c90cd554c9e6e80c /dhcp_wizard
parent3048c35a18fbab378204525bcd249288b6ad8446 (diff)
downloaddrakwizard-719e1ecbe634f0571263c02906703c40cc55a5fa.tar
drakwizard-719e1ecbe634f0571263c02906703c40cc55a5fa.tar.gz
drakwizard-719e1ecbe634f0571263c02906703c40cc55a5fa.tar.bz2
drakwizard-719e1ecbe634f0571263c02906703c40cc55a5fa.tar.xz
drakwizard-719e1ecbe634f0571263c02906703c40cc55a5fa.zip
choose another dns than 127.0.0.1 if available for dhcp server
Diffstat (limited to 'dhcp_wizard')
-rw-r--r--dhcp_wizard/scripts/Dhcpconf.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/dhcp_wizard/scripts/Dhcpconf.pm b/dhcp_wizard/scripts/Dhcpconf.pm
index 881ef56f..1f319eb5 100644
--- a/dhcp_wizard/scripts/Dhcpconf.pm
+++ b/dhcp_wizard/scripts/Dhcpconf.pm
@@ -75,6 +75,9 @@ sub do_it {
my $wiz_host_name = $o->network_get("HOSTNAME");
my $wiz_gateway = $o->network_get("GATEWAY");
my $wiz_dns = $o->network_get("dnsServer");
+ if ($wiz_dns eq '127.0.0.1') {
+ $wiz_dns = $o->network_get("dnsServer2") || $wiz_dns
+ }
if (!$wiz_gateway) {
my $t = `LC_ALL=C /sbin/ip route list scope global`;
($wiz_gateway) = $t =~ /default via (\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}) dev/;