aboutsummaryrefslogtreecommitdiffstats
path: root/main/augeas/iface-multiopt.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/augeas/iface-multiopt.patch')
-rw-r--r--main/augeas/iface-multiopt.patch54
1 files changed, 54 insertions, 0 deletions
diff --git a/main/augeas/iface-multiopt.patch b/main/augeas/iface-multiopt.patch
new file mode 100644
index 0000000000..68260a336e
--- /dev/null
+++ b/main/augeas/iface-multiopt.patch
@@ -0,0 +1,54 @@
+--- augeas-1.1.0/lenses/interfaces.aug
++++ augeas-1.1.0.iface/lenses/interfaces.aug
+@@ -36,21 +36,26 @@
+ let stanza_id (t:string) = key t . sep_spc . sto_to_spc
+ let stanza_param (l:string) = [ sep_spc . label l . sto_to_spc ]
+
+-(* Define reseverved words *)
+-let stanza_word = /(iface|auto|allow-[a-z-]+|mapping)/
++(* Define reseverved words and multi-value options*)
++let stanza_word = /(iface|auto|allow-[a-z-]+|mapping|bond-slaves|bridge-ports)/
+
++(* Define stanza option indentation *)
++let stanza_indent = del /[ \t]*/ " "
++
+ (* Define additional lines for multi-line stanzas *)
+-let stanza_option = [ del /[ \t]*/ " "
++let stanza_option = [ stanza_indent
+ . key ( /[a-z_-]+/ - stanza_word )
+ . sep_spc
+ . sto_to_eol ]
+
++(* Define space-separated array *)
++let array (r:regexp) (t:string) = del r t . label t . counter t
++ . [ sep_spc . seq t . sto_to_spc ]+
++
+ (************************************************************************
+ * AUTO
+ *************************************************************************)
+
+-let array (r:regexp) (t:string) = del r t . label t . counter t
+- . [ sep_spc . seq t . sto_to_spc ]+
+ let auto = [ array /(allow-)?auto/ "auto" . eol ]
+
+ (************************************************************************
+@@ -74,12 +79,18 @@
+ * IFACE
+ *************************************************************************)
+
++let multi_option (t:string) = [ stanza_indent . array t t . eol ]
++
+ let iface = [ Util.indent
+ . stanza_id "iface"
+ . stanza_param "family"
+ . stanza_param "method"
+ . eol
+- . (stanza_option|comment|empty)* ]
++ . ( stanza_option
++ | multi_option "bond-slaves"
++ | multi_option "bridge-ports"
++ | comment
++ | empty )* ]
+
+ (************************************************************************
+ * STANZAS