summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2014-11-06 15:26:58 +0800
committerChen Qi <Qi.Chen@windriver.com>2014-11-06 15:26:58 +0800
commita66c9ed9fe8f4b1524803dd814e62fa606a1c34c (patch)
tree4adcd8997038ff0334e4b02e60b4a2790e93d68d
parentd7a277b35bcc67050046c76fb70412101679a545 (diff)
downloadopenembedded-core-contrib-ChenQi/systemd-sysctl.tar.gz
openembedded-core-contrib-ChenQi/systemd-sysctl.tar.bz2
openembedded-core-contrib-ChenQi/systemd-sysctl.zip
systemd: make /etc/sysctl.conf have real effectChenQi/systemd-sysctl
In systemd, /etc/sysctl.conf is actually ignored by systemd-sysctl, because this command only examine *.conf files under a bunch of directories like /etc/sysctl.d or /usr/lib/sysctl.d. The problem is we are used to configuring kernel parameters in /etc/sysctl.conf, so it would be really strange if the configuration in that file doesn't have any effect. This patch reference Fedora's solution to this problem, creating a symlink to /etc/sysctl.conf under /etc/sysctl.d/. Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
-rw-r--r--meta/recipes-core/systemd/systemd_216.bb3
1 files changed, 3 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd_216.bb b/meta/recipes-core/systemd/systemd_216.bb
index 27a5d926ff..b730b130c9 100644
--- a/meta/recipes-core/systemd/systemd_216.bb
+++ b/meta/recipes-core/systemd/systemd_216.bb
@@ -148,6 +148,9 @@ do_install() {
# Enable journal to forward message to syslog daemon
sed -i -e 's/.*ForwardToSyslog.*/ForwardToSyslog=yes/' ${D}${sysconfdir}/systemd/journald.conf
+
+ # Make /etc/sysctl.conf have real effect on systemd based systems
+ ln -sf ../sysctl.conf ${D}${sysconfdir}/sysctl.d/99-sysctl.conf
}
do_install_ptest () {