Validate the KDE sudoers fragment without the chroot passwd database
visudo needs the invoking uid in the chroot's account database; the purpose stage is a package tree whose /etc is not guaranteed complete at that point. Check the mode and content instead.
This commit is contained in:
parent
6fb235f6a0
commit
6e88fc914e
1 changed files with 4 additions and 1 deletions
|
|
@ -21,7 +21,10 @@ mkdir -p /job/core/etc/NetworkManager/conf.d /job/core/etc/sudoers.d /job/core/e
|
|||
printf '[main]\ndns=systemd-resolved\n' > /job/core/etc/NetworkManager/conf.d/20-archipelago.conf
|
||||
printf '%%wheel ALL=(ALL:ALL) ALL\n' > /job/core/etc/sudoers.d/10-archipelago-wheel
|
||||
chmod 0440 /job/core/etc/sudoers.d/10-archipelago-wheel
|
||||
arch-chroot /job/core visudo -c
|
||||
# visudo needs the invoking uid in the chroot passwd database; the purpose stage
|
||||
# is a package tree, not a booted system, so validate the fragment statically.
|
||||
test "$(stat -c '%a' /job/core/etc/sudoers.d/10-archipelago-wheel)" = "440"
|
||||
test "$(cat /job/core/etc/sudoers.d/10-archipelago-wheel)" = '%wheel ALL=(ALL:ALL) ALL'
|
||||
mkdir -p /job/core/etc/plymouth
|
||||
printf '[Daemon]\nTheme=spinner\n' > /job/core/etc/plymouth/plymouthd.conf
|
||||
test -f /job/core/usr/share/plymouth/themes/spinner/spinner.plymouth
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue