systemd: fix automount regression, add /var/lib/systemd for systemd-loginctl.
This commit is contained in:
parent
2a60ff5304
commit
5fcff64bc0
|
@ -0,0 +1,44 @@
|
||||||
|
From da375869ff31f83938123dc0d2a8d5c0f0845a0c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Michal Schmidt <mschmidt@redhat.com>
|
||||||
|
Date: Thu, 26 Jan 2012 01:19:19 +0100
|
||||||
|
Subject: [PATCH] mount: fix automount regression
|
||||||
|
|
||||||
|
Tom Gundersen noticed a regression where comment=systemd.automount in
|
||||||
|
fstab no longer prevented the adding of the After=foo.mount dependency
|
||||||
|
into local-fs.target. He bisected it to commit 9ddc4a26.
|
||||||
|
|
||||||
|
It turns out that clearing the default_dependencies flag is necessary
|
||||||
|
after all, in order to avoid complementing of Wants= with After= in the
|
||||||
|
target unit. We still want to add the dependencies on quota units and
|
||||||
|
umount.target though.
|
||||||
|
---
|
||||||
|
src/mount.c | 7 ++++++-
|
||||||
|
1 files changed, 6 insertions(+), 1 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/mount.c b/src/mount.c
|
||||||
|
index 6d0af4e..965f705 100644
|
||||||
|
--- src/mount.c
|
||||||
|
+++ src/mount.c
|
||||||
|
@@ -583,6 +583,11 @@ static int mount_load(Unit *u) {
|
||||||
|
|
||||||
|
if (UNIT(m)->fragment_path)
|
||||||
|
m->from_fragment = true;
|
||||||
|
+ else if (m->from_etc_fstab)
|
||||||
|
+ /* We always add several default dependencies to fstab mounts,
|
||||||
|
+ * but we do not want the implicit complementing of Wants= with After=
|
||||||
|
+ * in the target unit that this mount unit will be hooked into. */
|
||||||
|
+ UNIT(m)->default_dependencies = false;
|
||||||
|
|
||||||
|
if (!m->where)
|
||||||
|
if (!(m->where = unit_name_to_path(u->id)))
|
||||||
|
@@ -615,7 +620,7 @@ static int mount_load(Unit *u) {
|
||||||
|
if ((r = mount_add_fstab_links(m)) < 0)
|
||||||
|
return r;
|
||||||
|
|
||||||
|
- if (UNIT(m)->default_dependencies)
|
||||||
|
+ if (UNIT(m)->default_dependencies || m->from_etc_fstab)
|
||||||
|
if ((r = mount_add_default_dependencies(m)) < 0)
|
||||||
|
return r;
|
||||||
|
|
||||||
|
--
|
||||||
|
1.7.8.4
|
|
@ -1,6 +1,7 @@
|
||||||
# Template file for 'systemd'
|
# Template file for 'systemd'
|
||||||
pkgname=systemd
|
pkgname=systemd
|
||||||
version=39
|
version=39
|
||||||
|
revision=1
|
||||||
distfiles="http://www.freedesktop.org/software/$pkgname/$pkgname-$version.tar.xz"
|
distfiles="http://www.freedesktop.org/software/$pkgname/$pkgname-$version.tar.xz"
|
||||||
build_style=gnu-configure
|
build_style=gnu-configure
|
||||||
configure_args="--with-distro=other --with-rootprefix=
|
configure_args="--with-distro=other --with-rootprefix=
|
||||||
|
@ -32,6 +33,9 @@ conf_files="
|
||||||
/etc/systemd/systemd-journald.conf
|
/etc/systemd/systemd-journald.conf
|
||||||
/etc/systemd/systemd-logind.conf"
|
/etc/systemd/systemd-logind.conf"
|
||||||
|
|
||||||
|
# Required by systemd-loginctl enable-linger.
|
||||||
|
make_dirs="/var/lib/systemd 0755 root root"
|
||||||
|
|
||||||
Add_dependency run dbus
|
Add_dependency run dbus
|
||||||
|
|
||||||
Add_dependency build pkg-config
|
Add_dependency build pkg-config
|
||||||
|
@ -48,14 +52,12 @@ Add_dependency build libgee-devel
|
||||||
Add_dependency build libnotify-devel
|
Add_dependency build libnotify-devel
|
||||||
Add_dependency build vala-devel
|
Add_dependency build vala-devel
|
||||||
|
|
||||||
pre_configure()
|
pre_configure() {
|
||||||
{
|
|
||||||
sed -i -e "s|/bin/loadkeys|/sbin/loadkeys|g" Makefile.in
|
sed -i -e "s|/bin/loadkeys|/sbin/loadkeys|g" Makefile.in
|
||||||
sed -i -e "s|/bin/setfont|/sbin/setfont|g" Makefile.in
|
sed -i -e "s|/bin/setfont|/sbin/setfont|g" Makefile.in
|
||||||
}
|
}
|
||||||
|
|
||||||
post_install()
|
post_install() {
|
||||||
{
|
|
||||||
for f in etc/binfmt.d etc/sysctl.d etc/modules-load.d etc/tmpfiles.d \
|
for f in etc/binfmt.d etc/sysctl.d etc/modules-load.d etc/tmpfiles.d \
|
||||||
etc/systemd/user etc/systemd/system/local-fs.target.wants \
|
etc/systemd/user etc/systemd/system/local-fs.target.wants \
|
||||||
etc/systemd/system/sysinit.target.wants \
|
etc/systemd/system/sysinit.target.wants \
|
||||||
|
|
Loading…
Reference in New Issue