847f781568
This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/sblim-cmpi-devel.git#822551380540de206e77418237c5bf1fbc0f5e3c
68 lines
1.6 KiB
Plaintext
68 lines
1.6 KiB
Plaintext
%sblim_pre() \
|
|
function unregister() \
|
|
{ \
|
|
# don't let registration failure when server not running fail upgrade! \
|
|
%{_datadir}/%{name}/provider-register.sh -d $1 -m %{SCHEMA} -r %{REGISTRATION} > /dev/null 2>&1 || :; \
|
|
} \
|
|
\
|
|
# if upgrading, deregister old version \
|
|
if [ $1 -gt 1 ]; then \
|
|
unregistered=no \
|
|
if [ -e /usr/sbin/cimserver ]; then \
|
|
unregister "-t pegasus"; \
|
|
unregistered=yes \
|
|
fi \
|
|
if [ -e /usr/sbin/sfcbd ]; then \
|
|
unregister "-t sfcb"; \
|
|
unregistered=yes \
|
|
fi \
|
|
if [ "$unregistered" != yes ]; then \
|
|
unregister \
|
|
fi \
|
|
fi
|
|
|
|
%sblim_post() \
|
|
function register() \
|
|
{ \
|
|
# don't let registration failure when server not running fail install! \
|
|
%{_datadir}/%{name}/provider-register.sh $1 -m %{SCHEMA} -r %{REGISTRATION} > /dev/null 2>&1 || :; \
|
|
} \
|
|
\
|
|
/sbin/ldconfig \
|
|
if [ $1 -ge 1 ]; then \
|
|
registered=no \
|
|
if [ -e /usr/sbin/cimserver ]; then \
|
|
register "-t pegasus"; \
|
|
registered=yes \
|
|
fi \
|
|
if [ -e /usr/sbin/sfcbd ]; then \
|
|
register "-t sfcb"; \
|
|
registered=yes \
|
|
fi \
|
|
if [ "$registered" != yes ]; then \
|
|
register \
|
|
fi \
|
|
fi
|
|
|
|
%sblim_preun() \
|
|
function unregister() \
|
|
{ \
|
|
# don't let registration failure when server not running fail upgrade! \
|
|
%{_datadir}/%{name}/provider-register.sh -d $1 -m %{SCHEMA} -r %{REGISTRATION} > /dev/null 2>&1 || :; \
|
|
} \
|
|
\
|
|
if [ $1 -eq 0 ]; then \
|
|
unregistered=no \
|
|
if [ -e /usr/sbin/cimserver ]; then \
|
|
unregister "-t pegasus"; \
|
|
unregistered=yes \
|
|
fi \
|
|
if [ -e /usr/sbin/sfcbd ]; then \
|
|
unregister "-t sfcb"; \
|
|
unregistered=yes \
|
|
fi \
|
|
if [ "$unregistered" != yes ]; then \
|
|
unregister \
|
|
fi \
|
|
fi
|