All pastes #616577 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-07-12 18:37 UTC
rendered paste body
[jay@mars ~]$ rpm -qp --scripts clamav-0.90.3-1tr.i586.rpm 
preinstall scriptlet (through /bin/sh):
if [ -z "`getent group amavis`" ] ; then
    /usr/sbin/groupadd -g 257 amavis
fi
if [ -z "`getent passwd amavis`" ] ; then
    /usr/sbin/useradd -M -d /no/dir -g amavis -s /bin/false \
                      -u 257 amavis
fi
postinstall scriptlet (through /bin/sh):
/sbin/chkconfig --add clamd
/sbin/chkconfig --add freshclam
if [ "$1" = 2 ]; then
        perl -pi -lne 's/^\#DisableDefaultScanOptions$//' /etc/clamd.conf
        perl -pi -lne 's/^(#?[A-Z][^ ]+)$/\1 yes/' /etc/clamd.conf /etc/freshclam.conf
        /sbin/restart_maybe clamd > /dev/null 2>&1
        /sbin/restart_maybe freshclam > /dev/null 2>&1
fi
preuninstall scriptlet (through /bin/sh):
if [ $1 = 0 ]; then
        service clamd stop > /dev/null 2>&1
        service freshclam stop > /dev/null 2>&1
        /sbin/chkconfig --del clamd
        /sbin/chkconfig --del freshclam
fi