Oracle Commands

These are the scripts you need for configuring Oracle7 support.

Use the native_esnmp.sh script for Digital UNIX 3.2C or higher.

 #!/bin/sh
     #

     # variables for modifying /etc/services
     #
     ORG_SNMPD_PORT=161      # port that snmpd listens to. Don't modify.
     ORG_TRAPD_PORT=162      # port that snmpd send trap to. Don't modify.
     NEW_SNMPD_PORT=1611     # new port that snmpd listens to. Make sure
                             # this is the same as the one you use in
                             # CONFIG.encap
     NEW_TRAPD_PORT=1612     # peer enscapsulator port that
                             # snmpd sends trap to.

     ETC_SERVICES=/etc/services
     SAV_SERVICES=/etc/services.org.$$
     TMP_SERVICES=/tmp/services.$$
     CLRCMD="/bin/rm -f $TMP_SERVICES $SAV_SERVICES"
     TRPCMD="if [ -x $SAV_SERVICES ]
             then
                mv $SAV_SERVICES $ETC_SERVICES;
             fi
             $CLRCMD;
             exit 1"

        $CLRCMD
        trap "$TRPCMD" 1 2 3 9 15

        sed "s/$ORG_SNMPD_PORT\/udp/$NEW_SNMPD_PORT\/udp/g;
             s/$ORG_TRAPD_PORT\/u dp/$NEW_TRAPD_PORT\/udp/g" $ETC_SERVICES >
                                                     $TMP_SERVICES

        echo "Modifying $ETC_SERVICES for snmpd startup..."
        echo "cp $ETC_SERVICES $SAV_SERVICES"
        cp $ETC_SERVICES $SAV_SERVICES
        echo "cp $TMP_SERVICES $ETC_SERVICES"
        cp $TMP_SERVICES $ETC_SERVICES

        echo "Starting snmpd ..."
        echo "/sbin/init.d/snmpd start 2>&1"
        /sbin/init.d/snmpd start 2>&1

        echo "Restoring $ETC_SERVICES ..."
        echo "mv $SAV_SERVICES $ETC_SERVICES"
        mv $SAV_SERVICES $ETC_SERVICES
        echo "Done!"
        echo

        $CLRCMD

Use the native_snmpd.shscript for Digital UNIX 3.2 or lower.


     #!/bin/sh
     #

     # variables for modifying /etc/services
     #
     ORG_SNMPD_PORT=161      # port that snmpd listens to. Don't modify.
     ORG_TRAPD_PORT=162      # port that snmpd send trap to. Don't modify.
     NEW_SNMPD_PORT=1611     # new port that snmpd listens to. Make sure
                             # this is the same as the one you use in
                             # CONFIG.encap
     NEW_TRAPD_PORT=1612     # peer enscapsulator port that
                             # snmpd sends trap to.

     ETC_SERVICES=/etc/services
     SAV_SERVICES=/etc/services.org.$$
     TMP_SERVICES=/tmp/services.$$
     CLRCMD="/bin/rm -f $TMP_SERVICES $SAV_SERVICES"
     TRPCMD="if [ -x $SAV_SERVICES ]
             then
                mv $SAV_SERVICES $ETC_SERVICES;
             fi
             $CLRCMD;
             exit 1"

        $CLRCMD
        trap "$TRPCMD" 1 2 3 9 15

        sed "s/$ORG_TRAPD_PORT\/udp/$NEW_TRAPD_PORT\/udp/g" $ETC_SERVICES >
                                                            $TMP_SERVICES

        echo "Modifying $ETC_SERVICES for snmpd startup..."
        echo "cp $ETC_SERVICES $SAV_SERVICES"
        cp $ETC_SERVICES $SAV_SERVICES
        echo "cp $TMP_SERVICES $ETC_SERVICES"
        cp $TMP_SERVICES $ETC_SERVICES

        echo "Starting snmpd ..."
        echo "/usr/sbin/snmpd -p $NEW_SNMPD_PORT 2>&1"
        /usr/sbin/snmpd -p $NEW_SNMPD_PORT 2>&1

        echo "Restoring $ETC_SERVICES ..."
        echo "mv $SAV_SERVICES $ETC_SERVICES"
        mv $SAV_SERVICES $ETC_SERVICES
        echo "Done!"
        echo

        $CLRCMD



Back to the User's Guide home page