Changeset 1942 for branches/2.2.6


Ignore:
Timestamp:
May 23, 2008, 4:40:56 PM (11 years ago)
Author:
bruno
Message:

Fix for LVM lv sizes detected incorrectly (patch from Thomas Kjeldsen t.k.kjeldsen_at_gmail.com)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.6/mindi/analyze-my-lvm

    r1487 r1942  
    1313GetValueFromField() {
    1414    local res
    15     sed s/'    '/~/ "$1" | tr -s ' ' ' ' | sed s/'~ '/'~'/ | grep -i "$2~" | cut -d'~' -f2,3,4,5 | tr '~' ' ' | gawk '{ if ($2=="MB") {printf "%dm",$1;} else if ($2=="KB") {printf "%dk",$1;} else if ($2=="GB") {printf "%dg",$1;} else {print $0;};}'
     15    sed s/'    '/~/ "$1" | tr -s ' ' ' ' | sed s/'~ '/'~'/ | grep -i "$2~" | cut -d'~' -f2,3,4,5 | tr '~' ' ' | gawk '{ if ($2=="MB") {printf "%dm",$1;} else if ($2=="KB") {printf "%dk",$1;} else if ($2=="GB") {printf "%fg",$1;} else {print $0;};}'
    1616}
    1717
Note: See TracChangeset for help on using the changeset viewer.