summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/Fstab.hs
diff options
context:
space:
mode:
authorDaniel Brooks2017-04-04 13:56:03 -0700
committerDaniel Brooks2017-04-04 13:56:03 -0700
commitd1cbc66cb06482a5cb4168fc44b7e84fd4e8849e (patch)
treeee0c00d0e6ad32d00b88418b6e7b64d0672c1682 /src/Propellor/Property/Fstab.hs
parentcd4a20edba2537deb99fbb43cabd6571751cd97a (diff)
property 'mount' a swap partition in Fstab.mounted
Diffstat (limited to 'src/Propellor/Property/Fstab.hs')
-rw-r--r--src/Propellor/Property/Fstab.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Propellor/Property/Fstab.hs b/src/Propellor/Property/Fstab.hs
index 60f11d8e..602276ea 100644
--- a/src/Propellor/Property/Fstab.hs
+++ b/src/Propellor/Property/Fstab.hs
@@ -35,7 +35,9 @@ mounted fs src mnt opts = tightenTargets $
-- This use of mountPoints, which is linux-only, is why this
-- property currently only supports linux.
mountnow = check (notElem mnt <$> mountPoints) $
- cmdProperty "mount" [mnt]
+ if fs == "swap"
+ then cmdProperty "swapon" [mnt]
+ else cmdProperty "mount" [mnt]
newtype SwapPartition = SwapPartition FilePath