-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conf name #108
Conf name #108
Changes from 6 commits
1eb8b71
20eee1d
a01d09c
e2ba26b
8facdb8
ee5ca9e
0d9c4b6
b0b7c23
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,9 @@ class NtpClientClass < Module | |
|
||
NTP_FILE = "/etc/chrony.conf".freeze | ||
|
||
# The cron file name for the synchronization. | ||
CRON_FILE = "/etc/cron.d/suse-ntp_synchronize".freeze | ||
|
||
UNSUPPORTED_AUTOYAST_OPTIONS = [ | ||
"configure_dhcp", | ||
"peers", | ||
|
@@ -85,9 +88,6 @@ def main | |
# The interval of synchronization in minutes. | ||
@sync_interval = DEFAULT_SYNC_INTERVAL | ||
|
||
# The cron file name for the synchronization. | ||
@cron_file = "/etc/cron.d/novell.ntp-synchronize" | ||
|
||
# Service name of the NTP daemon | ||
@service_name = "chronyd" | ||
|
||
|
@@ -272,7 +272,7 @@ def ProcessNtpConf | |
# synchronize_time and sync_interval variables | ||
# Return updated value of synchronize_time | ||
def ReadSynchronization | ||
crontab = SCR.Read(path(".cron"), @cron_file, "") | ||
crontab = SCR.Read(path(".cron"), CRON_FILE, "") | ||
log.info("NTP Synchronization crontab entry: #{crontab}") | ||
cron_entry = (crontab || []).fetch(0, {}).fetch("events", []).fetch(0, {}) | ||
@synchronize_time = cron_entry["active"] == "1" | ||
|
@@ -812,13 +812,13 @@ def update_cron_settings | |
if @synchronize_time | ||
SCR.Write( | ||
path(".target.string"), | ||
@cron_file, | ||
CRON_FILE, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just an idea, ... but probably too late: Could we have a comment here (in file) that this is created by us and that the user should run YaST to re/configure it? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, such comment probably makes good sense. This one is already merged, but I can open new one. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please :) |
||
"-*/#{@sync_interval} * * * * root /usr/sbin/chronyd -q &>/dev/null\n" | ||
) | ||
else | ||
SCR.Execute( | ||
path(".target.bash"), | ||
"test -e #{@cron_file} && rm #{@cron_file};" | ||
"test -e #{CRON_FILE} && rm #{CRON_FILE};" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. NP: there is a trailing |
||
) | ||
end | ||
end | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"who own it" or "which package owns it" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or "which package belongs to" ?