I think you are spending your energy terribly, just put some echo lines in local.d and go.

One thing is the software sysctl and other one is the openrc service file done to it.

Surely openrc service creator (which SHALL NOT BE the same as sysctl creator) decided to put /etc/sysctl.d a dir because now there is a fashion around. package.keywords was a file and finished being a dir, dovecot create dirs .d to put config files in, as cronie and a lot of software.

Why? No idea. Inherited from sysvinit and its rc.d or init.d dirs??
Cause of systemd and by this reason puts the damned "d char" at the end and no one "x" char as legacy unix name as cron.x???

No idea, but understand this, sysctl is not gentoo. Gentoo package mantainer surely had to take one decision based in the hundreds of booting systems existents in gentoo, I will not install systemd (which I have masked, remasked, and I have its use FLAG buried in an bottomless pit in the worst place in earth (don't know if Dale can see it from their house...), but surely all boot systems search in the same place.

Gentoo goes to create .d directories everywhere, this is just one more.

El 21/7/25 a las 19:05, Dale escribió:
yahoo wrote:


Il 21/07/25 16:37, Dale ha scritto:
Stefan Schmiedl wrote:
------ Original Message ------
  From "Dale" <rdalek1...@gmail.com <mailto:rdalek1...@gmail.com>>
To gentoo-user@lists.gentoo.org <mailto:gentoo-user@lists.gentoo.org>
Date 21.07.2025 15:49:48
Subject Re: [gentoo-user] sysctl as a directory instead of a file.
Possible wrong name.

~ % rc-update show | grep sysctl
                 sysctl | boot

~ % grep -n conf /etc/init.d/sysctl
21:     [ -e /etc/sysctl.conf ] || return 0
22:     local retval=0 var= comments= conf=
24:     for conf in /etc/sysctl.conf /etc/sysctl.d/*.conf; do
25:             if [ -r "$conf" ]; then
26:                     vebegin "applying $conf"
32:                     done < "$conf"
57:     eend $rc "Unable to configure some kernel parameters"

So (at least here) sysctl is run at boot time and there is a for-loop
in the
openrc-script (line 24) looking at conf files in /etc




Ahhh.  So the init script is set up to find the files where they are not
what may be the default on some other init system.  That works.  I can
live with that.  :-D


No, that is not correct. Stefan printed part of the function named
BSD_sysctl().
There is another function the same script, named Linux_sysctl(), which
basically just does 'sysctl --system'. So I'd not say Gentoo is non
standard, rather it seems to me the BSD function is provided to mimic
the Linux behavior.

But I already wrote this, looks like it did not get through.

raf




I was looking at line 24 where it lists two locations for the config
files.  I was thinking that other systems, using systemd or something,
may put the config files somewhere else.  So they may list other
locations if needed.

Either way, it works now.  I just find it odd that one has to give the
--system option is all.

Dale

:-)  :-)


Attachment: OpenPGP_0x57E64E0B7FC3BEDF.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to