From 93ed30ff58474f7e2de69178381e2ddf58002bbd Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 15 Mar 2004 08:18:41 +0000 Subject: make the ntpdate after stopping the ntpd (manu@agat.net, #8141) --- perl-install/standalone/drakclock | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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"); -- cgit v1.2.1