summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drakwizard.spec7
-rw-r--r--time_wizard/Ntp.pm15
2 files changed, 16 insertions, 6 deletions
diff --git a/drakwizard.spec b/drakwizard.spec
index 0246538f..c45599f4 100644
--- a/drakwizard.spec
+++ b/drakwizard.spec
@@ -1,6 +1,6 @@
%define name drakwizard
-%define version 2.10
-%define release 3mdk
+%define version 2.11
+%define release 1mdk
Name: %{name}
Version: %{version}
@@ -49,6 +49,9 @@ rm -rf $RPM_BUILD_DIR/$RPM_PACKAGE_NAME
%{perl_vendorlib}/MDK/
%changelog
+* Fri Feb 13 2004 Warly <warly@mandrakesoft.com> 2.10-3mdk
+- some ntp stricter config setting
+
* Thu Feb 12 2004 Antoine Ginies <aginies@mandrakesoft.com> 2.10-3mdk
- fix option in PXE wizard
- Typo fixes
diff --git a/time_wizard/Ntp.pm b/time_wizard/Ntp.pm
index a4fc4ca9..9ea8144f 100644
--- a/time_wizard/Ntp.pm
+++ b/time_wizard/Ntp.pm
@@ -183,7 +183,10 @@ sub get_timezone {
}
sub test {
- $::testing and return 'end';
+ if ($::testing) {
+ do_it();
+ return 'end';
+ }
system("/usr/sbin/ntpdate -q $o->{var}{varserver1} $o->{var}{varserver2}");
if (!($? >> 8)) {
do_it();
@@ -193,16 +196,20 @@ sub test {
}
sub do_it {
- $::testing and return;
+ if ($::testing){
+ print "Would have written\nUTC=true\nZONE=$o->{var}{wiz_timezone}\nARC=false\n to /etc/sysconfig/clock\n\n";
+ print "Would have copied /usr/share/zoneinfo/$o->{var}{wiz_timezone} to /etc/localtime\n";
+ return
+ }
my $file = "/etc/sysconfig/clock";
- MDK::Common::cp_af($file, $file.".orig");
+ !-f "$file.orig" and MDK::Common::cp_af($file, $file.".orig");
local *NEW;
open(NEW, "> $file") or die "can not open $file: $!";
print NEW "UTC=true\n";
print NEW "ZONE=$o->{var}{wiz_timezone}\n";
print NEW "ARC=false\n";
close NEW or die "can not close $file: $!";
- MDK::Common::cp_af("/usr/share/zoneinfo/$o->{var}{wiz_timezone}", "/etc/localtime");
+ -f "/usr/share/zoneinfo/$o->{var}{wiz_timezone}" and MDK::Common::cp_af("/usr/share/zoneinfo/$o->{var}{wiz_timezone}", "/etc/localtime");
-f "/etc/ntp/step-tickers" and MDK::Common::cp_af("/etc/ntp/step-tickers", "/etc/ntp/step-tickers.orig");
open(NEW, "> /etc/ntp/step-tickers") or die "can not open /etc/ntp/step-tickers: $!";
print NEW $o->{var}{varserver1}."\n";