All pastes #465892 Raw Edit

Anonymous

public shellscript v1 · immutable
#465892 ·published 2007-04-30 17:56 UTC
rendered paste body
#! /bin/shPATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbinPROGNAME=`basename $0`PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'`REVISION=`echo '$Revision: 1.1 $' | sed -e 's/[^0-9.]//g'`# . $PROGPATH/utils.shprint_usage() {        echo "Usage: $PROGNAME"}print_help() {        print_revision $PROGNAME $REVISION        echo ""        print_usage        echo ""        echo "This plugin checks radius sanity."        echo ""        support        exit 0}case "$1" in        --help)                print_help                exit 0                ;;        -h)                print_help                exit 0                ;;        --version)        print_revision $PROGNAME $REVISION                exit 0                ;;        -V)                print_revision $PROGNAME $REVISION                print_revision $PROGNAME $REVISION                exit 0                ;;        -l)                if `echo "User-Name = username, CHAP-Password = password, Calling-Station-Id = 00:01:02:03:04:01" | radclient -t2 192.168.2.199 auth NagSeecVit|grep VNC-PPPoE-CBQ-RX > /dev/null` ; then                        echo "Radius awake"                        exit 0                else                        echo "Radius Failed, call denis, pull hair"                        exit 2                fi                ;;esac