[augeas-devel] [PATCH 4/6] Grub: parse arguments for terminal command
David Lutterkort
lutter at redhat.com
Thu Apr 9 23:17:07 UTC 2009
---
lenses/grub.aug | 8 +++++++-
lenses/tests/test_grub.aug | 7 +++++++
2 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/lenses/grub.aug b/lenses/grub.aug
index 9faabf4..8d3e5aa 100644
--- a/lenses/grub.aug
+++ b/lenses/grub.aug
@@ -50,13 +50,19 @@ module Grub =
[ spc . switch_arg /unit|port|speed|word|parity|stop|device/ ]* .
eol ]
+ let terminal =
+ [ command "terminal" "" .
+ ([ spc . switch /dumb|no-echo|no-edit|silent/ ]
+ |[ spc . switch_arg /timeout|lines/ ])* .
+ [ spc . key /console|serial|hercules/ ]* . eol ]
+
let menu_setting = kw_menu_arg "default"
| kw_menu_arg "fallback"
| kw_pres "hiddenmenu"
| kw_menu_arg "timeout"
| kw_menu_arg "splashimage"
| serial
- | kw_menu_arg "terminal"
+ | terminal
| password_arg
| color
diff --git a/lenses/tests/test_grub.aug b/lenses/tests/test_grub.aug
index 7f26035..936b0e8 100644
--- a/lenses/tests/test_grub.aug
+++ b/lenses/tests/test_grub.aug
@@ -124,6 +124,13 @@ initrd\t\t/boot/initrd.img-2.6.18-6-vserver-686
{ "parity" = "no" }
{ "stop" = "1" } }
+ test Grub.lns get
+ "terminal --timeout=10 serial console\n" =
+ { "terminal"
+ { "timeout" = "10" }
+ { "serial" }
+ { "console" } }
+
(* Local Variables: *)
(* mode: caml *)
(* End: *)
--
1.6.0.6
More information about the augeas-devel
mailing list