Changeset 527 in MondoRescue
- Timestamp:
- May 5, 2006, 12:10:04 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mindi/mindi
r524 r527 1405 1405 1406 1406 # 2nd try, which works on a standard partition (ext2/3), but not on swap 1407 if [ -n $actual_dev] ; then1407 if [ "x$actual_dev" = "x" ] ; then 1408 1408 actual_dev=`/bin/mount -l | /bin/grep " [$redhat_label]" | /bin/cut -d' ' -f1` 1409 1409 fi 1410 1410 1411 1411 # 3rd try, with vol_id (which works with swap) 1412 if [ -n $actual_dev-a -x "/sbin/vol_id" ] ; then1412 if [ "x$actual_dev" = "x" -a -x "/sbin/vol_id" ] ; then 1413 1413 list_swaps=`cat /proc/swaps | /bin/grep "/dev/" | /bin/awk '{ print $1 }' ` 1414 1414 for dev_swap in $list_swaps ; do 1415 1415 dev_exists=`/sbin/vol_id $dev_swap | /bin/grep "$redhat_label"` 1416 if [ -n "$dev_exists" ] ; then1416 if [ "x$dev_exists" != "x" ] ; then 1417 1417 actual_dev=$dev_swap 1418 1418 break; … … 1422 1422 1423 1423 # 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"`" != ""] ; then1424 if [ "x$actual_dev" = "x" -a "`echo "$current_partition" | /bin/grep -i "LABEL=SWAP"`" != ""] ; then 1425 1425 try_dev="`echo "$redhat_label" | /bin/cut -d '-' -f2`" 1426 1426 present_dev="`/bin/cat /proc/swaps | /bin/grep -w /dev/$try_dev`" 1427 if [ -n "$present_dev" ] ; then1427 if [ "x$present_dev" != "x" ] ; then 1428 1428 actual_dev="/dev/$try_dev" 1429 1429 fi … … 1431 1431 1432 1432 # Check if one of all those tries has known success 1433 if [ ! -n $actual_dev] ; then1433 if [ "x$actual_dev" != "x" ] ; then 1434 1434 current_partition=$actual_dev 1435 1435 else
Note:
See TracChangeset
for help on using the changeset viewer.