remove number of partitions limitation on umount

pull/8/head
Robert Nelson 15 years ago
parent 7ce77cd4a9
commit eae48f4813

@ -275,8 +275,13 @@ function cleanup_sd {
echo "Umounting Partitions" echo "Umounting Partitions"
echo "" echo ""
sudo umount ${MMC}${PARTITION_PREFIX}1 &> /dev/null || true NUM_MOUNTS=$(mount | grep -v none | grep "$MMC" | wc -l)
sudo umount ${MMC}${PARTITION_PREFIX}2 &> /dev/null || true
for (( c=1; c<=$NUM_MOUNTS; c++ ))
do
DRIVE=$(mount | grep -v none | grep "$MMC" | tail -1 | awk '{print $1}')
sudo umount ${DRIVE} &> /dev/null || true
done
sudo parted -s ${MMC} mklabel msdos sudo parted -s ${MMC} mklabel msdos
} }

Loading…
Cancel
Save