#!/bin/bash
if [ -z "`uname -s | grep -i linux`" ]
then
exit 0
fi
TS="`date +%Y%m%d-%H%M%S`"
###################### func_change_snmp_rcom ########################
func_change_snmp_rcom()
{
echo ""
echo "Modify system default snmp read community ... "
CONF=/etc/snmp/snmpd.conf
/bin/cp -f ${CONF} ${CONF}.${TS}
sed -i "s|^com2sec notConfigUser.*$|com2sec notConfigUser default BJcudns123! |" ${CONF}
echo "Modify system default snmp read community ... done."
echo ""
}
###################### func_close_all_xinet_svc ########################
func_close_all_xinet_svc()
{
echo ""
echo "Close all xinet services ... "
cd /etc/xinetd.d
for CONF in `ls`