Gitweb:        
http://git.fedorahosted.org/git/augeas.git?p=augeas.git;a=commitdiff;h=d4dd8228c7b8cafae6bd3f95314a51b787b602f2
Commit:        d4dd8228c7b8cafae6bd3f95314a51b787b602f2
Parent:        bbbe8a0832614121e67a5d99a7b953ee9be5f0ad
Author:        David Lutterkort <[email protected]>
AuthorDate:    Thu Apr 9 16:01:45 2009 -0700
Committer:     David Lutterkort <[email protected]>
CommitterDate: Mon Apr 13 19:25:58 2009 -0700

Grub: parse arguments to chainloader command

---
 lenses/grub.aug            |    6 +++++-
 lenses/tests/test_grub.aug |    3 +++
 2 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/lenses/grub.aug b/lenses/grub.aug
index 8d3e5aa..9eaa8e0 100644
--- a/lenses/grub.aug
+++ b/lenses/grub.aug
@@ -84,11 +84,15 @@ module Grub =
              |[switch "no-mem-option"]))* .
           spc . kernel_args ]
 
+    let chainloader =
+      [ command "chainloader" "\t" .
+          [ spc . switch "force" ]? . spc . store Rx.no_spaces . eol ]
+
     let boot_setting = kw_boot_arg "root"
                      | kernel
                      | kw_boot_arg "initrd"
                      | kw_boot_arg "rootnoverify"
-                     | kw_boot_arg "chainloader"
+                     | chainloader
                      | kw_boot_arg "uuid"
                      | kw_pres "quiet"  (* Seems to be a Ubuntu extension *)
                      | kw_pres "savedefault"
diff --git a/lenses/tests/test_grub.aug b/lenses/tests/test_grub.aug
index 936b0e8..45b5d6f 100644
--- a/lenses/tests/test_grub.aug
+++ b/lenses/tests/test_grub.aug
@@ -131,6 +131,9 @@ initrd\t\t/boot/initrd.img-2.6.18-6-vserver-686
         { "serial" }
         { "console" } }
 
+  test Grub.boot_setting get
+      "chainloader --force +1 \n" = { "chainloader" = "+1" { "force" } }
+
 (* Local Variables: *)
 (* mode: caml       *)
 (* End:             *)

_______________________________________________
augeas-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/augeas-devel

Reply via email to