Skip to content
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

Write restrict records first (bsc#983486) #86

Merged
merged 3 commits into from
Jul 3, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 9 additions & 0 deletions package/yast2-ntp-client.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
-------------------------------------------------------------------
Fri Jun 30 16:58:16 UTC 2017 - knut.anderssen@suse.com

- Resrict records are written at the end but the default file and
most profiles use them at the beginning, which mangles the file
completely (bsc#983486).
To fix it we have just changed the order of writing.
- 3.1.29

-------------------------------------------------------------------
Thu Aug 11 14:24:42 CEST 2016 - schubi@suse.de

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-ntp-client.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


Name: yast2-ntp-client
Version: 3.1.28
Version: 3.1.29
Release: 0
Summary: YaST2 - NTP Client Configuration
License: GPL-2.0+
Expand Down
4 changes: 3 additions & 1 deletion src/modules/NtpClient.rb
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,9 @@ def Write
# write settings
return false if !go_next

@ntp_records += restrict_map_records
# Restrict map records are written first to not mangle the config file
# (bsc#983486)
@ntp_records = restrict_map_records + @ntp_records
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like that it adds restrict maps to ntp_records each time Write is called, we probably could remove this line and just concatenate both arrays in records_for_write, but is preferable to do it in a separate PR.


log.info "Writing settings #{@ntp_records}"

Expand Down