summaryrefslogtreecommitdiffstats
path: root/dhcp_wizard
diff options
context:
space:
mode:
authorFlorent Villard <warly@mandriva.com>2003-09-15 11:10:22 +0000
committerFlorent Villard <warly@mandriva.com>2003-09-15 11:10:22 +0000
commit724f7a8d02d6cd48b108a8f2cfbb98feeecae2a7 (patch)
tree2e796bb5e0cb5fb582b6f48563696337b6bea18d /dhcp_wizard
parent5cbe71386657f4f045cbd59137f5e1d702a93292 (diff)
downloaddrakwizard-724f7a8d02d6cd48b108a8f2cfbb98feeecae2a7.tar
drakwizard-724f7a8d02d6cd48b108a8f2cfbb98feeecae2a7.tar.gz
drakwizard-724f7a8d02d6cd48b108a8f2cfbb98feeecae2a7.tar.bz2
drakwizard-724f7a8d02d6cd48b108a8f2cfbb98feeecae2a7.tar.xz
drakwizard-724f7a8d02d6cd48b108a8f2cfbb98feeecae2a7.zip
fix apache
fix dns_client adding a \n at the end of the line of the configuration file fix squid fix inn fix ftp fix samba add a init function in drakwizard.pl for case such as apache which need to initialize some parameters separate region/country in ntp wizard
Diffstat (limited to 'dhcp_wizard')
-rwxr-xr-xdhcp_wizard/Dhcp.pm15
-rw-r--r--dhcp_wizard/scripts/dhcpd.conf.default2
2 files changed, 11 insertions, 6 deletions
diff --git a/dhcp_wizard/Dhcp.pm b/dhcp_wizard/Dhcp.pm
index b8168450..6aa67a38 100755
--- a/dhcp_wizard/Dhcp.pm
+++ b/dhcp_wizard/Dhcp.pm
@@ -23,6 +23,8 @@ package MDK::Wizard::Dhcp;
use strict;
use common;
+use MDK::Wizard::Varspaceval;
+use services;
use MDK::Wizard::Wizcommon;
my $wiz = new MDK::Wizard::Wizcommon;
@@ -159,7 +161,7 @@ sub do_it {
}
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 $err = check();
- return $err if $err != 10;
+ return $err if $err != 0;
my $wiz_ip_range1 = $o->{var}{ip1};
my $wiz_ip_range2 = $o->{var}{ip2};
my $wiz_ip_netmask = $wiz->{net}->itf_get("NETMASK");
@@ -208,18 +210,21 @@ mask = $wiz_ip_netmask, rng1 = $wiz_ip_range1, rng2 = $wiz_ip_range2, dname = $w
# modifying webmin config
$file="/etc/webmin/dhcpd/config";
if (-f $file) {
- my %mdk = Vareqval->get($file);
+ my %mdk = MDK::Wizard::Varspaceval->get($file);
$mdk{lease_file} = "/var/dhcpd/dhcpd.leases";
$mdk{interfaces} = $wiz_device;
standalone::explanations("$file: lease_file = $mdk{lease_file}, interfaces = $mdk{interfaces}");
- Vareqval->commit($file, \%mdk);
+ MDK::Wizard::Varspaceval->commit($file, \%mdk);
!$ENV{wiz_authoritative} and output($file, map {
s|^\s*not\s*authoritative.*|\#$&|i;
$_
} cat_ ("/etc/dhcpd.conf"));
}
-
- system("/etc/rc.d/init.d/dhcpd restart");
+ if (services::is_service_running('dhcpd')) {
+ services::restart('dhcpd')
+ } else {
+ services::start('dhcpd')
+ }
10;
}
diff --git a/dhcp_wizard/scripts/dhcpd.conf.default b/dhcp_wizard/scripts/dhcpd.conf.default
index ec2e20c2..0d3c7ec5 100644
--- a/dhcp_wizard/scripts/dhcpd.conf.default
+++ b/dhcp_wizard/scripts/dhcpd.conf.default
@@ -4,7 +4,7 @@
default-lease-time 36000;
max-lease-time 144000;
-ddns-update-style ad-hoc;
+ddns-update-style none;
not authoritative;