From: Ben Gras Date: Fri, 17 Mar 2006 07:28:17 +0000 (+0000) Subject: Only postinstall if umount succeeded X-Git-Tag: v3.1.2a~208 X-Git-Url: http://zhaoyanbai.com/repos/icons/debian/static/howto.html?a=commitdiff_plain;h=b833c48af272e3c0cac21493ce723ed99e8d1962;p=minix.git Only postinstall if umount succeeded --- diff --git a/commands/scripts/setup.sh b/commands/scripts/setup.sh index 97bf95ca8..a18aada97 100755 --- a/commands/scripts/setup.sh +++ b/commands/scripts/setup.sh @@ -637,17 +637,20 @@ then if mount /dev/$home /home 2>/dev/null fi fi -echo "Install is done. Running postinstall script.." - # Now chroot-mount the new system and run the postinstall script umount /dev/$usr || exit 1 -umount ${cddrive}p2 -mount /dev/$root /mnt || exit 1 -mount /dev/$usr /mnt/usr || exit 1 -chroot /mnt '/bin/sh /usr/src/commands/scripts/postinstall.sh' -mount -r ${cddrive}p2 /usr +if umount ${cddrive}p2 +then + mount /dev/$root /mnt || exit 1 + mount /dev/$usr /mnt/usr || exit 1 + echo "Install is done. Running postinstall script.." + chroot /mnt '/bin/sh /usr/src/commands/scripts/postinstall.sh' + echo "Postinstall script done." + mount -r ${cddrive}p2 /usr +else echo "Skipping post-install. +fi -echo "Postinstall script done. Saving random data.." +echo "Saving random data.." dd if=/dev/random of=/mnt/usr/adm/random.dat bs=1024 count=1 echo "