On Sun, Sep 14, 2014, at 04:44 PM, Tom Eastep wrote:
> Do you have your own 'is_usable' extension script?

Yes.  Useing it for now on the road to eventual use of lsm ... using my own to 
'simply' matters.  Maybe not, though.

>From my other email,

run_isusable_exit() {
    local status
    status=0

    function local_report_status() {
            local __intfc=$1
            local __status=$2
            if [ $__status -eq 0 ]; then
                    echo '  OK ping @ INTFC='${__intfc}
            else
                    echo '  BAD ping @ INTFC='${__intfc}
            fi
    }

    case $1 in
            eth0)
                    THIS_PING_TGT=$PROV1_GATEWAY
                    ping -w1 -I ${1} ${THIS_PING_TGT}  > /dev/null 2>&1
                    status=$?
                    local_report_status ${1} $status
                    return $status
            ;;
            eth1)
                    THIS_PING_TGT=$LAN_MX1
                    ping -w1 -I ${1} ${THIS_PING_TGT} > /dev/null 2>&1
                    status=$?
                    local_report_status ${1} $status
                    return $status
            ;;
            tun1)
                    THIS_PING_TGT=$PROV2_GATEWAY
                    ping -w1 -I ${1} ${THIS_PING_TGT} > /dev/null 2>&1
                    status=$?
                    local_report_status ${1} $status
                    return $status
            ;;
            *)
                    return 0
            ;;
    esac
}

where

  PROV1_GATEWAY is the external interface's ISP gateway

and

  PROV2_GATEWAY is the tun interface's VPN gateway, i.e., the 'other end' of 
the VPN pipe

------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
Shorewall-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shorewall-devel

Reply via email to