Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 413929 - sys-process/procps-3.3.2: sysctl no longer allows a space between "-p" and "<file>"
Summary: sys-process/procps-3.3.2: sysctl no longer allows a space between "-p" and "<...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal trivial
Assignee: Gentoo's Team for Core System packages
URL: http://www.freelists.org/post/procps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-29 03:16 UTC by Kolbjørn Barmen
Modified: 2012-05-20 10:28 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kolbjørn Barmen 2012-04-29 03:16:36 UTC
sysctl man page says clearly:

-p[FILE], --load[=FILE]

however, the /etc/init.d/sysctl script tries:

sysctl -q -e -p "${conf}"

As the man page says, the -p parameter does not allow a space before the filename, it will then ignore the -p alltogether:

supersmurf ~ # awk '/^[^#]/' /etc/sysctl.conf 
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.all.rp_filter = 1
kernel.panic = 3
supersmurf ~ # awk '/^[^#]/' /etc/sysctl.d/ipv6.conf 
net.ipv6.conf.default.autoconf=0
net.ipv6.conf.default.accept_ra=0
net.ipv6.conf.default.disable_ipv6=0
net.ipv6.conf.all.autoconf=0
net.ipv6.conf.all.accept_ra=0
net.ipv6.conf.all.disable_ipv6=0
supersmurf ~ # sysctl -p /etc/sysctl.d/ipv6.conf 
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.all.rp_filter = 1
kernel.panic = 3
supersmurf ~ # sysctl -p/etc/sysctl.d/ipv6.conf 
net.ipv6.conf.default.autoconf = 0
net.ipv6.conf.default.accept_ra = 0
net.ipv6.conf.default.disable_ipv6 = 0
net.ipv6.conf.all.autoconf = 0
net.ipv6.conf.all.accept_ra = 0
net.ipv6.conf.all.disable_ipv6 = 0
supersmurf ~ # 


Thanks :)
Comment 1 Kolbjørn Barmen 2012-04-29 04:12:01 UTC
(In reply to comment #0)

> As the man page says, the -p parameter does not allow a space before the
> filename, it will then ignore the -p alltogether:

Correction: it will just use the default file, /etc/sysctl.conf :)
Comment 2 William Hubbs gentoo-dev 2012-04-29 16:54:29 UTC
On my system I get the following:

linux1 ~ # sysctl -p/etc/sysctl.conf
error: Unknown parameter "-p/etc/sysctl.conf"
usage:  sysctl [-n] [-e] variable ... 
        sysctl [-n] [-e] [-q] -w variable=value ... 
        sysctl [-n] [-e] -a 
        sysctl [-n] [-e] [-q] -p <file>   (default /etc/sysctl.conf) 
        sysctl [-n] [-e] -A

I am running sys-process/procps-3.2.8_p11. Which version are you
running?
Comment 3 Julien Sanchez archtester 2012-05-02 06:31:44 UTC
Confirmed on my system too. There should not be space between -p and [file].

I'm running sys-process/procps-3.3.2_p2-r1.
Comment 4 SpanKY gentoo-dev 2012-05-02 18:28:22 UTC
new sysctl is broken.  the old syntax has worked for years.
Comment 5 SpanKY gentoo-dev 2012-05-20 10:28:30 UTC
fixed in 3.3.3