rm -f ${DESTDIR}/etc/pm/sleep.d/40autorandr
# Rules for systemd
-HAVE_SYSTEMD=$(shell grep -q systemd /proc/1/cmdline && echo "y")
+HAVE_SYSTEMD=$(shell grep -q systemd $$(readlink -f $$(cat /proc/1/cmdline)) && echo "y")
ifeq ($(HAVE_SYSTEMD),y)
DEFAULT_TARGETS+=systemd
endif