propellor spin
This commit is contained in:
parent
3f98cdbced
commit
1d5d911aa0
|
@ -78,7 +78,8 @@ built target system@(System _ arch) config =
|
||||||
, Param target
|
, Param target
|
||||||
]
|
]
|
||||||
cmd <- fromMaybe "debootstrap" <$> programPath
|
cmd <- fromMaybe "debootstrap" <$> programPath
|
||||||
ifM (boolSystem cmd params)
|
de <- debootstrapEnv
|
||||||
|
ifM (boolSystemEnv cmd params (Just de))
|
||||||
( do
|
( do
|
||||||
fixForeignDev target
|
fixForeignDev target
|
||||||
return MadeChange
|
return MadeChange
|
||||||
|
@ -107,6 +108,15 @@ built target system@(System _ arch) config =
|
||||||
, return False
|
, return False
|
||||||
)
|
)
|
||||||
|
|
||||||
|
-- workaround for http://bugs.debian.org/770658
|
||||||
|
debootstrapEnv :: IO [(String, String)]
|
||||||
|
debootstrapEnv = do
|
||||||
|
path <- getEnvDefault "/bin" "PATH"
|
||||||
|
addEntry "PATH" (path ++ debianPath)
|
||||||
|
<$> getEnvironment
|
||||||
|
where
|
||||||
|
debianPath = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
||||||
|
|
||||||
mountPoints :: IO [FilePath]
|
mountPoints :: IO [FilePath]
|
||||||
mountPoints = lines <$> readProcess "findmnt" ["-rn", "--output", "target"]
|
mountPoints = lines <$> readProcess "findmnt" ["-rn", "--output", "target"]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue