#!/bin/bash

TargetIP="[2001:db8::9166]"
PORT="34957"
OID=".1.3.6.1.4.1.1379.2.3.3.3.1.1.9.0"

case "$1" in
    1)
        echo -n "Set HLR state link down ... "
        snmpset -v3 -l noAuthNoPriv -u manager ${TargetIP}:${PORT} ${OID} i 1 >/dev/null
        echo "done"
        ;;
    2)
        echo -n "Set HLR state link up ... "
        snmpset -v3 -l noAuthNoPriv -u manager ${TargetIP}:${PORT} ${OID} i 2 >/dev/null
        echo "done"        
        ;;
    3)
        echo -n "Set HLR state authentication failure ... "
        snmpset -v3 -l noAuthNoPriv -u manager ${TargetIP}:${PORT} ${OID} i 3 >/dev/null
        echo "done"               
        ;;
    *)
        echo "Unknown state ($1)"
        ;;
esac