simplify using makeChange
This commit is contained in:
parent
6a906c8a4c
commit
8c12047b6b
|
@ -93,9 +93,8 @@ built' installprop target system@(System _ arch) config =
|
||||||
, return FailedChange
|
, return FailedChange
|
||||||
)
|
)
|
||||||
|
|
||||||
teardownprop = property ("removed debootstrapped " ++ target) $ liftIO $ do
|
teardownprop = property ("removed debootstrapped " ++ target) $
|
||||||
removetarget
|
makeChange removetarget
|
||||||
return MadeChange
|
|
||||||
|
|
||||||
removetarget = do
|
removetarget = do
|
||||||
submnts <- filter (\p -> simplifyPath p /= simplifyPath target)
|
submnts <- filter (\p -> simplifyPath p /= simplifyPath target)
|
||||||
|
|
|
@ -151,9 +151,8 @@ nspawnService (Container name _ _) cfg = RevertableProperty setup teardown
|
||||||
<$> servicefilecontent
|
<$> servicefilecontent
|
||||||
<*> catchDefaultIO "" (readFile servicefile)
|
<*> catchDefaultIO "" (readFile servicefile)
|
||||||
|
|
||||||
writeservicefile = property servicefile $ liftIO $ do
|
writeservicefile = property servicefile $ makeChange $
|
||||||
viaTmp writeFile servicefile =<< servicefilecontent
|
viaTmp writeFile servicefile =<< servicefilecontent
|
||||||
return MadeChange
|
|
||||||
|
|
||||||
setupservicefile = check (not <$> goodservicefile) $
|
setupservicefile = check (not <$> goodservicefile) $
|
||||||
-- if it's running, it has the wrong configuration,
|
-- if it's running, it has the wrong configuration,
|
||||||
|
|
Loading…
Reference in New Issue