Hi all,<br><br>As some of you may know, the Augeas projet [0] aims to provide a generic parsing API for all kinds of configuration files. Augeas uses grammar files called "lenses" to parse configuration files.<br>
<br>This mail is to inform you that a new lens for FAI disk_config files was added to Augeas. It can currently be found in the git repository of the Augeas project [1]. This lens will turn disk_config files into a tree that can be parsed with xpath using Augeas.<br>
<br>For example, the following disk_config file:<br><br>#<br># NEW FAI PARTITION SYSTEM<br>#<br># Include LVM/RAID, Generic disk naming<br>#<br># <a href="http://faiwiki.debian.net/index.php/Setup-storage">http://faiwiki.debian.net/index.php/Setup-storage</a><br>
#<br><br>disk_config disk1 bootable:1<br>primary /boot 50 ext3 rw<br>primary swap 512 swap sw<br>primary / 260 ext3 defaults,errors=remount-ro<br>logical /usr 2G ext3 rw<br>
logical /usr/local 1G ext3 rw<br>logical /var 2G ext3 rw<br>logical /var/log 10G ext3 rw<br>logical /var/www 20G ext3 rw<br>logical /tmp 500 ext3 rw<br>logical /home 10G- ext3 rw<br>
<br><br>is parsed as:<br><br>/files/EXAMPLE<br>/files/EXAMPLE/#comment[1] = "NEW FAI PARTITION SYSTEM"<br>/files/EXAMPLE/#comment[2] = "Include LVM/RAID, Generic disk naming"<br>/files/EXAMPLE/#comment[3] = "<a href="http://faiwiki.debian.net/index.php/Setup-storage">http://faiwiki.debian.net/index.php/Setup-storage</a>"<br>
/files/EXAMPLE/disk_config = "disk1"<br>/files/EXAMPLE/disk_config/bootable = "1"<br>/files/EXAMPLE/disk_config/primary[1]<br>/files/EXAMPLE/disk_config/primary[1]/mountpoint = "/boot"<br>/files/EXAMPLE/disk_config/primary[1]/size = "50"<br>
/files/EXAMPLE/disk_config/primary[1]/filesystem = "ext3"<br>/files/EXAMPLE/disk_config/primary[1]/mount_options<br>/files/EXAMPLE/disk_config/primary[1]/mount_options/1 = "rw"<br>/files/EXAMPLE/disk_config/primary[2]<br>
/files/EXAMPLE/disk_config/primary[2]/mountpoint = "swap"<br>/files/EXAMPLE/disk_config/primary[2]/size = "512"<br>/files/EXAMPLE/disk_config/primary[2]/filesystem = "swap"<br>/files/EXAMPLE/disk_config/primary[2]/mount_options<br>
/files/EXAMPLE/disk_config/primary[2]/mount_options/1 = "sw"<br>/files/EXAMPLE/disk_config/primary[3]<br>/files/EXAMPLE/disk_config/primary[3]/mountpoint = "/"<br>/files/EXAMPLE/disk_config/primary[3]/size = "260"<br>
/files/EXAMPLE/disk_config/primary[3]/filesystem = "ext3"<br>/files/EXAMPLE/disk_config/primary[3]/mount_options<br>/files/EXAMPLE/disk_config/primary[3]/mount_options/1 = "defaults"<br>/files/EXAMPLE/disk_config/primary[3]/mount_options/2 = "errors"<br>
/files/EXAMPLE/disk_config/primary[3]/mount_options/2/value = "remount-ro"<br>/files/EXAMPLE/disk_config/logical[1]<br>/files/EXAMPLE/disk_config/logical[1]/mountpoint = "/usr"<br>/files/EXAMPLE/disk_config/logical[1]/size = "2G"<br>
/files/EXAMPLE/disk_config/logical[1]/filesystem = "ext3"<br>/files/EXAMPLE/disk_config/logical[1]/mount_options<br>/files/EXAMPLE/disk_config/logical[1]/mount_options/1 = "rw"<br>/files/EXAMPLE/disk_config/logical[2]<br>
/files/EXAMPLE/disk_config/logical[2]/mountpoint = "/usr/local"<br>/files/EXAMPLE/disk_config/logical[2]/size = "1G"<br>/files/EXAMPLE/disk_config/logical[2]/filesystem = "ext3"<br>/files/EXAMPLE/disk_config/logical[2]/mount_options<br>
/files/EXAMPLE/disk_config/logical[2]/mount_options/1 = "rw"<br>/files/EXAMPLE/disk_config/logical[3]<br>/files/EXAMPLE/disk_config/logical[3]/mountpoint = "/var"<br>/files/EXAMPLE/disk_config/logical[3]/size = "2G"<br>
/files/EXAMPLE/disk_config/logical[3]/filesystem = "ext3"<br>/files/EXAMPLE/disk_config/logical[3]/mount_options<br>/files/EXAMPLE/disk_config/logical[3]/mount_options/1 = "rw"<br>/files/EXAMPLE/disk_config/logical[4]<br>
/files/EXAMPLE/disk_config/logical[4]/mountpoint = "/var/log"<br>/files/EXAMPLE/disk_config/logical[4]/size = "10G"<br>/files/EXAMPLE/disk_config/logical[4]/filesystem = "ext3"<br>/files/EXAMPLE/disk_config/logical[4]/mount_options<br>
/files/EXAMPLE/disk_config/logical[4]/mount_options/1 = "rw"<br>/files/EXAMPLE/disk_config/logical[5]<br>/files/EXAMPLE/disk_config/logical[5]/mountpoint = "/var/www"<br>/files/EXAMPLE/disk_config/logical[5]/size = "20G"<br>
/files/EXAMPLE/disk_config/logical[5]/filesystem = "ext3"<br>/files/EXAMPLE/disk_config/logical[5]/mount_options<br>/files/EXAMPLE/disk_config/logical[5]/mount_options/1 = "rw"<br>/files/EXAMPLE/disk_config/logical[6]<br>
/files/EXAMPLE/disk_config/logical[6]/mountpoint = "/tmp"<br>/files/EXAMPLE/disk_config/logical[6]/size = "500"<br>/files/EXAMPLE/disk_config/logical[6]/filesystem = "ext3"<br>/files/EXAMPLE/disk_config/logical[6]/mount_options<br>
/files/EXAMPLE/disk_config/logical[6]/mount_options/1 = "rw"<br>/files/EXAMPLE/disk_config/logical[7]<br>/files/EXAMPLE/disk_config/logical[7]/mountpoint = "/home"<br>/files/EXAMPLE/disk_config/logical[7]/size = "10G-"<br>
/files/EXAMPLE/disk_config/logical[7]/filesystem = "ext3"<br>/files/EXAMPLE/disk_config/logical[7]/mount_options<br>/files/EXAMPLE/disk_config/logical[7]/mount_options/1 = "rw"<br><br><br>Bug reports, suggestions, patches are all welcome.<br>
<br><br>Cheers,<br><br><br>Raphaël Pinson<br><br><br>[0] <a href="http://www.augeas.net">http://www.augeas.net</a><br>[1] <a href="http://git.fedorahosted.org/git/?p=augeas.git;a=blob;f=lenses/fai_diskconfig.aug;h=447548d0670576b26e8008fc472047d47c923a18;hb=dc7d47a6a4be4473c3a732b1402e8d149936a6c6">http://git.fedorahosted.org/git/?p=augeas.git;a=blob;f=lenses/fai_diskconfig.aug;h=447548d0670576b26e8008fc472047d47c923a18;hb=dc7d47a6a4be4473c3a732b1402e8d149936a6c6</a><br>