fix: create .new_etc first

This commit is contained in:
Rudra B.S. 2023-11-22 15:49:41 +05:30
parent 8238f67f79
commit bd688e01b9

View file

@ -27,7 +27,7 @@ run_latehook() {
# Detect if /etc stage is active.
if [[ -f /new_root/.etc-stage ]]; then
# Create new /etc.
rm -rf /new_root/.new_etc
rm -rf /new_root/.new_etc; cp -r /new_root/etc /new_root/.new_etc
(cd /new_root/.new_etc && find . -type f -print0 | grep -Fxvz -f <(cd "/new_root/.update_rootfs/etc" && find . -type f) | xargs -0 rm -f)
(cd /new_root/.new_etc && find . -type l -print0 | grep -Fxvz -f <(cd "/new_root/.update_rootfs/etc" && find . -type l) | xargs -0 rm -f)
mkdir -p /.old.varlib