Sophie

Sophie

distrib > Mandriva > 2011.0 > x86_64 > media > main-release > by-pkgid > edba96a379cdc5f715feaa819eed9671 > scriptlet

rsyslog-5.8.2-1.x86_64.rpm

PREUN

/bin/sh
/usr/share/rpm-helper/del-service rsyslog $1 rsyslog 
# The following should really be part of _preun_service
[ $1 = 0 -a -x /bin/systemctl ] && /bin/systemctl disable rsyslog.service || :

POSTIN

/bin/sh
# The following should really be part of _post_service
[ $1 = 1 -a -x /bin/systemctl ] && /bin/systemctl enable rsyslog.service || :
/usr/share/rpm-helper/add-service rsyslog $1 rsyslog 

for n in /var/log/{messages,secure,maillog,spooler}; do
    [ -f $n ] && continue
    umask 066 && touch $n
done

POSTUN

/bin/sh
if [ "$1" -ge "1" ]; then
    /etc/rc.d/init.d/rsyslog condrestart > /dev/null 2>/dev/null || :
fi

Triggers

rsyslog < 5.6.2-3

/bin/sh
# enable systemd unit on update
[ -x /bin/systemctl ] && /bin/systemctl enable rsyslog.service || :

rsyslog < 2.0.1-2mdv2008.1

/bin/sh
if [ ! -f /etc/syslog.conf ]; then
    # restore syslog.conf
    mv -f /etc/rsyslog.conf /etc/syslog.conf
    mv -f /etc/rsyslog.conf.rpmnew /etc/rsyslog.conf
fi

rsyslog < 3.0.0

/bin/sh
/bin/kill `cat /var/run/rklogd.pid 2> /dev/null` > /dev/null 2>&1 ||:

sysklogd < 1.5-5

/bin/sh
. /etc/sysconfig/syslog
if echo $SYSLOGD_OPTIONS | grep -q -- "-r"
then
	sed -i	-e 's/^\#\$ModLoad imudp.so$/$ModLoad imudp.so/' \
		-e 's/^\#\$UDPServerRun 514$/$UDPServerRun 514/' /etc/rsyslog.d/00_common.conf
fi
if [ -f /var/run/syslogd.pid ]
then
	/etc/rc.d/init.d/syslog stop
	/etc/rc.d/init.d/rsyslog start
fi