Skip to content

Commit

Permalink
Merge 1d64876 into b5d6a6e
Browse files Browse the repository at this point in the history
  • Loading branch information
imobachgs committed Dec 2, 2019
2 parents b5d6a6e + 1d64876 commit d355b06
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion doc/etc-and-usr-etc.md
Expand Up @@ -37,7 +37,7 @@ In a nutshell, jsc#SLE-9077 states that `/etc/sysctl.conf` should not be modifie
to modify any `sysctl` setting, you should drop a file in `/etc/sysctl.d` containing the new values.

As a first step, we have added a {Yast2::CFA::Sysctl} class which offers an API to sysctl settings.
This new class uses `/etc/sysctl.d/30-yast.conf` instead of `/etc/sysctl.conf` to write the configuration.
This new class uses `/etc/sysctl.d/70-yast.conf` instead of `/etc/sysctl.conf` to write the configuration.
Moreover, it updates known keys that are present in the original `/etc/sysctl.conf` to avoid confusion.

## An Elaborated Proposal
Expand Down
2 changes: 1 addition & 1 deletion library/general/src/lib/cfa/sysctl.rb
Expand Up @@ -49,7 +49,7 @@ class Sysctl < BaseModel
Yast.import "Stage"

PARSER = AugeasParser.new("sysctl.lns")
PATH = "/etc/sysctl.d/30-yast.conf".freeze
PATH = "/etc/sysctl.d/70-yast.conf".freeze

class << self
# Modifies default CFA methods to handle boolean values
Expand Down
7 changes: 7 additions & 0 deletions package/yast2.changes
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Mon Dec 2 16:27:25 UTC 2019 - Imobach Gonzalez Sosa <igonzalezsosa@suse.com>

- Use 70-yast.conf instead of 30-yast.conf to write YaST settings
under /etc/sysctl.d (related to jsc#SLE-9077).
- 4.2.46

-------------------------------------------------------------------
Fri Nov 29 13:42:50 CET 2019 - schubi@suse.de

Expand Down
10 changes: 9 additions & 1 deletion package/yast2.spec
Expand Up @@ -17,7 +17,7 @@


Name: yast2
Version: 4.2.45
Version: 4.2.46
Release: 0
Summary: YaST2 Main Package
License: GPL-2.0-only
Expand Down Expand Up @@ -177,6 +177,14 @@ mkdir -p %{buildroot}%{_sysconfdir}/YaST2
%post
%{fillup_only -n yast2}

if [ -f "/etc/sysctl.d/30-yast.conf" ]; then
if [ -f "/etc/sysctl.d/70-yast.conf" ]; then
rm /etc/sysctl.d/30-yast.conf
else
mv /etc/sysctl.d/30-yast.conf /etc/sysctl.d/70-yast.conf
fi
fi

%files

# basic directory structure
Expand Down

0 comments on commit d355b06

Please sign in to comment.