Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > d3dc158b72e816ec69c45b5298e4403d > scriptlet

olpc-powerd-38-1.fc15.i686.rpm

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