Sophie

Sophie

distrib > Fedora > 14 > i386 > media > updates > by-pkgid > ba7b3c36d08cf145aada344ba7c60685 > scriptlet

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

PREUN

/bin/sh
# Only on uninstall
if [ $1 = 0 ] ; then
    initctl stop -q olpc-switchd
    initctl stop -q powerd
    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
    initctl -q start powerd
    initctl -q start olpc-switchd
fi
exit 0

POSTUN

/bin/sh
# Restart after upgrade
if [ "$1" -ge "1" ] ; then
    initctl stop -q olpc-switchd
    initctl stop -q powerd
    initctl start -q powerd
    initctl start -q olpc-switchd
fi
exit 0