diff options
| author | Joey Hess <joey@kitenet.net> | 2014-07-07 03:16:18 -0400 |
|---|---|---|
| committer | Joey Hess <joey@kitenet.net> | 2014-07-07 03:16:18 -0400 |
| commit | 461b8cbd32352d9dc9614e16db7404df974faf91 (patch) | |
| tree | fdf43e1896af8f0482ec767e44e542ad48d79121 /src/Propellor/Property/Grub.hs | |
| parent | dba84b8219d29506886065cc6bcd821d977d2bf8 (diff) | |
propellor spin
Diffstat (limited to 'src/Propellor/Property/Grub.hs')
| -rw-r--r-- | src/Propellor/Property/Grub.hs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Propellor/Property/Grub.hs b/src/Propellor/Property/Grub.hs index b8e1b662..841861f4 100644 --- a/src/Propellor/Property/Grub.hs +++ b/src/Propellor/Property/Grub.hs @@ -7,6 +7,8 @@ import qualified Propellor.Property.Apt as Apt -- | Eg, hd0,0 or xen/xvda1 type GrubDevice = String +type TimeoutSecs = Int + -- | Use PV-grub chaining to boot -- -- Useful when the VPS's pv-grub is too old to boot a modern kernel image. @@ -15,12 +17,12 @@ type GrubDevice = String -- -- The rootdev should be in the form "hd0", while the bootdev is in the form -- "xen/xvda". -chainPVGrub :: GrubDevice -> GrubDevice -> Property -chainPVGrub rootdev bootdev = combineProperties desc +chainPVGrub :: GrubDevice -> GrubDevice -> TimeoutSecs -> Property +chainPVGrub rootdev bootdev timeout = combineProperties desc [ File.dirExists "/boot/grub" , "/boot/grub/menu.lst" `File.hasContent` [ "default 1" - , "timeout 30" + , "timeout " ++ show timeout , "" , "title grub-xen shim" , "root (" ++ rootdev ++ ")" |
