Sophie

Sophie

distrib > Fedora > 17 > i386 > media > updates > by-pkgid > 18aba7792c01948375f88a3a4b4a7191 > scriptlet

net-snmp-5.7.1-5.fc17.1.i686.rpm

PREUN

/bin/sh
if [ $1 = 0 ]; then
    /bin/systemctl --no-reload disable snmpd.service > /dev/null 2>&1 || :
    /bin/systemctl --no-reload disable snmptrapd.service > /dev/null 2>&1 || :
    /bin/systemctl stop snmpd.service > /dev/null 2>&1 || :
    /bin/systemctl stop snmptrapd.service > /dev/null 2>&1 || :
fi

POSTIN

/bin/sh
if [ $1 -eq 1 ] ; then 
    # Initial installation 
    /bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi

POSTUN

/bin/sh
if [ "$1" -ge "1" ]; then
    /bin/systemctl try-restart snmpd.service >/dev/null 2>&1 || :
    /bin/systemctl try-restart snmptrapd.service >/dev/null 2>&1 || :
fi

Triggers

net-snmp < 1:5.7-5

/bin/sh
# Convert SysV -> systemd.
# Save the current service runlevel info,
# User must manually run systemd-sysv-convert --apply snmpd
# to migrate them to systemd targets
echo "hello world" >> /tmp/snmp
echo date >>/tmp/snmp
/usr/bin/systemd-sysv-convert --save snmpd >/dev/null 2>&1 ||:
/usr/bin/systemd-sysv-convert --save snmptrapd >/dev/null 2>&1 ||:
/sbin/chkconfig --del snmpd >/dev/null 2>&1 || :
/sbin/chkconfig --del snmptrapd >/dev/null 2>&1 || :
/bin/systemctl try-restart snmpd.service >/dev/null 2>&1 || :
/bin/systemctl try-restart snmptrapd.service >/dev/null 2>&1 || :