- Timestamp:
- Jun 17, 2006, 11:57:05 AM (19 years ago)
- Location:
- branches
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.0.8/mindi/mindi
r632 r674 1291 1291 partition_size partition_format outstring partition_number \ 1292 1292 partition_mountpt c_p lwm_info psz lvm_dev unofficial_outstring \ 1293 absolute_partition old_partition_fmt 1293 absolute_partition old_partition_fmt current_lvolume 1294 1294 1295 1295 echo "Your raw fstab file looks like this:-" >> $LOGFILE … … 1389 1389 1390 1390 partition_format=`$AWK '$1 == "'"$str_to_find_fmt_with"'" {print $3}' $MY_FSTAB` 1391 if [ -d "/proc/lvm" ] && [ "`lvdisplay $current_partition 2> /dev/null`" ]; then 1391 # Some distributions such as Debian do not put /dev/<VG>/<LV> in fstab 1392 # for LVM partitions but use /dev/mapper/<VG>-<LV> instead. Fortunately, 1393 # the former is then a link to the latter, so we test whether 1394 # $current_partition is actually such a link or not and set 1395 # $current_lvolume accordingly. Note that $current_lvolume may well be an 1396 # ordinary device. It is just to make sure that we feed the right value 1397 # into any of the LVM tools if possible. 1398 if [ -d "/dev/mapper" ] && [ -z "`lvm lvdisplay $current_partition 2> /dev/null`" ]; then 1399 partition_stub="`echo "$current_partition" | sed "s|^/dev/mapper/|/dev/|" | cut -d"-" -f1`" 1400 current_lvolume="`find /dev -lname "$current_partition" | grep "^$partition_stub"`" 1401 fi 1402 if [ -z "$current_lvolume" ]; then 1403 current_lvolume="$current_partition" 1404 fi 1405 # End of LVM device style variation code (other than $current_lvolume). 1406 if [ -d "/proc/lvm" ] && [ "`lvdisplay $current_lvolume 2> /dev/null`" ]; then 1392 1407 partition_size="lvm" 1393 elif [ -d "/dev/mapper" ] && [ "`lvm lvdisplay $current_ partition2> /dev/null`" ]; then1408 elif [ -d "/dev/mapper" ] && [ "`lvm lvdisplay $current_lvolume 2> /dev/null`" ]; then 1394 1409 partition_size="lvm" 1395 1410 else … … 1417 1432 [ "$partition_format" = "swap" ] && partition_mountpt="swap" 1418 1433 if [ "$partition_mountpt" = "" ] ; then 1419 if [ "`pvdisplay $current_ partition 2> /dev/null`" != "" ] || [ "`lvm pvdisplay $current_partition2> /dev/null`" != "" ] ; then1434 if [ "`pvdisplay $current_lvolume 2> /dev/null`" != "" ] || [ "`lvm pvdisplay $current_lvolume 2> /dev/null`" != "" ] ; then 1420 1435 if [ "`fgrep device /etc/raidtab 2> /dev/null | grep -w $current_partition`" ] ; then 1421 1436 partition_mountpt="raid" 1422 1437 partition_format="raid" 1423 1438 else 1424 # lvm_dev="`pvdisplay $current_ partition| grep -i "VG N" | head -n1 | tr -s ' ' ' ' | cut -d' ' -f3`"1439 # lvm_dev="`pvdisplay $current_lvolume | grep -i "VG N" | head -n1 | tr -s ' ' ' ' | cut -d' ' -f3`" 1425 1440 partition_mountpt="lvm" 1426 1441 partition_format="lvm" -
branches/stable/mindi/mindi
r631 r674 1291 1291 partition_size partition_format outstring partition_number \ 1292 1292 partition_mountpt c_p lwm_info psz lvm_dev unofficial_outstring \ 1293 absolute_partition old_partition_fmt 1293 absolute_partition old_partition_fmt current_lvolume 1294 1294 1295 1295 echo "Your raw fstab file looks like this:-" >> $LOGFILE … … 1389 1389 1390 1390 partition_format=`$AWK '$1 == "'"$str_to_find_fmt_with"'" {print $3}' $MY_FSTAB` 1391 if [ -d "/proc/lvm" ] && [ "`lvdisplay $current_partition 2> /dev/null`" ]; then 1391 # Some distributions such as Debian do not put /dev/<VG>/<LV> in fstab 1392 # for LVM partitions but use /dev/mapper/<VG>-<LV> instead. Fortunately, 1393 # the former is then a link to the latter, so we test whether 1394 # $current_partition is actually such a link or not and set 1395 # $current_lvolume accordingly. Note that $current_lvolume may well be an 1396 # ordinary device. It is just to make sure that we feed the right value 1397 # into any of the LVM tools if possible. 1398 if [ -d "/dev/mapper" ] && [ -z "`lvm lvdisplay $current_partition 2> /dev/null`" ]; then 1399 partition_stub="`echo "$current_partition" | sed "s|^/dev/mapper/|/dev/|" | cut -d"-" -f1`" 1400 current_lvolume="`find /dev -lname "$current_partition" | grep "^$partition_stub"`" 1401 fi 1402 if [ -z "$current_lvolume" ]; then 1403 current_lvolume="$current_partition" 1404 fi 1405 # End of LVM device style variation code (other than $current_lvolume). 1406 if [ -d "/proc/lvm" ] && [ "`lvdisplay $current_lvolume 2> /dev/null`" ]; then 1392 1407 partition_size="lvm" 1393 elif [ -d "/dev/mapper" ] && [ "`lvm lvdisplay $current_ partition2> /dev/null`" ]; then1408 elif [ -d "/dev/mapper" ] && [ "`lvm lvdisplay $current_lvolume 2> /dev/null`" ]; then 1394 1409 partition_size="lvm" 1395 1410 else … … 1417 1432 [ "$partition_format" = "swap" ] && partition_mountpt="swap" 1418 1433 if [ "$partition_mountpt" = "" ] ; then 1419 if [ "`pvdisplay $current_ partition 2> /dev/null`" != "" ] || [ "`lvm pvdisplay $current_partition2> /dev/null`" != "" ] ; then1434 if [ "`pvdisplay $current_lvolume 2> /dev/null`" != "" ] || [ "`lvm pvdisplay $current_lvolume 2> /dev/null`" != "" ] ; then 1420 1435 if [ "`fgrep device /etc/raidtab 2> /dev/null | grep -w $current_partition`" ] ; then 1421 1436 partition_mountpt="raid" 1422 1437 partition_format="raid" 1423 1438 else 1424 # lvm_dev="`pvdisplay $current_ partition| grep -i "VG N" | head -n1 | tr -s ' ' ' ' | cut -d' ' -f3`"1439 # lvm_dev="`pvdisplay $current_lvolume | grep -i "VG N" | head -n1 | tr -s ' ' ' ' | cut -d' ' -f3`" 1425 1440 partition_mountpt="lvm" 1426 1441 partition_format="lvm"
Note:
See TracChangeset
for help on using the changeset viewer.