[augeas-devel] augeas: master - Grub: parse arguments for terminal command

David Lutterkort lutter at fedoraproject.org
Fri Apr 17 22:07:22 UTC 2009


Gitweb:        http://git.fedorahosted.org/git/augeas.git?p=augeas.git;a=commitdiff;h=bbbe8a0832614121e67a5d99a7b953ee9be5f0ad
Commit:        bbbe8a0832614121e67a5d99a7b953ee9be5f0ad
Parent:        4aa11b03b26808e5d35c06c5a98f11da59f04963
Author:        David Lutterkort <lutter at redhat.com>
AuthorDate:    Thu Apr 9 15:48:28 2009 -0700
Committer:     David Lutterkort <lutter at redhat.com>
CommitterDate: Mon Apr 13 19:25:58 2009 -0700

Grub: parse arguments for terminal command

---
 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:             *)




More information about the augeas-devel mailing list