chore: carry over sudoers.d

This commit is contained in:
Rudra B.S. 2023-11-24 14:12:33 +05:30
parent 1602ae3dd6
commit 441115374a

View file

@ -36,6 +36,8 @@ run_latehook() {
cp /new_root/.update_rootfs/etc/pacman.conf /new_root/.new_etc/pacman.conf cp /new_root/.update_rootfs/etc/pacman.conf /new_root/.new_etc/pacman.conf
rm -rf /new_root/.new_etc/pacman.d rm -rf /new_root/.new_etc/pacman.d
cp -a /new_root/.update_rootfs/etc/pacman.d /new_root/.new_etc/pacman.d cp -a /new_root/.update_rootfs/etc/pacman.d /new_root/.new_etc/pacman.d
rm -rf /new_root/.new_etc/sudoers.d
cp -a /new_root/etc/sudoers.d /new_root/.new_etc
(cd /new_root/.update_rootfs/etc && find . -type f | grep -Fxv -f <(cd "/new_root/.new_etc" && find . -type f) | xargs -n 1 sh -c 'mkdir -p "/new_root/.new_etc/$(dirname "$1")"; cp -a "$1" /new_root/.new_etc/$(dirname "$1")' sh) (cd /new_root/.update_rootfs/etc && find . -type f | grep -Fxv -f <(cd "/new_root/.new_etc" && find . -type f) | xargs -n 1 sh -c 'mkdir -p "/new_root/.new_etc/$(dirname "$1")"; cp -a "$1" /new_root/.new_etc/$(dirname "$1")' sh)
(cd /new_root/.update_rootfs/etc && find . -type l | grep -Fxv -f <(cd "/new_root/.new_etc" && find . -type l) | xargs -n 1 sh -c 'mkdir -p "/new_root/.new_etc/$(dirname "$1")"; cp -a "$1" /new_root/.new_etc/$(dirname "$1")' sh) (cd /new_root/.update_rootfs/etc && find . -type l | grep -Fxv -f <(cd "/new_root/.new_etc" && find . -type l) | xargs -n 1 sh -c 'mkdir -p "/new_root/.new_etc/$(dirname "$1")"; cp -a "$1" /new_root/.new_etc/$(dirname "$1")' sh)
mv /new_root/etc /new_root/.old.etc || : mv /new_root/etc /new_root/.old.etc || :