From: Jakub Sztandera Date: Fri, 30 Oct 2015 11:05:44 +0000 (+0100) Subject: arch template: Fix systemd-sysctl service X-Git-Tag: lxc-2.0.0.beta1~77^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=427d42930d99f93bf78c61ec9f555dd883c5039e;p=thirdparty%2Flxc.git arch template: Fix systemd-sysctl service The systemd-sysctl service includes condition that /proc/sys/ has to be read-write. In lxc only /proc/sys/net/ is read-write which causes the condition to fail and service not to run. This patch changes the check to /proc/sys/net/ and makes the service apply only rules that are in net tree. Signed-off-by: Jakub Sztandera --- diff --git a/templates/lxc-archlinux.in b/templates/lxc-archlinux.in index fc6f71494..c692abf42 100644 --- a/templates/lxc-archlinux.in +++ b/templates/lxc-archlinux.in @@ -103,6 +103,10 @@ sed -e 's/^ConditionPathExists=/# ConditionPathExists=/' \ -e 's/After=dev-%i.device/After=/' \ < /lib/systemd/system/getty\@.service \ > /etc/systemd/system/getty\@.service +# fix systemd-sysctl service +sed -e 's/^ConditionPathIsReadWrite=\/proc\/sys\/$/ConditionPathIsReadWrite=\/proc\/sys\/net\//' \ + -e 's/^ExecStart=\/usr\/lib\/systemd\/systemd-sysctl$/ExecStart=\/usr\/lib\/systemd\/systemd-sysctl --prefix net/' \ + -i /usr/lib/systemd/system/systemd-sysctl.service # initialize pacman keyring pacman-key --init pacman-key --populate archlinux