Changes between Version 5 and Version 6 of Ticket #696, comment 1


Ignore:
Timestamp:
Jun 7, 2013, 3:29:41 PM (11 years ago)
Author:
victor gattegno

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #696, comment 1

    v5 v6  
    22
    33But it will not work if we get a wwid or an alias in /dev/mapper (example for multipath), because there is no '-' in /dev/mapper/thealiasdefined (see my comment3).
    4 
    5 '''Concerning awk''', shouldn't it be the following ?
    6 
    7 (print instead of printf, and I added a third VG for the third %s)
    8 {{{
    9 mr_asprintf(&command, "mount 2>/dev/null|grep -E \"/dev/mapper/%s-|/dev/%s/\"|awk '{print(\"%%s \",$3)}END{print \"\"}'", VG, VG, VG);
    10 }}}
    11 
    12 Example :
    13 
    14 {{{
    15 # mount 2>/dev/null|grep -E "/dev/mapper/VGDD0-|/dev/VGDD0/"
    16 /dev/mapper/VGDD0-LVDD0 on /mnt/data0 type ext3 (rw)
    17 
    18 # mount 2>/dev/null|grep -E "/dev/mapper/VGDD0-|/dev/VGDD0/" |awk '{print("%VGDD0 ",$3)}END{print ""}'
    19 %VGDD0  /mnt/data0
    20 }}}