From 6cd92b657027423721a29dfe0c7080483cdfc81e Mon Sep 17 00:00:00 2001 From: Phillip Berndt Date: Mon, 9 May 2016 09:16:16 +0200 Subject: [PATCH] Fix systemd detection, closes #48 --- Makefile | 2 +- contrib/pm-utils/40autorandr | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 42ee710..30419ac 100644 --- a/Makefile +++ b/Makefile @@ -45,7 +45,7 @@ uninstall_pmutils: rm -f ${DESTDIR}/etc/pm/sleep.d/40autorandr # Rules for systemd -HAVE_SYSTEMD=$(shell grep -q systemd $$(readlink -f $$(awk '{print $$1}' /proc/1/cmdline)) && echo "y") +HAVE_SYSTEMD=$(shell grep -q systemd /proc/1/comm && echo "y") ifeq ($(HAVE_SYSTEMD),y) DEFAULT_TARGETS+=systemd endif diff --git a/contrib/pm-utils/40autorandr b/contrib/pm-utils/40autorandr index f44739a..4d59012 100755 --- a/contrib/pm-utils/40autorandr +++ b/contrib/pm-utils/40autorandr @@ -39,7 +39,7 @@ detect_display() done } -if grep -q systemd $(readlink -f $(awk '{print $1}' /proc/1/cmdline)) && [ "$2" = "udev" ]; then +if grep -q systemd /proc/1/comm && [ "$2" = "udev" ]; then exec /bin/systemctl start autorandr-resume.service fi -- 2.39.2