| Summary: | Modification of sysctl not taken after reboot | ||
|---|---|---|---|
| Product: | Mageia | Reporter: | Michel Morisot <info> |
| Component: | RPM Packages | Assignee: | Colin Guthrie <mageia> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Normal | CC: | doktor5000, eeeemail, info, mageia, sylvainsjc, thierry.vignaud, yvesbrungard |
| Version: | Cauldron | Keywords: | Triaged |
| Target Milestone: | Mageia 4 | ||
| Hardware: | All | ||
| OS: | Linux | ||
| See Also: | https://bugs.mageia.org/show_bug.cgi?id=25212 | ||
| Whiteboard: | |||
| Source RPM: | initscripts | CVE: | |
| Status comment: | |||
|
Description
Michel Morisot
2013-12-21 00:44:26 CET
Michel Morisot
2013-12-21 01:01:32 CET
CC:
(none) =>
info
Sylvain ZUCCA
2013-12-21 09:38:01 CET
CC:
(none) =>
sylvainsjc Je pense avoir trouvé la solution en lisant ceci: http://www.linuxed.net/post/2012/10/19/Configurer-sysctl-avec-systemd le fichier sysctl.conf est à placer dans le répertoire /etc/sysctl.d Et ça fonctionne. La modification est fonctionnelle après un reboot sortie: cat /proc/sys/vm/swappiness 15 Qu'en pensez-vous de la solution ? Mon idée "et si je mettais un lien pointant vers sysctl.conf dans ce répertoire (etc/sysctl.d) ? " n'était pas si éloignée que cela de la solution. Petite réflexion, N'aurait-il pas d'autres fichiers qui devraient se trouver dans ce répertoire /etc/sysctl.d au lieu de /etc ? ********************************************************** I think of having found the solution by reading this: http://www.linuxed.net/post/2012/10/19/Configurer-sysctl-avec-systemd the file sysctl.conf is to be placed in the directory /etc/sysctl.d And that functions. The modification is functional after a reboot left: cat /proc/sys/vm/swappiness 15 what do you think about it of the solution? My idea âand if I did put a link pointing towards sysctl.conf in this directory (etc/sysctl.d)? â only that was not so distant from the solution. small reflection, wouldn't it have other files which should be in this /etc/sysctl.d directory instead of /etc?
Michel Morisot
2013-12-22 15:42:43 CET
Target Milestone:
--- =>
Mageia 4 @Michel: Please post only in english, thanks :)
Confirming, none of the settings in /etc/sysctl.conf are currently effective so that file is currently useless. Seems either the installer or some draktool still writes to it:
$ cat /etc/sysctl.conf
net.ipv4.icmp_ignore_bogus_error_responses=1
net.ipv4.icmp_echo_ignore_broadcasts=0
net.ipv4.icmp_echo_ignore_all=0
net.ipv4.conf.all.rp_filter=1
net.ipv4.conf.all.log_martians=1
$ LC_ALL=C rpm -qf /etc/sysctl.conf
file /etc/sysctl.conf is not owned by any package
The following seem to be taken into account by systemd-sysctl service and should be used instead:
$ grep sysctl.d$ /usr/lib/systemd/system/systemd-sysctl.service
ConditionDirectoryNotEmpty=|/lib/sysctl.d
ConditionDirectoryNotEmpty=|/usr/lib/sysctl.d
ConditionDirectoryNotEmpty=|/usr/local/lib/sysctl.d
ConditionDirectoryNotEmpty=|/etc/sysctl.d
ConditionDirectoryNotEmpty=|/run/sysctl.d
As proposed by Michel, adding a symlink is currently probably easiest fix:
ln -s /etc/sysctl.conf /etc/sysctl.d/
as sysctl itself seems to still default to /etc/sysctl.conf to read from config file (-p)
$ sysctl --help | grep -e "-p"
sysctl [-n] [-e] [-q] -p <file> (default /etc/sysctl.conf)
This is with beta2 install from DVD with all updates applied.CC:
(none) =>
doktor5000 @ Michel: Please post only in English, thanks :) Sorry my English is very bad, I prefer to put my message in it both languages. Unless you prefer that only English-speaking members warn you of bug. Désolé mon anglais est très mauvais, je prefère pour cela mettre mon message dans les deux langues. Sauf si vous préférez que seuls les membres anglophones vous avertissent des bug. What tool did you use in order to change settings (that were ignored)? Component:
Installer =>
RPM Packages sudo kate (kde) addition of the line at the end of the file add vm.swappiness=15 it is all vm.swappiness=15 of course /etc/sysctl.conf has been obsoleted, isn't it Colin? Source RPM:
(none) =>
initscripts Hmm, yes, but it's supposed to be symlinked as /etc/sysctl.d/99-sysctl.conf such that it still works... Seems I never added that symlink to a package tho' - not sure how best to do it either as /etc/sysctl.conf is not owned by any package either... any bright ideas? Well, simply do it in some post script? [doktor5000@Mageia4 ~]$ rpm -qf /etc/sysctl.d/51-alt-sysrq.conf file /etc/sysctl.d/51-alt-sysrq.conf is not owned by any package [doktor5000@Mageia4 ~]$ rpm -qf /etc/sysctl.d/ initscripts-9.41-21.mga4 systemd-units-208-10.mga4 Probably /etc/sysctl.d/51-alt-sysrq.conf should also be owned by some package? Why not add both to initscripts? Keywords:
NEEDINFO =>
Triaged The idea was to make it controlled by msec based on security level, so it's not really the kind of thing that should be "owned" by a package as it's dependant on various other system settings. Sorry, the above comment was in reply to the 51-alt-sysrq thing. I forgot about the other symlink. Will try and add it in this weekend.
claire robinson
2014-04-06 13:52:08 CEST
CC:
(none) =>
eeeemail /etc/sysctl.conf is now owned by initscripts, and /etc/sysctl.d/99-sysctl.conf now points to /etc/sysctl.conf in mga6. Can we close this one as OLD ?
Florian Hubold
2019-09-22 23:49:11 CEST
See Also:
(none) =>
https://bugs.mageia.org/show_bug.cgi?id=25212 It seems solved. Status:
NEW =>
RESOLVED |