diff options
Diffstat (limited to 'dhcp_wizard/scripts/Dhcpconf.pm')
-rw-r--r-- | dhcp_wizard/scripts/Dhcpconf.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dhcp_wizard/scripts/Dhcpconf.pm b/dhcp_wizard/scripts/Dhcpconf.pm index 6fe5045f..ad34c59a 100644 --- a/dhcp_wizard/scripts/Dhcpconf.pm +++ b/dhcp_wizard/scripts/Dhcpconf.pm @@ -31,7 +31,7 @@ sub do_it { my $wiz_ip_server = $o->get_from_known_dev("IP"); my $wiz_domain_name = $o->get("DomainName"); my $wiz_host_name = $o->get("SystemName"); - my $wiz_ip_net = "$1.$2.$3" if $wiz_ip_server =~ /(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/; + my $wiz_ip_net = "$1.$2.$3.0" if $wiz_ip_server =~ /(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/; my $wiz_ip_range1 = $ENV{wiz_ip_range1}; my $wiz_ip_range2 = $ENV{wiz_ip_range2}; my $wiz_ip_netmask = $o->get_from_known_dev("Mask"); @@ -43,12 +43,12 @@ sub do_it { #[ -f /etc/sysconfig/dhcpd ] && cp -f /etc/sysconfig/dhcpd /var/tmp/wiz_bck/orig/dhcpd my $file = "/etc/sysconfig/dhcpd"; MDK::Common::cp_af($file, $file.".orig"); - MDK::Common::append_to_file($file, "INTERFACES=$wiz_device"); $file = "/etc/rc.d/init.d/dhcpd"; # now patching etc/rc.d/init.d/dhcpd standalone::explanations("now patching etc/rc.d/init.d/dhcpd"); if (!`grep INTERFACES $file`){ + MDK::Common::append_to_file($file, "\nINTERFACES=$wiz_device"); MDK::Common::cp_af($file, $file . ".orig"); my $tmp = `mktemp /tmp/Dhcpconf.XXXXXX` or die "can't make a temp file: $!"; open(NEW, "> $tmp") or die "can't open $tmp: $!"; |