FS#29760 - [initscripts] "sysctl -p file" is broken in core/procps-ng-3.3.2-2

Attached to Project: Arch Linux
Opened by Boris (ooTh7oru) - Saturday, 05 May 2012, 09:45 GMT
Last edited by Tom Gundersen (tomegun) - Tuesday, 08 May 2012, 20:33 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Tom Gundersen (tomegun)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
With procps-ng-3.3.2 my sysctl-settings in /etc/sysctl.d were not read anymore.
After looking at /usr/lib/initscripts/arch-sysctl I noticed that "sysctl -p /path/to/file" does not read the file anymore, but always reads /etc/sysctl.conf. According to the man-page this should still work. The equivalent parameter "--load=" still works however.

BTW: The new sysctl offers the parameter "--system", which pretty much seems to do the same job /usr/lib/initscripts/arch-sysctl does, only with a different file-set.


Additional info:
* affected: core/procps-ng-3.3.2-2


Steps to reproduce:

not working with "-p":
# echo 'kernel.sysrq = 1' | sysctl -p -
net.ipv4.tcp_syncookies = 1
net.ipv4.ip_forward = 0
net.ipv6.conf.all.forwarding = 0
kernel.sysrq = 0

working with "--load":
# echo 'kernel.sysrq = 1' | sysctl --load=-
kernel.sysrq = 1

working with the old procps-3.2.8:
# tar xJf procps-3.2.8-5-i686.pkg.tar.xz
# echo 'kernel.sysrq = 1' | LD_LIBRARY_PATH=./usr/lib/ ./sbin/sysctl -p -
kernel.sysrq = 1
This task depends upon

Closed by  Tom Gundersen (tomegun)
Tuesday, 08 May 2012, 20:33 GMT
Reason for closing:  Fixed
Comment by Eric Belanger (Snowman) - Saturday, 05 May 2012, 10:30 GMT
There shouldn't be any space between -p and it's argument:

# echo 'kernel.sysrq = 1' | sysctl -p-
kernel.sysrq = 1

/usr/lib/initscripts/arch-sysctl should be fixed.
Comment by Tom Gundersen (tomegun) - Saturday, 05 May 2012, 10:57 GMT
Thanks for the excellent report, and thanks to Eric for the solution. I'm in a hurry, so can't push a new initscripts release now, but will do so later.

Boris: can you confirm that editing arch-sysctl like Eric described fixes your problem?

Eric shouldn't this be also considered a bug in procps-ng? Not allowing spaces between arguments seems odd.
Comment by Boris (ooTh7oru) - Saturday, 05 May 2012, 11:04 GMT
Eric: You're right. Didn't notice that the man-page is missing the space. Subtle difference

Tom: Yes, removing the space after "-p" in arch-sysctl fixes this for me.
Comment by Tom Gundersen (tomegun) - Saturday, 05 May 2012, 14:36 GMT
New initscripts is now in testing, I'd appreciate feedback so we can move it to core ASAP.
Comment by Tom Gundersen (tomegun) - Tuesday, 08 May 2012, 20:33 GMT
This has now also been fixed upstream in procps-ng, and will work with the space in the next release: https://gitorious.org/procps/procps/commit/e2987888e27173f1a421e75f582ccfbe6fd5d05e

Loading...