summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/Mount.hs
blob: 804407e95b065f13012257eecc92ee5a8fca9f1a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
module Propellor.Property.Mount where

import Propellor
import Utility.SafeCommand

mountPoints :: IO [FilePath]
mountPoints = lines <$> readProcess "findmnt" ["-rn", "--output", "target"]

umountLazy :: FilePath -> IO ()
umountLazy mnt =  
	unlessM (boolSystem "umount" [ Param "-l", Param mnt ]) $
		errorMessage $ "failed unmounting " ++ mnt