diff options
| author | Joey Hess <joeyh@joeyh.name> | 2017-11-17 19:53:20 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2017-11-17 19:53:20 -0400 |
| commit | 21c3ff1daaed28647413cd1fb4ce4fc69f9f592a (patch) | |
| tree | 35aa28e4e19b497df78e72a382ca44a5065dfe19 /src/Propellor/Property/Service.hs | |
| parent | b98e3a8b8a4b5c7015fa3889ce124842eb2b7fd8 (diff) | |
don't start services in chroots
Service: Changed to use invoke-rc.d rather than service for starting
services. This notably means that in chroots, services will not be started.
This seems like the right thing to do, because running services inside
a chroot is problimatic. Use a real container system for running services.
Fixes the problem that, when building a disk image, using eg,
Apt.servicesInstalledRunning caused the service to be started in the
chroot, even though a policy-rc.d was in place to prevent it, because the
"service" command does not check policy-rc.d.
This commit was sponsored by John Peloquin on Patreon.
Diffstat (limited to 'src/Propellor/Property/Service.hs')
| -rw-r--r-- | src/Propellor/Property/Service.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Propellor/Property/Service.hs b/src/Propellor/Property/Service.hs index 46f9e8ef..e6a69eb5 100644 --- a/src/Propellor/Property/Service.hs +++ b/src/Propellor/Property/Service.hs @@ -23,5 +23,5 @@ reloaded = signaled "reload" "reloaded" signaled :: String -> Desc -> ServiceName -> Property DebianLike signaled cmd desc svc = tightenTargets $ p `describe` (desc ++ " " ++ svc) where - p = scriptProperty ["service " ++ shellEscape svc ++ " " ++ cmd ++ " >/dev/null 2>&1 || true"] + p = scriptProperty ["invoke-rc.d " ++ shellEscape svc ++ " " ++ cmd ++ " >/dev/null 2>&1 || true"] `assume` NoChange |
