path: net-snmp_5.9.5.2+dfsg-2.1/debian/patches/net-snmp-create-v3-user_paths Description: Fix paths for net-snmp-create-v3-user Use the pidof program instead of ps and grep Fix the path for configuration file Author: Craig Small path: net-snmp_5.9.5.2+dfsg-2.1/debian/patches/net-snmp-create-v3-user_paths -if @PSCMD@ | @EGREP@ ' snmpd *$' > /dev/null 2>&1 ; then +if /bin/pidof -q snmpd > /dev/null 2>&1 ; then echo "Apparently at least one snmpd daemon is already running." echo "You must stop them in order to use this command." path: net-snmp_5.9.5.2+dfsg-2.1/local/snmp-ucd.sh # Try pidof. (Linux offering.) # pid=`pidof $1` [ -n "$pid" ] && { echo $pid path: net-snmp_5.9.5.2+dfsg-2.1/local/snmp-ucd.sh # since currently the daemon truncates and overwrites any pre-existing file. # # killproc() and pidofproc() lifted from Linux's /etc/init.d/functions. # # NOTE: Solaris users must uncomment the proper PSARGS definition below. XXX path: net-snmp_5.9.5.2+dfsg-2.1/local/snmp-ucd.sh pidofproc() { # pid= path: net-snmp_5.9.5.2+dfsg-2.1/local/snmp-ucd.sh } }' $1 } # end pidofproc() path: net-snmp_5.9.5.2+dfsg-2.1/local/snmp-ucd.sh [ $# = 0 ] && { echo "`basename $0`: Wrong argument to pidofproc()." 1>&2 return 1 } path: net-snmp_5.9.5.2+dfsg-2.1/local/snmp-ucd.sh # Kill process. # pid=`pidofproc $base 2>/dev/null` [ -z "$pid" ] && { pid=`ps $PSARGS | egrep $base | egrep -v egrep | egrep -v $0 | awk '{ print $2 }'`; path: net-snmp_5.9.5.2+dfsg-2.1/local/snmp-ucd.sh # # Try pidof. (Linux offering.) # pid=`pidof $1` path: net-snmp_5.9.5.2+dfsg-2.1/debian/changelog * Fix path for net-snmp-create-v3-user Closes: #997895 * Use pidof for net-snmp-create-v3-user so don't need procps * Make snmpd.conf group readable Closes: #998152 * Reapplied perl callback patch Closes: #1011440 path: net-snmp_5.9.5.2+dfsg-2.1/net-snmp-create-v3-user.in # to Net-SNMP config file. if /bin/pidof -q snmpd > /dev/null 2>&1 ; then echo "Apparently at least one snmpd daemon is already running." echo "You must stop them in order to use this command."