Changeset 3086


Ignore:
Timestamp:
Mar 8, 2013, 6:29:36 AM (5 years ago)
Author:
bruno
Message:
  • Fix #651 by removing a potential dmsetup conf before formating the USB with mkdosfs (Matthew Ross)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.0/mindi/mindi

    r3084 r3086  
    15711571    if [ $? -ne 0 ]; then
    15721572        LogAll "ERROR: Unable to access $USBDEVICE"
    1573         LogAll "       Make sure your USB device is pluged in"
     1573        LogAll "       Make sure your USB device is plugged in"
    15741574        MindiExit -1
    15751575    fi
     
    16061606    if [ $? -ne 0 ]; then
    16071607        LogAll "ERROR: Unable to create a vfat Filesystem on $USBDEVICE"
    1608         LogAll "       Make sure your USB device is pluged in"
     1608        LogAll "       Make sure your USB device is plugged in"
    16091609        $FDISK -l $USBDEVICE 2>&1 | tee -a $LOGFILE
    16101610        MindiExit -1
     
    16261626    umount $USBPART 2>> $LOGFILE 1>> $LOGFILE
    16271627    echo -en "."
     1628    # Some distro have a dmsetup conf at that point so removing it Cf: http://trac.mondorescue.org/ticket/651
     1629    if [ "`which dmsetup`" != "" ]; then
     1630        block_id="`echo $USBPART | sed 's|/dev/||g'`"
     1631        if [[ "`dmsetup ls | awk '{print $1}' | grep $block_id`" != "" ]]; then
     1632            LogFile "INFO: Removing $block_id from device mapper."
     1633            sleep 1
     1634            dmsetup remove $block_id
     1635        fi
     1636    fi
     1637    echo -en "."
    16281638    LogFile "INFO: Creating a vfat filesystem on $USBPART"
    16291639    mkdosfs -F 32 $USBPART 2>&1 >> $LOGFILE
    16301640    if [ $? -ne 0 ]; then
    16311641        LogAll "ERROR: Unable to create a vfat filesystem on $USBPART"
    1632         LogAll "       Make sure your USB device is pluged in and partitioned ($USBPART must exist on it)"
     1642        LogAll "       Make sure your USB device is plugged in and partitioned ($USBPART must exist on it)"
    16331643        $FDISK -l $USBDEVICE 2>&1 | tee -a $LOGFILE
    16341644        MindiExit -1
     
    16391649    if [ $? -ne 0 ]; then
    16401650        LogAll "ERROR: Unable to mount $USBPART on $MINDI_TMP/usb"
    1641         LogAll "       Make sure your USB device is pluged in, partitioned and formated ($USBPART must exist on it)"
     1651        LogAll "       Make sure your USB device is plugged in, partitioned and formated ($USBPART must exist on it)"
    16421652        $FDISK -l $USBDEVICE 2>&1 | tee -a $LOGFILE
    16431653        MindiExit -1
Note: See TracChangeset for help on using the changeset viewer.