From: Lionel Sambuc Date: Fri, 5 Sep 2014 08:01:18 +0000 (+0200) Subject: commands/setup: fixes for new sh & renamed fsck X-Git-Tag: v3.3.0~16 X-Git-Url: http://zhaoyanbai.com/repos/Bv9ARM.ch11.html?a=commitdiff_plain;h=3f072cf30fd9ae08f8c62bf7bbefceae2a0dad3a;p=minix.git commands/setup: fixes for new sh & renamed fsck - adapt an arithmetic expression for the new sh - update the fsck call to use the main fsck wrapper instead of a specific fsck version. Change-Id: I7e25bf6e54b5c9f564082459e78b9ce5c39254cf --- diff --git a/minix/commands/setup/setup.sh b/minix/commands/setup/setup.sh index eba16ee49..bf662f493 100644 --- a/minix/commands/setup/setup.sh +++ b/minix/commands/setup/setup.sh @@ -365,8 +365,8 @@ then read ok if [ "$ok" = "y" -o "$ok" = "Y" -o "$ok" = "" ] then - fsck.mfs -a "/dev/$root" >/dev/null - fsck.mfs -a "/dev/$usr" >/dev/null + fsck -t mfs -T mfs:-a "/dev/$root" >/dev/null + fsck -t mfs -T mfs:-a "/dev/$usr" >/dev/null fi # If there is no ELF stuff and not enough space after repartitioning, @@ -378,7 +378,7 @@ then cp -pf /bin/update_bootcfg /mnt/bin/ && \ cp -pf /etc/boot.cfg.default /mnt/etc/ && \ - cp -pf /boot_monitor /mnt/ || exit + cp -pf /usr/mdec/boot_monitor /mnt/ || exit if [ ! -d /mnt/boot/minix_default -o ! -r /mnt/boot/minix_default/kernel ] then @@ -419,7 +419,7 @@ then umount /mnt/usr && umount /mnt || exit # Check if enough space for new boot - let bootspace=`devsize /dev/$primary`-`devsize /dev/$root`-`devsize /dev/$home`-`devsize /dev/$usr` >/dev/null + bootspace=$((`devsize /dev/$primary`-`devsize /dev/$root`-`devsize /dev/$home`-`devsize /dev/$usr`)) >/dev/null if [ $bootspace -lt $BOOTXXSECTS ] then echo "" @@ -591,7 +591,7 @@ else fi # Check if enough space for new boot (even if old used) - let bootspace=`devsize /dev/$primary`-`devsize /dev/$root`-`devsize /dev/$home`-`devsize /dev/$usr` >/dev/null + bootspace=$((`devsize /dev/$primary`-`devsize /dev/$root`-`devsize /dev/$home`-`devsize /dev/$usr`)) >/dev/null if [ $bootspace -lt $BOOTXXSECTS ] then echo "Root partition size will be reduced by up to 16Kb to fit new bootloader."