summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-09-06 10:35:25 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-09-06 10:35:25 +0000
commit7234c736143012bcc8440b7aae2124e0b6ba4628 (patch)
treee7902f95a0850769e468e07e18f27be6627bacae
parent9840aba96acd77d09d7c353ec694897f67886b8e (diff)
downloaddrakx-7234c736143012bcc8440b7aae2124e0b6ba4628.tar
drakx-7234c736143012bcc8440b7aae2124e0b6ba4628.tar.gz
drakx-7234c736143012bcc8440b7aae2124e0b6ba4628.tar.bz2
drakx-7234c736143012bcc8440b7aae2124e0b6ba4628.tar.xz
drakx-7234c736143012bcc8440b7aae2124e0b6ba4628.zip
(ntp_server): fix (step-tickers was empty)
-rw-r--r--perl-install/timezone.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/perl-install/timezone.pm b/perl-install/timezone.pm
index c137b1d6a..9716f14ea 100644
--- a/perl-install/timezone.pm
+++ b/perl-install/timezone.pm
@@ -33,10 +33,11 @@ sub ntp_server {
-e $f or return;
if (@_ > 1) {
+ my $added = 0;
substInFile {
if (/^#?\s*server\s+(\S*)/ && $1 ne '127.127.1.0') {
- $_ = $server ? "server $server\n" : "#server $1\n";
- $server = '';
+ $_ = $added ? "#server $1\n" : "server $server\n";
+ $added = 1;
}
} $f;
output("$prefix/etc/ntp/step-tickers", "$server\n");