summaryrefslogtreecommitdiff
path: root/src/config/ConfigManager.cpp
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2023-04-15 19:03:09 +0000
committerGitHub <noreply@github.com>2023-04-15 20:03:09 +0100
commit63841c8aac8c6bae7ed8825939d19471943313b9 (patch)
tree1ebfeb79a3a6de7742375d903d73c3351719ddc0 /src/config/ConfigManager.cpp
parent8944db49be38d978b7592655c7c7bd98edc7c40a (diff)
Disable systemctl when built without systemd support (#2066)
/bin/sh: systemctl: not found
Diffstat (limited to 'src/config/ConfigManager.cpp')
-rw-r--r--src/config/ConfigManager.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp
index b8dd3321..15fbcda0 100644
--- a/src/config/ConfigManager.cpp
+++ b/src/config/ConfigManager.cpp
@@ -1090,8 +1090,11 @@ void CConfigManager::handleEnv(const std::string& command, const std::string& va
if (command.back() == 'd') {
// dbus
- const auto CMD = "systemctl --user import-environment " + ARGS[0] +
+ const auto CMD =
+#ifdef USES_SYSTEMD
+ "systemctl --user import-environment " + ARGS[0] +
" && hash dbus-update-activation-environment 2>/dev/null && "
+#endif
"dbus-update-activation-environment --systemd " +
ARGS[0];
handleRawExec("", CMD.c_str());
@@ -1719,7 +1722,9 @@ void CConfigManager::dispatchExecOnce() {
if (g_pCompositor->m_sWLRSession)
handleRawExec(
"",
+#ifdef USES_SYSTEMD
"systemctl --user import-environment DISPLAY WAYLAND_DISPLAY HYPRLAND_INSTANCE_SIGNATURE XDG_CURRENT_DESKTOP && hash dbus-update-activation-environment 2>/dev/null && "
+#endif
"dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP HYPRLAND_INSTANCE_SIGNATURE");
firstExecDispatched = true;