summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2020-10-12 15:00:22 -0400
committerAndrew Cady <d@jerkface.net>2020-10-12 15:00:22 -0400
commita41ae37697de646d0aad98be67e463f1c5e394fd (patch)
tree7847cc700292998aecc9bbb2e664ee10f9444340
parentf6e7c471f5a6d9fb1c9defc514d3b668a9cb9f8f (diff)
avoid setting seed until we name the seed
-rw-r--r--fsmgr.hs7
1 files changed, 0 insertions, 7 deletions
diff --git a/fsmgr.hs b/fsmgr.hs
index 2aff987..00f840b 100644
--- a/fsmgr.hs
+++ b/fsmgr.hs
@@ -196,7 +196,6 @@ buildRoot config@DiskImageConfig{..} finalOut = do
196 -- cleanup 196 -- cleanup
197 cmd_ "umount" [mountpoint] 197 cmd_ "umount" [mountpoint]
198 cmd_ "rmdir" [mountpoint] 198 cmd_ "rmdir" [mountpoint]
199 cmd_ "btrfstune -S1" [out]
200 cmd_ "mv" [out, finalOut] 199 cmd_ "mv" [out, finalOut]
201 200
202setupLoopDevices :: FilePath -> Action () 201setupLoopDevices :: FilePath -> Action ()
@@ -233,8 +232,6 @@ buildInitialImage DiskImageConfig{..} mountpoint out = do
233 need [buildDirParent] 232 need [buildDirParent]
234 return buildDirParent 233 return buildDirParent
235 cmd_ "cp --reflink" [parent, out] 234 cmd_ "cp --reflink" [parent, out]
236 cmd_ "btrfstune -f -S0" [out]
237 cmd_ "btrfstune -fu" [out]
238 cmd_ "mkdir -p" [mountpoint] 235 cmd_ "mkdir -p" [mountpoint]
239 cmd_ "sh -c" ["if [ -e \"$0\" ]; then cp \"$0\" \"$1\"; fi", parent <.> "devices.txt", out -<.> "devices.txt"] 236 cmd_ "sh -c" ["if [ -e \"$0\" ]; then cp \"$0\" \"$1\"; fi", parent <.> "devices.txt", out -<.> "devices.txt"]
240 237
@@ -386,8 +383,6 @@ chrootImage target args =
386 let mnt = tmp <.> "mnt" 383 let mnt = tmp <.> "mnt"
387 orderOnly [inp] 384 orderOnly [inp]
388 cmd_ "cp --reflink=always" [inp, tmp] 385 cmd_ "cp --reflink=always" [inp, tmp]
389 cmd_ "btrfstune -S0 -f" [tmp]
390 cmd_ "btrfstune -fu" [tmp]
391 cmd_ "mkdir" [mnt] 386 cmd_ "mkdir" [mnt]
392 387
393 setupLoopDevices target 388 setupLoopDevices target
@@ -401,7 +396,6 @@ chrootImage target args =
401 else cmd_ (WithStderr False) "chroot" (mnt : args) 396 else cmd_ (WithStderr False) "chroot" (mnt : args)
402 cmd_ "umount" [mnt] 397 cmd_ "umount" [mnt]
403 cmd_ "sync" 398 cmd_ "sync"
404 cmd_ "btrfstune -S1" [tmp]
405 cmd_ "mv" [tmp, inp] 399 cmd_ "mv" [tmp, inp]
406 400
407shakeBuildOneImage :: FilePath -> IO () 401shakeBuildOneImage :: FilePath -> IO ()
@@ -469,7 +463,6 @@ shakeRules = do
469 inp = dropExtension out -<.> ".btrfs" 463 inp = dropExtension out -<.> ".btrfs"
470 need [inp] 464 need [inp]
471 cmd_ "cp --reflink=always" [inp, tmp] 465 cmd_ "cp --reflink=always" [inp, tmp]
472 cmd_ "btrfstune -f -S0" [tmp]
473 cmd_ "btrfs-shrink" [tmp] 466 cmd_ "btrfs-shrink" [tmp]
474 cmd_ "btrfstune -f -S1" [tmp] 467 cmd_ "btrfstune -f -S1" [tmp]
475 cmd_ (WithStderr False) "mv -i" [tmp, out] 468 cmd_ (WithStderr False) "mv -i" [tmp, out]