[Fai-commit] r3511 - people/michael/features/setup_harddisks_2/implementation

fai-commit at lists.alioth.debian.org fai-commit at lists.alioth.debian.org
Mon Jun 12 16:48:54 UTC 2006


Author: michael-guest
Date: 2006-06-12 16:48:53 +0000 (Mon, 12 Jun 2006)
New Revision: 3511

Added:
   people/michael/features/setup_harddisks_2/implementation/NOTES
Modified:
   people/michael/features/setup_harddisks_2/implementation/shdd2-parser
Log:
imported Sam's suggested parser


Added: people/michael/features/setup_harddisks_2/implementation/NOTES
===================================================================
--- people/michael/features/setup_harddisks_2/implementation/NOTES	2006-06-12 16:36:54 UTC (rev 3510)
+++ people/michael/features/setup_harddisks_2/implementation/NOTES	2006-06-12 16:48:53 UTC (rev 3511)
@@ -0,0 +1 @@
+libparse-recdescent-perl must get installed in nfsroot

Modified: people/michael/features/setup_harddisks_2/implementation/shdd2-parser
===================================================================
--- people/michael/features/setup_harddisks_2/implementation/shdd2-parser	2006-06-12 16:36:54 UTC (rev 3510)
+++ people/michael/features/setup_harddisks_2/implementation/shdd2-parser	2006-06-12 16:48:53 UTC (rev 3511)
@@ -1 +1,53 @@
 #!/usr/bin/perl
+
+use Parse::RecDescent;
+
+my $Parser = Parse::RecDescent->new(q{
+    file: line(s?) /\Z/
+    line: /$/
+        | comment /$/
+        | config /$/
+    comment: /\s*#.*$/
+    config:
+          'disk_config' disk_config_arg
+        | volume
+    disk_config_arg:
+          'raid'
+        | 'lvm'
+        | /disk\d+/ option(s?)
+        | /\S/ option(s?)
+    option:
+          /preserve:\d+(,\d+)*/
+        | /disklabel:(msdos|sun)/
+        | /bootable:\d/
+        | 'virtual'
+    volume:
+          type mountpoint size filesystem mount_options fs_options
+        | 'vg' name size
+    type: 'primary'
+        | 'logical'
+        | /raid[0156]/
+        | m{[^/\s]+-[^/\s]+}
+    mountpoint:
+          '-'
+        | 'swap'
+        | m{/\S*}
+    name: /\S+/
+    size: /\d+%?(-\d+%?)?(:resize)?/
+        | /-\d+%?(:resize)?/
+        | /preserve\d+/
+        | /[^,:\s]+(:(spare|missing))*(,[^,:\s]+(:(spare|missing))*)*/
+    mount_options:
+          /\S+/
+    filesystem:
+          '-'
+        | 'swap'
+        | \S+
+          { if ( !in_path("mkfs.$item[0]") ) {
+                die "unknown/invalid filesystem type '$item[0]'"
+            }
+          }
+    fs_options:
+          /.*$/
+});
+


Property changes on: people/michael/features/setup_harddisks_2/implementation/shdd2-parser
___________________________________________________________________
Name: svn:executable
   + *




More information about the Fai-commit mailing list