Sophie

Sophie

distrib > Mageia > 8 > x86_64 > by-pkgid > e7da298827bc2e537fb35b1518f6947e > scriptlet

cloud-init-20.2-2.1.mga8.noarch.rpm

PREUN

/bin/sh
if [ $1 -eq 0 ] ; then
    # Package removal, not upgrade
    /bin/systemctl --no-reload disable cloud-config.service >/dev/null 2>&1 || :
    /bin/systemctl --no-reload disable cloud-final.service  >/dev/null 2>&1 || :
    /bin/systemctl --no-reload disable cloud-init.service   >/dev/null 2>&1 || :
    /bin/systemctl --no-reload disable cloud-init-local.service >/dev/null 2>&1 || :
    # One-shot services -> no need to stop
fi

POSTIN

/bin/sh
/usr/bin/systemd-tmpfiles --create cloud-init.conf 

if [ $1 -eq 1 ] ; then
    # Initial installation
    # Enabled by default per "runs once then goes away" exception
    /bin/systemctl enable cloud-config.service     >/dev/null 2>&1 || :
    /bin/systemctl enable cloud-final.service      >/dev/null 2>&1 || :
    /bin/systemctl enable cloud-init.service       >/dev/null 2>&1 || :
    /bin/systemctl enable cloud-init-local.service >/dev/null 2>&1 || :
fi

POSTUN

/bin/sh
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
# One-shot services -> no need to restart