From 339518860e58f721cb090cc83435e254e1892d12 Mon Sep 17 00:00:00 2001 From: Rudra Saraswat Date: Wed, 31 May 2023 17:13:03 +0530 Subject: [PATCH] chore: correct overlay lowerdir --- akshara | 4 ++-- akshara.hook | 16 ++++++---------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/akshara b/akshara index 624f65f..e352bf2 100755 --- a/akshara +++ b/akshara @@ -204,10 +204,10 @@ def update_system(): exec('chmod', '-R', '755', varlibpacman_overlay_workdir) exec('mount', '-t', 'overlay', 'overlay', '-o', - f'lowerdir=/var/lib/pacman,upperdir={usr_overlay},workdir={usr_overlay_workdir}', '/mnt/iso-update/squashfs-root/usr') + f'lowerdir=/mnt/iso-update/squashfs-root/,upperdir={usr_overlay},workdir={usr_overlay_workdir}', '/mnt/iso-update/squashfs-root/usr') exec('mount', '-t', 'overlay', 'overlay', '-o', - f'lowerdir=/var/lib/pacman,upperdir={varlibpacman_overlay},workdir={varlibpacman_overlay_workdir}', '/mnt/iso-update/squashfs-root/var/lib/pacman') + f'lowerdir=/mnt/iso-update/squashfs-root/var/lib/pacman,upperdir={varlibpacman_overlay},workdir={varlibpacman_overlay_workdir}', '/mnt/iso-update/squashfs-root/var/lib/pacman') # Install custom system packages exec('touch', '/.custom_pkg_list') diff --git a/akshara.hook b/akshara.hook index 2f0adaa..203121b 100755 --- a/akshara.hook +++ b/akshara.hook @@ -75,17 +75,13 @@ run_latehook() { # Handle overlays. - if [[ ! -f /new_root/mnt/iso-update/.successful-update ]]; then - if [[ -f '/new_root/.blend-overlays/future-usr/.okay' ]] && [[ -f '/new_root/.blend-overlays/future-varlibpacman/.okay' ]]; then - for i in usr varlibpacman; do - rm -rf /new_root/.blend-overlays/$i - mv /new_root/.blend-overlays/future-$i /new_root/.blend-overlays/$i - done - else - rm -rf /new_root/.blend-overlays/usr.workdir /new_root/.blend-overlays/varlibpacman.workdir - fi + if [[ -f '/new_root/.blend-overlays/future-usr/.okay' ]] && [[ -f '/new_root/.blend-overlays/future-varlibpacman/.okay' ]]; then + for i in usr varlibpacman; do + rm -rf /new_root/.blend-overlays/$i + mv /new_root/.blend-overlays/future-$i /new_root/.blend-overlays/$i + done else - rm -rf /new_root/.blend-overlays + rm -rf /new_root/.blend-overlays/usr.workdir /new_root/.blend-overlays/varlibpacman.workdir fi for i in usr varlibpacman; do