Sophie

Sophie

distrib > Fedora > 14 > i386 > media > updates > by-pkgid > 9634da7e213b371c2e4830c0cb2175c9 > scriptlet

acpid-2.0.9-1.fc14.i686.rpm

PREIN

/bin/sh
if [ "$1" = "2" ]; then
	conflist=`ls /etc/acpi/events/*.conf 2> /dev/null`
	RETCODE=$?
	if [ $RETCODE -eq 0 ]; then
		for i in $conflist; do
			rmdot=`echo $i | sed 's/.conf/conf/'`
	 		mv $i $rmdot
		done
	fi
fi

PREUN

/bin/sh
if [ "$1" = "0" ]; then
	/sbin/service acpid stop >/dev/null 2>&1
	/sbin/chkconfig --del acpid

	/bin/systemctl disable acpid.service acpid.socket > /dev/null 2>&1 || :
        /bin/systemctl stop acpid.service acpid.socket > /dev/null 2>&1 || :
fi

POSTIN

/bin/sh
if [ $1 -eq 1 ]; then
	/sbin/chkconfig --add acpid
	/bin/systemctl enable acpid.service > /dev/null 2>&1 || :
fi

POSTUN

/bin/sh
if [ "$1" -ge "1" ]; then
	/sbin/service acpid condrestart >/dev/null 2>&1

	/bin/systemctl daemon-reload >/dev/null 2>&1 || :
        /bin/systemctl try-restart acpid.service > /dev/null 2>&1 || :
fi