]> git.donarmstrong.com Git - deb_pkgs/autorandr.git/commitdiff
Fix systemd detection, closes #48
authorPhillip Berndt <phillip.berndt@googlemail.com>
Mon, 9 May 2016 07:16:16 +0000 (09:16 +0200)
committerPhillip Berndt <phillip.berndt@googlemail.com>
Mon, 9 May 2016 07:16:16 +0000 (09:16 +0200)
Makefile
contrib/pm-utils/40autorandr

index 42ee710fcd5c04f0b4fa57dc98df0abf14a5eb25..30419ac3d7a2c763f5302ba468dc65919f24a2a9 100644 (file)
--- 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
index f44739a609e2aa032ed868c584a773d48851c234..4d59012515821c54d630eeda5987f4b5a9653361 100755 (executable)
@@ -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