Changeset 527 in MondoRescue for trunk/mindi/mindi


Ignore:
Timestamp:
May 5, 2006, 12:10:04 PM (18 years ago)
Author:
bcornec
Message:

merge -r 523:526 $SVN_M/branches/stable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/mindi/mindi

    r524 r527  
    14051405
    14061406        # 2nd try, which works on a standard partition (ext2/3), but not on swap
    1407         if [ -n $actual_dev ] ; then
     1407        if [ "x$actual_dev" = "x" ] ; then
    14081408            actual_dev=`/bin/mount -l | /bin/grep " [$redhat_label]" | /bin/cut -d' ' -f1`
    14091409        fi
    14101410
    14111411        # 3rd try, with vol_id (which works with swap)
    1412         if [ -n $actual_dev -a -x "/sbin/vol_id" ] ; then
     1412        if [ "x$actual_dev" = "x" -a -x "/sbin/vol_id" ] ; then
    14131413                list_swaps=`cat /proc/swaps | /bin/grep "/dev/" | /bin/awk '{ print $1 }' `
    14141414                for dev_swap in $list_swaps ; do
    14151415                    dev_exists=`/sbin/vol_id $dev_swap | /bin/grep "$redhat_label"`
    1416                     if [ -n "$dev_exists" ] ; then
     1416                    if [ "x$dev_exists" != "x" ] ; then
    14171417                        actual_dev=$dev_swap
    14181418                        break;
     
    14221422
    14231423        # 4th try : pre-formated LABEL. Format is : LABEL=SWAP-mydevice. e.g. : LABEL=SWAP-hda5
    1424         if [ -n $actual_dev -a  "`echo "$current_partition" | /bin/grep -i "LABEL=SWAP"`" != ""] ; then
     1424        if [ "x$actual_dev" = "x" -a  "`echo "$current_partition" | /bin/grep -i "LABEL=SWAP"`" != ""] ; then
    14251425                try_dev="`echo "$redhat_label" | /bin/cut -d '-' -f2`"
    14261426                present_dev="`/bin/cat /proc/swaps | /bin/grep -w /dev/$try_dev`"
    1427                 if [ -n "$present_dev" ] ; then
     1427                if [ "x$present_dev" != "x" ] ; then
    14281428                    actual_dev="/dev/$try_dev"
    14291429                fi
     
    14311431
    14321432        # Check if one of all those tries has known success
    1433         if [ ! -n $actual_dev ] ; then
     1433        if [ "x$actual_dev" != "x" ] ; then
    14341434                current_partition=$actual_dev
    14351435        else
Note: See TracChangeset for help on using the changeset viewer.