Skip to content

Commit

Permalink
Patch /etc/sudoers on Archlinux
Browse files Browse the repository at this point in the history
  • Loading branch information
alimirjamali committed Aug 15, 2024
1 parent 5b860df commit 886ed96
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions archlinux/PKGBUILD.in
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ package_qubes-vm-core() {
install -m 0755 "package-managers/upgrades-installed-check" "${pkgdir}/usr/lib/qubes/"
install -m 0755 "package-managers/upgrades-status-notify" "${pkgdir}/usr/lib/qubes/"

# Patch /etc/sudoers for Qubes
install -m 644 "archlinux/PKGBUILD.qubes-fix-sudo.hook" "${pkgdir}/usr/share/libalpm/hooks/qubes-fix-sudo.hook"

# Archlinux specific: enable autologin on tty1
mkdir -p "$pkgdir/etc/systemd/system/[email protected]/"
cat <<EOF > "$pkgdir/etc/systemd/system/[email protected]/autologin.conf"
Expand Down
11 changes: 11 additions & 0 deletions archlinux/PKGBUILD.qubes-fix-sudo.hook
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[Trigger]
Operation = Install
Operation = Upgrade
Type = Package
Target = sudo

[Action]
Description = Patching sudo config file for Qubes...
Depends = sudo
When = PostTransaction
Exec = /usr/bin/sed -e '/^Defaults secure_path/s/^/# /g' -i /etc/sudoers

0 comments on commit 886ed96

Please sign in to comment.