diff --git a/qubeize_image b/qubeize_image index b19b308..3002c73 100755 --- a/qubeize_image +++ b/qubeize_image @@ -34,8 +34,11 @@ if [ "$VERBOSE" == "1" ]; then fi function cleanup() { + if grep -q " $PWD/mnt/proc " /proc/mounts; then + umount mnt/proc + fi if grep -q " $PWD/mnt " /proc/mounts; then - umount mnt/proc mnt + umount mnt fi } diff --git a/scripts_archlinux/09_cleanup.sh b/scripts_archlinux/09_cleanup.sh index 8b47e9f..7913424 100755 --- a/scripts_archlinux/09_cleanup.sh +++ b/scripts_archlinux/09_cleanup.sh @@ -7,7 +7,7 @@ mount $CACHEDIR/root-image.fs mnt_archlinux_dvd echo "--> Starting cleanup actions" # Remove unused packages and their dependencies (make dependencies) -cleanuppkgs=`./mnt_archlinux_dvd/usr/bin/arch-chroot $INSTALLDIR pacman -Qdt | cut -d " " -f 1` +cleanuppkgs=`./mnt_archlinux_dvd/usr/bin/arch-chroot $INSTALLDIR pacman -Qdt | grep -v kernel | cut -d " " -f 1` echo "--> Packages that can be cleaned up: $cleanuppkgs" if [ -n "$cleanuppkgs" ] ; then ./mnt_archlinux_dvd/usr/bin/arch-chroot $INSTALLDIR pacman --noconfirm -Rsc $cleanuppkgs