fix: copy over /etc files correctly
This commit is contained in:
parent
0976e092b5
commit
8238f67f79
1 changed files with 1 additions and 1 deletions
|
@ -36,7 +36,7 @@ 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
|
||||||
(cd /new_root/.update_rootfs/etc && find . -type f -print0 | grep -Fxvz -f <(cd "/new_root/.new_etc" && find . -type f -print0) | xargs -0 sh -c 'cp "$@" /new_root/.new_etc' sh)
|
(cd /new_root/.update_rootfs/etc && find . -type f -print0 | grep -Fxvz -f <(cd "/new_root/.new_etc" && find . -type f -print0) | xargs -n 1 -0 sh -c 'mkdir -p "/new_root/.new_etc/$(dirname "$1")"; cp "$1" /new_root/.new_etc/$(dirname "$1")' sh)
|
||||||
mv /new_root/etc /new_root/.old.etc || :
|
mv /new_root/etc /new_root/.old.etc || :
|
||||||
mv /new_root/.new_etc /new_root/etc
|
mv /new_root/.new_etc /new_root/etc
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue