Browse Source

Merge commit '9801dd7d1625a5e4e4b7049a9571a0309a4406dd' into install-grub-arch

Demi Marie Obenour 3 years ago
parent
commit
84101a426b
1 changed files with 6 additions and 1 deletions
  1. 6 1
      passwordless-root/Makefile

+ 6 - 1
passwordless-root/Makefile

@@ -8,7 +8,12 @@ PAMCONFIGSDIR = /usr/share/pam-configs/
 
 install:
 	install -d -m 0750 $(DESTDIR)$(SUDOERSDIR)
-	install -D -m 0440 qubes.sudoers $(DESTDIR)$(SUDOERSDIR)/qubes
+	if [ -f /etc/redhat-release ] || [ -f /etc/debian_version ]; then \
+		exec install -D -m 0440 qubes.sudoers $(DESTDIR)$(SUDOERSDIR)/qubes; \
+	else \
+		sed -E '/^[^#]/s/\<(ROLE|TYPE)=[A-Za-z0-9_]+[[:space:]]+//g' qubes.sudoers | \
+		install -D -m 0440 /dev/stdin $(DESTDIR)$(SUDOERSDIR)/qubes; \
+	fi
 	install -D -m 0644 polkit-1-qubes-allow-all.pkla $(DESTDIR)$(POLKIT1DIR)/localauthority/50-local.d/qubes-allow-all.pkla
 	install -d -m 0750 $(DESTDIR)$(POLKIT1DIR)/rules.d
 	install -D -m 0644 polkit-1-qubes-allow-all.rules $(DESTDIR)$(POLKIT1DIR)/rules.d/00-qubes-allow-all.rules