root=${primary}s0
home=${primary}s1
usr=${primary}s2
-umount /dev/$usr 2>/dev/null && echo "Unmounted $usr for you."
umount /dev/$root 2>/dev/null && echo "Unmounted $root for you."
umount /dev/$home 2>/dev/null && echo "Unmounted $home for you."
+umount /dev/$usr 2>/dev/null && echo "Unmounted $usr for you."
blockdefault=4
echo "Creating /dev/$root .."
mkfs -B $blocksizebytes /dev/$root || exit
-echo "Creating /dev/$usr .."
-mkfs -B $blocksizebytes /dev/$usr || exit
if [ ! "$auto" = r ]
then echo "Creating /dev/$home .."
mkfs -B $blocksizebytes /dev/$home || exit
fi
+echo "Creating /dev/$usr .."
+mkfs -B $blocksizebytes /dev/$usr || exit
+
echo ""
echo " --- Step 5: Wait for bad block detection ------------------------------"
echo ""
echo ""
echo "Scanning /dev/$root for bad blocks:"
readall -b /dev/$root | sh
+
+echo "Scanning /dev/$home for bad blocks:"
+readall -b /dev/$home | sh
+trap 2
+
echo ""
echo "Scanning /dev/$usr for bad blocks:"
readall -b /dev/$usr | sh
trap 2
-echo "Scanning /dev/$home for bad blocks:"
-readall -b /dev/$home | sh
-trap 2
echo ""
echo " --- Step 6: Wait for files to be copied -------------------------------"