diff options
author | Andrew Cady <d@jerkface.net> | 2023-06-25 21:53:39 -0400 |
---|---|---|
committer | Andrew Cady <d@jerkface.net> | 2023-07-01 19:49:13 -0400 |
commit | de5ba932e8ed8b7c2842d360ce14da609836609e (patch) | |
tree | 46b525aaed41fb854bd54e310ae8e640658d9599 /fsmgr.hs | |
parent | 60f8cbcdd073854e6ea804b3129010dffbf0cdef (diff) |
new btrfs subvolume gets ownership/permissions from its parent dir
Diffstat (limited to 'fsmgr.hs')
-rw-r--r-- | fsmgr.hs | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -478,7 +478,10 @@ ioUnless :: MonadIO m => IO Bool -> m () -> m () | |||
478 | ioUnless test act = liftIO test >>= (`unless` act) | 478 | ioUnless test act = liftIO test >>= (`unless` act) |
479 | 479 | ||
480 | needSubvolume :: FilePath -> Action () | 480 | needSubvolume :: FilePath -> Action () |
481 | needSubvolume path = ioUnless (IO.doesDirectoryExist path) $ cmd_ "btrfs subvolume create" [path] | 481 | needSubvolume 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 | ||
483 | shakeRules :: Rules () | 486 | shakeRules :: Rules () |
484 | shakeRules = do | 487 | shakeRules = do |