Re: [systemd-devel] [PATCH 2/2] core: require $XDG_RUNTIME_DIR to be set for user instances
On Thu, Oct 10, 2013 at 02:25:46PM -0700, Kok, Auke-jan H wrote: On Wed, Oct 9, 2013 at 4:57 AM, Mantas Mikulėnas graw...@gmail.com wrote: It seems that some places use /run otherwise, which isn't going to work. --- src/core/main.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/core/main.c b/src/core/main.c index fe291f8..36543c6 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -1404,6 +1404,12 @@ int main(int argc, char *argv[]) { goto finish; } +if (arg_running_as == SYSTEMD_USER +!getenv(XDG_RUNTIME_DIR)) { +log_error(Trying to run as user instance, but \$XDG_RUNTIME_DIR is not set.); +goto finish; +} + This is good, hopefully it will help folks debug user session usage better. Yeah, this should help. Applied. Zbyszek ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] [PATCH 2/2] core: require $XDG_RUNTIME_DIR to be set for user instances
On Wed, Oct 9, 2013 at 4:57 AM, Mantas Mikulėnas graw...@gmail.com wrote: It seems that some places use /run otherwise, which isn't going to work. --- src/core/main.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/core/main.c b/src/core/main.c index fe291f8..36543c6 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -1404,6 +1404,12 @@ int main(int argc, char *argv[]) { goto finish; } +if (arg_running_as == SYSTEMD_USER +!getenv(XDG_RUNTIME_DIR)) { +log_error(Trying to run as user instance, but \$XDG_RUNTIME_DIR is not set.); +goto finish; +} + This is good, hopefully it will help folks debug user session usage better. Auke ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] [PATCH 2/2] core: require $XDG_RUNTIME_DIR to be set for user instances
It seems that some places use /run otherwise, which isn't going to work. --- src/core/main.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/core/main.c b/src/core/main.c index fe291f8..36543c6 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -1404,6 +1404,12 @@ int main(int argc, char *argv[]) { goto finish; } +if (arg_running_as == SYSTEMD_USER +!getenv(XDG_RUNTIME_DIR)) { +log_error(Trying to run as user instance, but \$XDG_RUNTIME_DIR is not set.); +goto finish; +} + if (arg_running_as == SYSTEMD_SYSTEM arg_action == ACTION_RUN running_in_chroot() 0) { -- 1.8.4 ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel