PREUN
/bin/sh
if [ $1 -eq 0 ] ; then
# Package removal, not upgrade
/usr/bin/systemctl --no-reload disable smb.service > /dev/null 2>&1 || :
/usr/bin/systemctl --no-reload disable nmb.service > /dev/null 2>&1 || :
/usr/bin/systemctl stop smb.service > /dev/null 2>&1 || :
/usr/bin/systemctl stop nmb.service > /dev/null 2>&1 || :
fi
POSTIN
/bin/sh
if [ $1 -eq 1 ] ; then
# Initial installation
/usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi
POSTUN
/bin/sh
/usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ] ; then
# Package upgrade, not uninstall
/usr/bin/systemctl try-restart smb.service >/dev/null 2>&1 || :
/usr/bin/systemctl try-restart nmb.service >/dev/null 2>&1 || :
fi
Triggers
samba <
1:3.6.0-72
/bin/sh
# Save the current service runlevel info
# User must manually run
# systemd-sysv-convert --apply smb
# systemd-sysv-convert --apply nmb
# to migrate them to systemd targets
/usr/bin/systemd-sysv-convert --save smb >/dev/null 2>&1 ||:
/usr/bin/systemd-sysv-convert --save nmb >/dev/null 2>&1 ||:
# Run these because the SysV package being removed won't do them
/usr/sbin/chkconfig --del smb >/dev/null 2>&1 || :
/usr/sbin/chkconfig --del nmb >/dev/null 2>&1 || :
/usr/bin/systemctl try-restart smb.service >/dev/null 2>&1 || :
/usr/bin/systemctl try-restart nmb.service >/dev/null 2>&1 || :