From 21c3ff1daaed28647413cd1fb4ce4fc69f9f592a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 17 Nov 2017 19:53:20 -0400 Subject: 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. --- src/Propellor/Property/Service.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Propellor/Property/Service.hs') 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 -- cgit v1.2.3