Skip to content

Commit

Permalink
only start ntpd on non-virtual systems
Browse files Browse the repository at this point in the history
  • Loading branch information
swelljoe committed Jul 6, 2017
1 parent 103a8a3 commit ff47246
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/Virtualmin/Config/Plugin/NTP.pm
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,17 @@ sub actions {
}
elsif (-x "/usr/sbin/ntpdate-debian") {
$self->logsystem("ntpdate-debian");
if (init::action_status("ntpd")) {
init::enable_at_boot("ntpd");
}
}
elsif (-x "/usr/sbin/ntpdate") {
$self->logsystem("ntpdate");
if (init::action_status("ntpd")) {
init::enable_at_boot("ntpd");
}
}

# If it's installed, and not kvm-clock, turn ntpd on.
if (! $clocksource eq "kvm-clock" && init::action_status("ntpd")) {
init::enable_at_boot("ntpd");
}
$self->done(1); # OK!
} or do { # catch
$self->done(0); # Something failed
Expand Down

0 comments on commit ff47246

Please sign in to comment.