summaryrefslogtreecommitdiffstats
path: root/dhcp_wizard
diff options
context:
space:
mode:
authorAntoine Ginies <aginies@mandriva.com>2005-12-07 22:22:54 +0000
committerAntoine Ginies <aginies@mandriva.com>2005-12-07 22:22:54 +0000
commit4401b4fd5cd41589b7675e91b46f19ea05492c4b (patch)
tree8432bc357431e0b51ec1aeee9a45088dab607ac3 /dhcp_wizard
parent1c6110c5924a0dc6c389fc6a7d329dfc6db7e41b (diff)
downloaddrakwizard-4401b4fd5cd41589b7675e91b46f19ea05492c4b.tar
drakwizard-4401b4fd5cd41589b7675e91b46f19ea05492c4b.tar.gz
drakwizard-4401b4fd5cd41589b7675e91b46f19ea05492c4b.tar.bz2
drakwizard-4401b4fd5cd41589b7675e91b46f19ea05492c4b.tar.xz
drakwizard-4401b4fd5cd41589b7675e91b46f19ea05492c4b.zip
now support virtual interfaces (thx misc)
Diffstat (limited to 'dhcp_wizard')
-rwxr-xr-xdhcp_wizard/Dhcp.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/dhcp_wizard/Dhcp.pm b/dhcp_wizard/Dhcp.pm
index f92a2c81..7b8f3665 100755
--- a/dhcp_wizard/Dhcp.pm
+++ b/dhcp_wizard/Dhcp.pm
@@ -71,7 +71,8 @@ $o->{pages} = {
ip_range => {
name => N("Range of addresses used by DHCP") . "\n\n\n" . N("Select the range of addresses assigned to the workstations by the DHCP service; unless you have special needs, you can safely accept the proposed values. (ie: 192.168.100.20 192.168.100.40)") . "\n\n" . N("If you want to enable PXE in your dhcp server please check the box (Pre-boot eXecution Environment, a protocol that allows computers to boot through the network)."),
pre => sub {
- ($wiz_ip_server) = `/sbin/ip addr show dev $o->{var}{interface}` =~ /^\s*inet\s+(\d+\.\d+\.\d+\.\d+)/m;
+ #($wiz_ip_server) = `/sbin/ip addr show dev $o->{var}{interface}` =~ /^\s*inet\s+(\d+\.\d+\.\d+\.\d+)/m;
+ ($wiz_ip_server) = $wiz->{net}->{itf}{$o->{var}{interface}}{IPADDR};
$wiz_tftpserverip = $wiz_ip_server;
my $d = $4 if $wiz_ip_server =~ /(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/;
my $s = "$1.$2.$3" if $wiz_ip_server =~ /(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/;