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 | |
| parent | dba84b8219d29506886065cc6bcd821d977d2bf8 (diff) | |
propellor spin
Diffstat (limited to 'src/Propellor/Property')
| -rw-r--r-- | src/Propellor/Property/Grub.hs | 8 | ||||
| -rw-r--r-- | src/Propellor/Property/HostingProvider/Linode.hs | 2 |
2 files changed, 6 insertions, 4 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 ++ ")" diff --git a/src/Propellor/Property/HostingProvider/Linode.hs b/src/Propellor/Property/HostingProvider/Linode.hs index cfabe814..34d72184 100644 --- a/src/Propellor/Property/HostingProvider/Linode.hs +++ b/src/Propellor/Property/HostingProvider/Linode.hs @@ -6,5 +6,5 @@ import qualified Propellor.Property.Grub as Grub -- | Linode's pv-grub-x86_64 does not currently support booting recent -- Debian kernels compressed with xz. This sets up pv-grub chaing to enable -- it. -chainPVGrub :: Property +chainPVGrub :: Grub.TimeoutSecs -> Property chainPVGrub = Grub.chainPVGrub "hd0" "xen/xvda" |
