Changeset 528


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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.0.8/mindi/mindi

    r525 r528  
    13531353
    13541354        # 2nd try, which works on a standard partition (ext2/3), but not on swap
    1355         if [ -n $actual_dev ] ; then
     1355        if [ "x$actual_dev" = "x" ] ; then
    13561356            actual_dev=`/bin/mount -l | /bin/grep " [$redhat_label]" | /bin/cut -d' ' -f1`
    13571357        fi
    13581358
    13591359        # 3rd try, with vol_id (which works with swap)
    1360         if [ -n $actual_dev -a -x "/sbin/vol_id" ] ; then
     1360        if [ "x$actual_dev" = "x" -a -x "/sbin/vol_id" ] ; then
    13611361                list_swaps=`cat /proc/swaps | /bin/grep "/dev/" | /bin/awk '{ print $1 }' `
    13621362                for dev_swap in $list_swaps ; do
    13631363                    dev_exists=`/sbin/vol_id $dev_swap | /bin/grep "$redhat_label"`
    1364                     if [ -n "$dev_exists" ] ; then
     1364                    if [ "x$dev_exists" != "x" ] ; then
    13651365                        actual_dev=$dev_swap
    13661366                        break;
     
    13701370
    13711371        # 4th try : pre-formated LABEL. Format is : LABEL=SWAP-mydevice. e.g. : LABEL=SWAP-hda5
    1372         if [ -n $actual_dev -a  "`echo "$current_partition" | /bin/grep -i "LABEL=SWAP"`" != ""] ; then
     1372        if [ "x$actual_dev" = "x" -a  "`echo "$current_partition" | /bin/grep -i "LABEL=SWAP"`" != ""] ; then
    13731373                try_dev="`echo "$redhat_label" | /bin/cut -d '-' -f2`"
    13741374                present_dev="`/bin/cat /proc/swaps | /bin/grep -w /dev/$try_dev`"
    1375                 if [ -n "$present_dev" ] ; then
     1375                if [ "x$present_dev" != "x" ] ; then
    13761376                    actual_dev="/dev/$try_dev"
    13771377                fi
     
    13791379
    13801380        # Check if one of all those tries has known success
    1381         if [ ! -n $actual_dev ] ; then
     1381        if [ "x$actual_dev" != "x" ] ; then
    13821382                current_partition=$actual_dev
    13831383        else
Note: See TracChangeset for help on using the changeset viewer.