Subversion Repositories oidentd

Compare Revisions

Ignore whitespace Rev 32 → Rev 33

/trunk/debian/init
26,15 → 26,7
. /lib/lsb/init-functions
 
if [ "${OIDENT_BEHIND_PROXY}" = "yes" ]; then
# If we have a default router, then allow it to proxy auth requests to us
if [ -x /bin/netstat ] && [ -x /usr/bin/awk ]; then
GATEWAY=`netstat -nr | awk '/^0.0.0.0/{print $2;}'`
elif [ -x /bin/ip ] && [ -x /usr/bin/awk ]; then
GATEWAY=`ip route show 0.0.0.0/0 | awk '/^default via /{print $3}'`
fi
if [ -n "${GATEWAY}" ]; then
OIDENT_OPTIONS="${OIDENT_OPTIONS} -P ${GATEWAY}"
fi
OIDENT_OPTIONS="${OIDENT_OPTIONS} -P `ip route show to exact 0/0 | awk '{print $3}'`"
fi