diff options
author | Gordon GECOS <u@adam> | 2023-11-22 17:43:44 -0500 |
---|---|---|
committer | Gordon GECOS <u@adam> | 2023-11-22 17:43:44 -0500 |
commit | d0a2c6c11fed198e54c98a9ed386f459b38bdb44 (patch) | |
tree | c020e121a7f4a112550fd60fa28b5b6185942c72 | |
parent | 486fb62abd0ac5a87a85ca18beb939d21323fad1 (diff) |
non-effectful cleanups
-rw-r--r-- | fsmgr.hs | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -25,7 +25,7 @@ import qualified Options.Applicative as Opt | |||
25 | 25 | ||
26 | import ConfigFile | 26 | import ConfigFile |
27 | import String | 27 | import String |
28 | import System.Directory as IO | 28 | import qualified System.Directory as IO |
29 | import System.Directory (createDirectoryIfMissing, | 29 | import System.Directory (createDirectoryIfMissing, |
30 | getCurrentDirectory) | 30 | getCurrentDirectory) |
31 | import System.Posix.Process (getProcessID) | 31 | import System.Posix.Process (getProcessID) |
@@ -122,8 +122,8 @@ aptListFiles AptListCfg{..} = | |||
122 | (if (releaseCodename == "bookworm") then id | 122 | (if (releaseCodename == "bookworm") then id |
123 | else replace "bookworm" releaseCodename) <$> | 123 | else replace "bookworm" releaseCodename) <$> |
124 | observedCorrectListForBookworm | 124 | observedCorrectListForBookworm |
125 | where | ||
126 | 125 | ||
126 | observedCorrectListForBookworm :: [String] | ||
127 | observedCorrectListForBookworm = | 127 | observedCorrectListForBookworm = |
128 | [ "httpredir.debian.org_debian_dists_bookworm-backports_contrib_binary-amd64_Packages" | 128 | [ "httpredir.debian.org_debian_dists_bookworm-backports_contrib_binary-amd64_Packages" |
129 | , "httpredir.debian.org_debian_dists_bookworm-backports_contrib_binary-i386_Packages" | 129 | , "httpredir.debian.org_debian_dists_bookworm-backports_contrib_binary-i386_Packages" |
@@ -500,7 +500,7 @@ earlyFail :: IO () | |||
500 | earlyFail = do | 500 | earlyFail = do |
501 | CUid euid <- liftIO getEffectiveUserID | 501 | CUid euid <- liftIO getEffectiveUserID |
502 | when (euid /= 0) $ fail "you are not root" | 502 | when (euid /= 0) $ fail "you are not root" |
503 | Stdout () <- cmd (Traced []) "which selfstrap" | 503 | Stdout () <- cmd (Traced []) "command -v selfstrap" |
504 | return () | 504 | return () |
505 | 505 | ||
506 | ioUnless :: MonadIO m => IO Bool -> m () -> m () | 506 | ioUnless :: MonadIO m => IO Bool -> m () -> m () |