[augeas-devel] [PATCH 1/3] Grub: support the 'setkey' directive
Matthew Booth
mbooth at redhat.com
Tue Aug 27 14:24:48 UTC 2013
---
lenses/grub.aug | 7 +++++++
lenses/tests/test_grub.aug | 4 ++++
2 files changed, 11 insertions(+)
diff --git a/lenses/grub.aug b/lenses/grub.aug
index 2c19ffa..548a409 100644
--- a/lenses/grub.aug
+++ b/lenses/grub.aug
@@ -132,6 +132,12 @@ module Grub =
|[ spc . switch_arg /timeout|lines/ ])* .
[ spc . key /console|serial|hercules/ ]* . eol ]
+ (* View: setkey *)
+ let setkey = [ command "setkey" "" .
+ spc . [ label "to" . store Rx.no_spaces ] .
+ spc . [ label "from" . store Rx.no_spaces ] .
+ eol ]
+
(* View: menu_setting *)
let menu_setting = kw_menu_arg "default"
| kw_menu_arg "fallback"
@@ -145,6 +151,7 @@ module Grub =
| password_arg
| color
| device
+ | setkey
(* View: title *)
let title = del /title[ \t=]+/ "title " . value_to_eol . eol
diff --git a/lenses/tests/test_grub.aug b/lenses/tests/test_grub.aug
index 3eba710..a79ded9 100644
--- a/lenses/tests/test_grub.aug
+++ b/lenses/tests/test_grub.aug
@@ -12,6 +12,7 @@ module Test_grub =
device (hd0) HD(1,800,64000,9895c137-d4b2-4e3b-a93b-dc9ac4)
password --md5 $1$M9NLj$p2gs87vwNv48BUu.wAfVw0
default=0
+setkey less backquote
background 103332
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
@@ -54,6 +55,9 @@ title othermenu
{ "password" = "$1$M9NLj$p2gs87vwNv48BUu.wAfVw0"
{ "md5" } }
{ "default" = "0" }
+ { "setkey"
+ { "to" = "less" }
+ { "from" = "backquote" } }
{ "background" = "103332" }
{ "timeout" = "5" }
{ "splashimage" = "(hd0,0)/grub/splash.xpm.gz" }
--
1.8.3.1
More information about the augeas-devel
mailing list