check_mmc fixes

pull/8/head
Robert Nelson 14 years ago
parent c646fb0c75
commit 98a6032bdc

@ -281,15 +281,15 @@ echo "done"
} }
function check_mmc { function check_mmc {
DISK_NAME="Disk|Platte" DISK_NAME="Disk|Platte|Disco"
FDISK=$(sudo fdisk -l | grep "[${DISK_NAME}] ${MMC}" | awk '{print $2}') FDISK=$(sudo fdisk -l 2>/dev/null | grep "[${DISK_NAME}] ${MMC}" | awk '{print $2}')
if test "-$FDISK-" = "-$MMC:-" if test "-$FDISK-" = "-$MMC:-"
then then
echo "" echo ""
echo "I see..." echo "I see..."
echo "sudo fdisk -l:" echo "sudo fdisk -l:"
sudo fdisk -l | grep "[${DISK_NAME}] /dev/" --color=never sudo fdisk -l 2>/dev/null | grep "[${DISK_NAME}] /dev/" --color=never
echo "" echo ""
echo "mount:" echo "mount:"
mount | grep -v none | grep "/dev/" --color=never mount | grep -v none | grep "/dev/" --color=never
@ -302,7 +302,7 @@ function check_mmc {
echo "Are you sure? I Don't see [${MMC}], here is what I do see..." echo "Are you sure? I Don't see [${MMC}], here is what I do see..."
echo "" echo ""
echo "sudo fdisk -l:" echo "sudo fdisk -l:"
sudo fdisk -l | grep "[${DISK_NAME}] /dev/" --color=never sudo fdisk -l 2>/dev/null | grep "[${DISK_NAME}] /dev/" --color=never
echo "" echo ""
echo "mount:" echo "mount:"
mount | grep -v none | grep "/dev/" --color=never mount | grep -v none | grep "/dev/" --color=never

Loading…
Cancel
Save