From: Ben Gras Date: Fri, 22 Jul 2005 18:36:19 +0000 (+0000) Subject: Third-oldest image is thrown away instead of oldest, if there are at least 4 X-Git-Tag: v3.1.0~562 X-Git-Url: http://zhaoyanbai.com/repos/icons/debian/static/tz-art.htm?a=commitdiff_plain;h=71e6680b800ef9273b3576cd1cccb4b45041da8d;p=minix.git Third-oldest image is thrown away instead of oldest, if there are at least 4 images. (Oldest is kept.) Various cd message updates. --- diff --git a/tools/mkboot b/tools/mkboot index 71034f94d..31a3859e1 100755 --- a/tools/mkboot +++ b/tools/mkboot @@ -86,15 +86,14 @@ hdboot) set -- `ls -t $rootdir/boot/image` case $# in - 0|1) + 0|1|2|3) # Not much there, do not remove a thing. ;; *) - # Remove the newest image in /boot/image. This seems strange, - # but the old image is normally the "stable" image. - - echo "rm $root:/boot/image/$1" - rm -f "$rootdir/boot/image/$1" + # Remove the third-newest image in /boot/image, but + # only if there's an older one (which is kept). + echo "rm $root:/boot/image/$3" + rm -f "$rootdir/boot/image/$3" esac # Install the new image. @@ -175,8 +174,7 @@ cdfdboot) cp -p ../boot/boot /mnt/boot/boot || exit 1 umount $dev || exit 1 installboot -d $dev ../boot/bootblock boot/boot || exit 1 - edparams $dev 'unset bootopts; unset servers; unset image; ramimagedev=c0d2p1; unset rootdev; unset leader; leader() { echo If the system cannot find root, please hit ESC and set your\nramimagedev to the CD device, partition 1. e.g.\nramimagedev=c0d2p1 .. then boot to start.\n\nOtherwise I will boot with my defaults in 10 seconds.\n\n }; bootcd=1; main(){delay 10000;boot}; save' || exit -# edparams $dev 'unset bootopts; unset servers; unset image; ramimagedev=c0d2p1; unset rootdev; unset leader; bootcd=1; main(){delay 10000;boot}; save' || exit + edparams $dev 'unset bootopts; unset servers; unset image; cdproberoot=1; unset rootdev; unset leader; leader() { echo \n--- Welcome to MINIX3 ---\n\nPress ESC if you need to do any special configuration\nOtherwise I will boot with my defaults in 10 seconds\n\n }; bootcd=1; main(){delay 10000;boot}; save' || exit # copy image dd if=$dev of=cdfdimage bs=8192 count=180