PREUN
/bin/sh
# Only on uninstall
if [ $1 = 0 ] ; then
systemctl disable powerd.service
systemctl stop powerd.service
systemctl disable olpc-switchd.service
systemctl stop powerd.service
if test -e /etc/init.d/ohmd
then
/sbin/service ohmd start >/dev/null 2>&1
/sbin/chkconfig ohmd on
fi
fi
exit 0
POSTIN
/bin/sh
# Only on install
if [ $1 = 1 ] ; then
if test -e /etc/init.d/ohmd ; then
service ohmd stop >/dev/null 2>&1
chkconfig ohmd off
fi
systemctl enable powerd.service
systemctl enable olpc-switchd.service
fi
exit 0
POSTUN
/bin/sh
# Restart after upgrade
if [ "$1" -ge "1" ] ; then
systemctl restart olpc-switchd.service
systemctl restart powerd.service
fi
exit 0