diff options
-rwxr-xr-x | libvasile | 38 |
1 files changed, 26 insertions, 12 deletions
@@ -1,7 +1,7 @@ # generic arch independent functions (used for both build && iso creation) kernelconfig () { - if [[ $(zgrep 'CONFIG_OVERLAY_FS=' /proc/config.gz) && $(zgrep "CONFIG_SQUASHFS=" /proc/config.gz) && $(zgrep "CONFIG_BLK_DEV_LOOP=" /proc/config.gz) ]] ; then + if [[ $(zgrep 'CONFIG_OVERLAYFS_FS=' /proc/config.gz) && $(zgrep "CONFIG_SQUASHFS=" /proc/config.gz) && $(zgrep "CONFIG_BLK_DEV_LOOP=" /proc/config.gz) ]] ; then echo "" echo "Kernel configuration seems OK, moving on" echo "" @@ -78,7 +78,7 @@ chrootstop () { umount -l "$overlaydir"/dev > /dev/null 2>&1 umount -l "$overlaydir"/tmp > /dev/null 2>&1 umount -l "$overlaydir"/usr/portage/packages > /dev/null 2>&1 - umount -l "$overlaydir"/mnt > /dev/null 2>&1 + umount -l "$overlaydir"/var/lib/portage > /dev/null 2>&1 umount -l "$overlaydir" > /dev/null 2>&1 umount -l "$rodir" > /dev/null 2>&1 } @@ -112,7 +112,16 @@ chrootstartx64 () { break fi done - mount -o bind targets "$overlaydir"/mnt + while : true ; do + if [[ ! -d sets ]] ; then + mkdir sets + mount -o bind sets "$overlaydir"/var/lib/portage + break + elif [[ -d sets ]] ; then + mount -o bind sets "$overlaydir"/var/lib/portage + break + fi + done mount -t proc proc "$overlaydir"/proc mount -t sysfs sysfs "$overlaydir"/sys mount -t devtmpfs -o relatime,size=3055348k,nr_inodes=763837,mode=755 none "$overlaydir"/dev @@ -194,7 +203,16 @@ chrootstartx86 () { break fi done - mount -o bind targets "$overlaydir"/mnt + while : true ; do + if [[ ! -d sets ]] ; then + mkdir sets + mount -o bind sets "$overlaydir"/var/lib/portage + break + elif [[ -d sets ]] ; then + mount -o bind sets "$overlaydir"/var/lib/portage + break + fi + done mount -t proc proc "$overlaydir"/proc mount -t sysfs sysfs "$overlaydir"/sys mount -t devtmpfs -o relatime,size=3055348k,nr_inodes=763837,mode=755 none "$overlaydir"/dev @@ -250,8 +268,7 @@ chrootx86 () { # x64 specific iso functions isostartx64 () { - mount -o bind packages "$isosyncdirx64"/usr/portage/packages - mount -o bind targets "$isosyncdirx64"/mnt + mount -o bind sets "$isosyncdirx64"/var/lib/portage mount -t proc proc "$isosyncdirx64"/proc mount -t sysfs sysfs "$isosyncdirx64"/sys mount -t devtmpfs -o relatime,size=3055348k,nr_inodes=763837,mode=755 none "$isosyncdirx64"/dev @@ -267,8 +284,7 @@ isostopx64 () { umount -l "$isosyncdirx64"/dev/shm > /dev/null 2>&1 umount -l "$isosyncdirx64"/dev > /dev/null 2>&1 umount -l "$isosyncdirx64"/tmp > /dev/null 2>&1 - umount -l "$isosyncdirx64"/usr/portage/packages > /dev/null 2>&1 - umount -l "$isosyncdirx64"/mnt > /dev/null 2>&1 + umount -l "$isosyncdirx64"/var/lib/portage > /dev/null 2>&1 } isooverlaysx64 () { @@ -307,8 +323,7 @@ isochrootx64 () { # x86 specific iso functions isostartx86 () { - mount -o bind packages "$isosyncdirx86"/usr/portage/packages - mount -o bind targets "$isosyncdirx86"/mnt + mount -o bind sets "$isosyncdirx86"/var/lib/portage mount -t proc proc "$isosyncdirx86"/proc mount -t sysfs sysfs "$isosyncdirx86"/sys mount -t devtmpfs -o relatime,size=3055348k,nr_inodes=763837,mode=755 none "$isosyncdirx86"/dev @@ -324,8 +339,7 @@ isostopx86 () { umount -l "$isosyncdirx86"/dev/shm > /dev/null 2>&1 umount -l "$isosyncdirx86"/dev > /dev/null 2>&1 umount -l "$isosyncdirx86"/tmp > /dev/null 2>&1 - umount -l "$isosyncdirx86"/usr/portage/packages > /dev/null 2>&1 - umount -l "$isosyncdirx86"/mnt > /dev/null 2>&1 + umount -l "$isosyncdirx86"/var/lib/portage > /dev/null 2>&1 } isooverlaysx86 () { |