PREIN
/bin/sh
/usr/share/rpm-helper/add-group bumblebee $1 bumblebee
if [ "$1" -eq "1" ]; then
/usr/sbin/update-alternatives --set gl_conf /etc/ld.so.conf.d/GL/standard.conf
fi
PREUN
/bin/sh
/usr/share/rpm-helper/del-service bumblebee $1 bumblebeed
POSTIN
/bin/sh
/usr/share/rpm-helper/add-service bumblebee $1 bumblebeed
# simplew: still needs this since in release 3 services were not set
# enabled and seams that still isnt properly handeled in %_post_service
if [ "$1" -ge "1" ]; then
# Enable (but don't start) the unit by default
/bin/systemctl enable bumblebeed.service
# Start bumblebeed service
/bin/systemctl start bumblebeed.service
fi
POSTUN
/bin/sh
# We need this since "%_postun_groupdel %{name}" doesnt remove the group if
# set to a user
if [ "$1" -eq "0" ];then
/usr/sbin/groupdel bumblebee
fi
#--------------------------------------------------------------------