diff options
| author | Joey Hess <joeyh@joeyh.name> | 2017-03-11 14:00:34 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2017-03-11 14:01:32 -0400 |
| commit | 6ce4b7c072d31bf745bc1c59d21544b6d52dbc4c (patch) | |
| tree | e502e4e8c02a0e0b77f3b71c1178c949ba43918d /src/Propellor/Property/DiskImage.hs | |
| parent | a4853981f9d6429af502c05496bd4ff41432e5ac (diff) | |
reorg docs
Diffstat (limited to 'src/Propellor/Property/DiskImage.hs')
| -rw-r--r-- | src/Propellor/Property/DiskImage.hs | 40 |
1 files changed, 22 insertions, 18 deletions
diff --git a/src/Propellor/Property/DiskImage.hs b/src/Propellor/Property/DiskImage.hs index 3afffa1c..64ab8bd5 100644 --- a/src/Propellor/Property/DiskImage.hs +++ b/src/Propellor/Property/DiskImage.hs @@ -50,20 +50,22 @@ type DiskImage = FilePath -- -- Then, the disk image is set up, and the chroot is copied into the -- appropriate partition(s) of it. +-- +-- Note that the disk image file is reused if it already exists, +-- to avoid expensive IO to generate a new one. And, it's updated in-place, +-- so its contents are undefined during the build process. +-- +-- Note that the `Chroot.noServices` property is automatically added to the +-- chroot while the disk image is being built, which should prevent any +-- daemons that are included from being started on the system that is +-- building the disk image. -- -- Example use: -- -- > import Propellor.Property.DiskImage --- --- > let chroot d = Chroot.debootstrapped mempty d $ props --- > & osDebian Unstable X86_64 --- > & Apt.installed ["linux-image-amd64"] --- > & User.hasPassword (User "root") --- > & User.accountFor (User "demo") --- > & User.hasPassword (User "demo") --- > & User.hasDesktopGroups (User "demo") --- > & ... --- > in imageBuilt "/srv/images/foo.img" chroot +-- > +-- > ... +-- > & imageBuilt "/srv/images/foo.img" mychroot -- > MSDOS (grubBooted PC) -- > [ partition EXT2 `mountedAt` "/boot" -- > `setFlag` BootFlag @@ -72,15 +74,17 @@ type DiskImage = FilePath -- > `mountOpt` errorReadonly -- > , swapPartition (MegaBytes 256) -- > ] +-- > where +-- > mychroot d = Chroot.debootstrapped mempty d $ props +-- > & osDebian Unstable X86_64 +-- > & Apt.installed ["linux-image-amd64"] +-- > & User.hasPassword (User "root") +-- > & User.accountFor (User "demo") +-- > & User.hasPassword (User "demo") +-- > & User.hasDesktopGroups (User "demo") +-- > & ... -- --- Note that the disk image file is reused if it already exists, --- to avoid expensive IO to generate a new one. And, it's updated in-place, --- so its contents are undefined during the build process. --- --- Note that the `Chroot.noServices` property is automatically added to the --- chroot while the disk image is being built, which should prevent any --- daemons that are included from being started on the system that is --- building the disk image. +-- imageBuilt :: DiskImage -> (FilePath -> Chroot) -> TableType -> Finalization -> [PartSpec] -> RevertableProperty (HasInfo + DebianLike) Linux imageBuilt = imageBuilt' False |
