summaryrefslogtreecommitdiffstats
path: root/deps/elogind/patches/elogind-219.12-runtime.patch
diff options
context:
space:
mode:
Diffstat (limited to 'deps/elogind/patches/elogind-219.12-runtime.patch')
-rw-r--r--deps/elogind/patches/elogind-219.12-runtime.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/deps/elogind/patches/elogind-219.12-runtime.patch b/deps/elogind/patches/elogind-219.12-runtime.patch
new file mode 100644
index 0000000..985dc57
--- /dev/null
+++ b/deps/elogind/patches/elogind-219.12-runtime.patch
@@ -0,0 +1,46 @@
+Taken from Gentoo:
+https://gitweb.gentoo.org/repo/gentoo.git/plain/sys-auth/elogind/files/elogind-219.12-runtime.patch
+
+From 276746896985c438d317fcae414e9c83a6dd3d76 Mon Sep 17 00:00:00 2001
+From: Sven Eden <yamakuzure@gmx.net>
+Date: Fri, 20 Jan 2017 17:14:35 +0100
+Subject: [PATCH] Create /run/systemd as needed
+
+* src/login/logind.c (main): Also create /run/systemd at startup.
+* Create /run/systemd/machines, so that the login monitor works.
+* Fail if any of the needed directories could not be created.
+* But do not fail if any of the needed directories exist.
+---
+ src/login/logind.c | 18 +++++++++++++++---
+ 1 file changed, 15 insertions(+), 3 deletions(-)
+
+diff --git a/src/login/logind.c b/src/login/logind.c
+index 1ab50ec..07a77b1 100644
+--- a/src/login/logind.c
++++ b/src/login/logind.c
+@@ -1131,10 +1131,21 @@ int main(int argc, char *argv[]) {
+ * existence of /run/systemd/seats/ to determine whether
+ * logind is available, so please always make sure this check
+ * stays in. */
+- mkdir_label("/run/systemd/seats", 0755);
+- mkdir_label("/run/systemd/users", 0755);
+- mkdir_label("/run/systemd/sessions", 0755);
+- mkdir_label("/run/systemd/machines", 0755);
++ r = mkdir_label("/run/systemd", 0755);
++ if ( (r < 0) && (-EEXIST != r) )
++ return log_error_errno(r, "Failed to create /run/systemd : %m");
++ r = mkdir_label("/run/systemd/seats", 0755);
++ if ( r < 0 && (-EEXIST != r) )
++ return log_error_errno(r, "Failed to create /run/systemd/seats : %m");
++ r = mkdir_label("/run/systemd/users", 0755);
++ if ( r < 0 && (-EEXIST != r) )
++ return log_error_errno(r, "Failed to create /run/systemd/users : %m");
++ r = mkdir_label("/run/systemd/sessions", 0755);
++ if ( r < 0 && (-EEXIST != r) )
++ return log_error_errno(r, "Failed to create /run/systemd/sessions : %m");
++ r = mkdir_label("/run/systemd/machines", 0755);
++ if ( r < 0 && (-EEXIST != r) )
++ return log_error_errno(r, "Failed to create /run/systemd/machines : %m");
+
+ m = manager_new();
+ if (!m) {