From d1cbc66cb06482a5cb4168fc44b7e84fd4e8849e Mon Sep 17 00:00:00 2001 From: Daniel Brooks Date: Tue, 4 Apr 2017 13:56:03 -0700 Subject: property 'mount' a swap partition in Fstab.mounted --- src/Propellor/Property/Fstab.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/Propellor/Property/Fstab.hs') 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 -- cgit v1.2.3