[RESOLVED] Is /etc/sysctl.d/ supported in CentOS 6?

Issues related to applications and software problems
Post Reply
gigglesworth
Posts: 9
Joined: 2005/05/23 22:57:10
Location: Berkeley, CA
Contact:

[RESOLVED] Is /etc/sysctl.d/ supported in CentOS 6?

Post by gigglesworth » 2012/06/13 17:42:54

CentOS 5 supported the placement of sysctl directives in files under /etc/sysctl.d/ . The code is within /etc/init.d/functions :


# Apply sysctl settings, including files in /etc/sysctl.d
apply_sysctl() {
sysctl -e -p /etc/sysctl.conf >/dev/null 2>&1
for file in /etc/sysctl.d/* ; do
is_ignored_file "$file" && continue
test -f "$file" && sysctl -e -p "$file" >/dev/null 2>&1
done
}


But in CentOS 6, /etc/init.d/functions does not include this function. Is /etc/sysctl.d/ still supported on CentOS 6?

Thank you,

-= Stefan

User avatar
toracat
Site Admin
Posts: 7517
Joined: 2006/09/03 16:37:24
Location: California, US
Contact:

Re: Is /etc/sysctl.d/ supported in CentOS 6?

Post by toracat » 2012/06/13 19:41:09

[quote]

But in CentOS 6, /etc/init.d/functions does not include this function. Is /etc/sysctl.d/ still supported on CentOS 6?
[/quote]
Yes, but you need to update to the current release 6.2. Please see the upstream [url=http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html-single/6.2_Technical_Notes/index.html#initscripts]Technical_Notes[/url] and look for BZ#680527.

gigglesworth
Posts: 9
Joined: 2005/05/23 22:57:10
Location: Berkeley, CA
Contact:

Re: Is /etc/sysctl.d/ supported in CentOS 6?

Post by gigglesworth » 2012/06/13 21:03:58

Thank you.

Unfortunately, I cannot view [url=https://bugzilla.redhat.com/show_bug.cgi?id=680527]BZ 680527[/url] with either of my Bugzilla accounts (I wonder why, since access is usually only restricted for security or private bugs).

However, [url=https://bugzilla.redhat.com/show_bug.cgi?id=593211]BZ 593211 "RFE: Add /etc/sysctl.d/ support"[/url] does describe this issue.

In EL5, this feature was also only added recently:


% rpm -q --changelog initscripts | less
* Tue Jun 07 2011 Petr Lautrbach 8.45.37-1
- add /etc/sysctl.d/ support
Resolves: rhbz#624385


-= Stefan

User avatar
toracat
Site Admin
Posts: 7517
Joined: 2006/09/03 16:37:24
Location: California, US
Contact:

Re: [RESOLVED] Is /etc/sysctl.d/ supported in CentOS 6?

Post by toracat » 2012/06/13 21:29:33

Thank you for the additional info. Marking this thread 'resolved' for posterity.

Post Reply