From 3e48d9c4351e5020c9a6fee6fd869d67336200c3 Mon Sep 17 00:00:00 2001 From: Mariano Guezuraga Date: Wed, 1 Mar 2017 13:21:17 +0100 Subject: [PATCH] /run/systemd/system/ doesn't exist if you're installing the context RPM with virt-customize. --- postinstall.one | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/postinstall.one b/postinstall.one index a921cf5..70b69eb 100755 --- a/postinstall.one +++ b/postinstall.one @@ -31,11 +31,14 @@ if [ -f /etc/init.d/vmcontext ]; then else echo 'WARNING: Contextualization service not enabled' >&2 fi -elif [ -d /run/systemd/system/ ]; then - systemctl enable one-context-local.service - systemctl enable one-context.service -else - echo 'WARNING: Contextualization service not enabled' >&2 +elif [ -d /etc/systemd ]; then + if [ -f /usr/lib/systemd/system/one-context-local.service -a\ + -f /usr/lib/systemd/system/one-context.service ]; then + systemctl enable one-context-local.service + systemctl enable one-context.service + else + echo 'WARNING: Contextualization service not enabled' >&2 + fi fi # Debian based distros