]> Zhao Yanbai Git Server - minix.git/commitdiff
setup.sh: clean up 86/3286/2
authorLionel Sambuc <lionel.sambuc@gmail.com>
Wed, 20 Jan 2016 16:41:58 +0000 (17:41 +0100)
committerLionel Sambuc <lionel.sambuc@gmail.com>
Fri, 22 Jan 2016 11:24:22 +0000 (12:24 +0100)
 - Fix unmounting order of slices.
 - Update pkgin pre-installation commands, make them as generic as
   possible.

Change-Id: Ifaa4021fed048facca8d2a170aa65491feb37702

minix/commands/setup/setup.sh

index b4e54c38edc360a687a50ae318fffd5f38279a24..5eadf2d0b55b218dd9cf9d2120045e8dc1c07a1c 100644 (file)
@@ -464,8 +464,8 @@ then
                        rm -rf /mnt/usr/tmp/root_backup
                        # umount shouldn't fail here, but if it will, next
                        # "rm -rf" will serve for user's pleasure.
-                       umount /mnt/root >/dev/null || exit
                        umount /mnt/usr >/dev/null || exit
+                       umount /mnt/root >/dev/null || exit
                        rm -rf /mnt/root /mnt/usr
                        exit 1
                fi
@@ -769,8 +769,8 @@ if [ -e "$PACKAGES_DIR" ]
 then
        echo "Installing pkgin..."
 
-       sh -c "cp $PACKAGES_DIR/pkgin-* $PACKAGES_DIR/pkg_install-* $PACKAGES_DIR/openssl-* /mnt/tmp &&
-        chroot /mnt pkg_add /tmp/openssl-* /tmp/pkg_install-* /tmp/pkgin-*"
+       sh -c "cp $PACKAGES_DIR/pkgin-* $PACKAGES_DIR/pkg_install-* $PACKAGES_DIR/libarchive-* /mnt/tmp &&
+        chroot /mnt pkg_add /tmp/pkgin-*"
        rm -f /mnt/tmp/*
 
        if [ -f "$PACKAGES_DIR/pkg_summary.bz2" ]
@@ -786,11 +786,11 @@ then
        fi
 fi
 
-umount /dev/$usr && echo Unmounted $usr
-umount /dev/$root && echo Unmounted $root
 if [ "$nohome" = 0 ]; then
        umount /dev/$home && echo Unmounted $home
 fi
+umount /dev/$usr && echo Unmounted $usr
+umount /dev/$root && echo Unmounted $root
 
 echo "
 Please type 'shutdown -r now' to exit MINIX 3 and reboot. To boot into