diff options
Diffstat (limited to 'perl-install/standalone/drakclock')
-rwxr-xr-x | perl-install/standalone/drakclock | 6 |
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"); |