summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/drakclock
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-03-15 08:18:41 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-03-15 08:18:41 +0000
commit93ed30ff58474f7e2de69178381e2ddf58002bbd (patch)
tree702abb907d34f7fb779e5f4ede72da9bb302ea14 /perl-install/standalone/drakclock
parente6c6a2b4e9e1912ed4c0870cbc662647fdee461a (diff)
downloaddrakx-93ed30ff58474f7e2de69178381e2ddf58002bbd.tar
drakx-93ed30ff58474f7e2de69178381e2ddf58002bbd.tar.gz
drakx-93ed30ff58474f7e2de69178381e2ddf58002bbd.tar.bz2
drakx-93ed30ff58474f7e2de69178381e2ddf58002bbd.tar.xz
drakx-93ed30ff58474f7e2de69178381e2ddf58002bbd.zip
make the ntpdate after stopping the ntpd (manu@agat.net, #8141)
Diffstat (limited to 'perl-install/standalone/drakclock')
-rwxr-xr-xperl-install/standalone/drakclock6
1 files changed, 5 insertions, 1 deletions
diff --git a/perl-install/standalone/drakclock b/perl-install/standalone/drakclock
index 528883c39..8e98d523a 100755
--- a/perl-install/standalone/drakclock
+++ b/perl-install/standalone/drakclock
@@ -104,7 +104,11 @@ $my_win->{window}->add(gtkpack_(Gtk2::VBox->new,
$choosed_serv =~ s/(\S+)\s*(.*)$/$1/;
timezone::ntp_server($1);
system("/sbin/chkconfig --level 35 ntpd on");
- system("service ntpd restart");
+ system("service ntpd stop");
+ #verify that we have a valid hostname (thx sam)
+ $choosed_serv =~ s/[^-a-zA-Z0-9.]//g;
+ system("/usr/sbin/ntpdate", $choosed_serv);
+ system("service ntpd start");
} else {
if (-e $ntpdlock) {
system("service ntpd stop");