Bug 593211 - RFE: Add /etc/sysctl.d/ support
RFE: Add /etc/sysctl.d/ support
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Fedora Extras Quality Assurance
:
Depends On:
Blocks: 624385 680527
  Show dependency treegraph
 
Reported: 2010-05-18 03:56 EDT by Jens Kuehnel
Modified: 2011-03-14 01:39 EDT (History)
10 users (show)

See Also:
Fixed In Version: initscripts-9.26-1.fc15
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-02-26 23:53:11 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Implements sysctl.d on top of current F14 initscripts. (776 bytes, patch)
2011-02-23 10:55 EST, Martin Langhoff
no flags Details | Diff
Patch for the spec in a fedpkg-style repo (2.91 KB, patch)
2011-02-23 11:38 EST, Martin Langhoff
no flags Details | Diff

  None (edit)
Description Jens Kuehnel 2010-05-18 03:56:51 EDT
Description of problem:

We have a *.d for almost everything, but not for sysctl.

We manage our servers with satellite, and some of our rpms would like to change things in /etc/sysctl.conf. It has to be done in the rpm, because some of our customers are not using RHN.

Of course the fix would be trivial.

Add to rc.sysint after:
sysctl -e -p /etc/sysctl.conf

for i in /etc/sysctl.d/*
do
  test -f $i && sysctl -e -p $i
done

The same thing exist in Debian/Ubuntu.
Comment 1 Daniel Novotny 2010-05-18 07:29:01 EDT
$ rpm -qf /etc/rc.sysinit 
initscripts-9.02.1-1.i686

=> reassigning from procps to initscripts
Comment 2 Martin Langhoff 2011-02-23 10:55:38 EST
Created attachment 480509 [details]
Implements sysctl.d on top of current F14 initscripts.
Comment 3 Martin Langhoff 2011-02-23 11:38:52 EST
Created attachment 480522 [details]
Patch for the spec in a fedpkg-style repo
Comment 5 Bill Nottingham 2011-02-25 14:49:11 EST
Added in git, will go out in some future F-14 update.
Comment 6 Fedora Update System 2011-02-25 15:40:32 EST
Package initscripts-9.20.2-1.fc14.1:
* should fix your issue,
* was pushed to the Fedora 14 updates-testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing initscripts-9.20.2-1.fc14.1'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/initscripts-9.20.2-1.fc14.1
then log in and leave karma (feedback).
Comment 7 Fedora Update System 2011-02-25 23:00:24 EST
initscripts-9.20.2-1.fc14.1 has been pushed to the Fedora 14 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update initscripts'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/initscripts-9.20.2-1.fc14.1
Comment 8 Vladimir Mosgalin 2011-02-26 07:42:47 EST
This feature is great, but it doesn't allow values to be re-defined - for example, if one wants to use default distribution sysctl.conf and change settings, including ones that are in default sysctl.conf with user files in sysctl.conf.d, it won't work, because of other scripts.

While rc.sysinit correctly parses sysctl.conf and then sysctl.conf.d, so overriding values will work correctly, there is also /etc/rc.d/init.d/network script which executes "sysctl -e -p /etc/sysctl.conf >/dev/null 2>&1" and does not re-parse sysctl.conf.d afterwards, which will result in overriding of user sysctl.conf.d settings with default after network service is (re)started.

Also documentation in sysconfig.txt probably should be updated to show existance of sysctl.conf.d (it has 3 references to sysctl.conf).
Comment 9 Fedora Update System 2011-02-26 23:52:37 EST
initscripts-9.20.2-1.fc14.1 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 10 Bill Nottingham 2011-02-28 16:40:55 EST
(In reply to comment #8)
> This feature is great, but it doesn't allow values to be re-defined - for
> example, if one wants to use default distribution sysctl.conf and change
> settings, including ones that are in default sysctl.conf with user files in
> sysctl.conf.d, it won't work, because of other scripts.

True, but I'm having a hard time trying to figure out why a *package* would change the ones that are in /etc/sysctl.conf. It certainly can be edited by the admin.

That being said, it may be worth it to fix it to handle it.
Comment 11 Bill Nottingham 2011-02-28 16:58:28 EST
Added in http://git.fedorahosted.org/git/?p=initscripts.git;a=commitdiff;h=3f296db591da779000a301b2b29560ee6df413f3

The docs references to sysctl.conf are correct, as that's where the default setting still lies.
Comment 12 Fedora Update System 2011-03-10 16:09:32 EST
initscripts-9.26-1.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/initscripts-9.26-1.fc15
Comment 13 Fedora Update System 2011-03-14 01:38:41 EDT
initscripts-9.26-1.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.