summaryrefslogtreecommitdiff
path: root/fsmgr.hs
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2023-06-25 21:53:39 -0400
committerAndrew Cady <d@jerkface.net>2023-07-01 19:49:13 -0400
commitde5ba932e8ed8b7c2842d360ce14da609836609e (patch)
tree46b525aaed41fb854bd54e310ae8e640658d9599 /fsmgr.hs
parent60f8cbcdd073854e6ea804b3129010dffbf0cdef (diff)
new btrfs subvolume gets ownership/permissions from its parent dir
Diffstat (limited to 'fsmgr.hs')
-rw-r--r--fsmgr.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/fsmgr.hs b/fsmgr.hs
index 8036734..f3d7af0 100644
--- a/fsmgr.hs
+++ b/fsmgr.hs
@@ -478,7 +478,10 @@ ioUnless :: MonadIO m => IO Bool -> m () -> m ()
478ioUnless test act = liftIO test >>= (`unless` act) 478ioUnless test act = liftIO test >>= (`unless` act)
479 479
480needSubvolume :: FilePath -> Action () 480needSubvolume :: FilePath -> Action ()
481needSubvolume path = ioUnless (IO.doesDirectoryExist path) $ cmd_ "btrfs subvolume create" [path] 481needSubvolume path = ioUnless (IO.doesDirectoryExist path) $ do
482 cmd_ "btrfs subvolume create" [path]
483 cmd_ "chmod" ["--reference="++path++"/.."] [path]
484 cmd_ "chown" ["--reference="++path++"/.."] [path]
482 485
483shakeRules :: Rules () 486shakeRules :: Rules ()
484shakeRules = do 487shakeRules = do