endif
install_pmutils:
- install -D -m 644 contrib/pm-utils/40autorandr ${DESTDIR}/etc/pm/sleep.d/40autorandr
+ install -D -m 755 contrib/pm-utils/40autorandr ${DESTDIR}/etc/pm/sleep.d/40autorandr
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
DEFAULT_TARGETS+=udev
endif
-install_udev:
+install_udev: install_pmutils
install -D -m 644 contrib/udev/40-monitor-hotplug.rules ${DESTDIR}/etc/udev/rules.d/40-monitor-hotplug.rules
ifeq (${USER},root)
udevadm control --reload-rules
@echo " udevadm control --reload-rules"
endif
-uninstall_udev:
+uninstall_udev: uninstall_pmutils
rm -f ${DESTDIR}/etc/udev/rules.d/40-monitor-hotplug.rules