Rev 15 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 15 | Rev 33 | ||
|---|---|---|---|
| Line 24... | Line 24... | ||
| 24 | test -f /etc/default/oidentd && . /etc/default/oidentd |
24 | test -f /etc/default/oidentd && . /etc/default/oidentd |
| 25 | 25 | ||
| 26 | . /lib/lsb/init-functions |
26 | . /lib/lsb/init-functions |
| 27 | 27 | ||
| 28 | if [ "${OIDENT_BEHIND_PROXY}" = "yes" ]; then
|
28 | if [ "${OIDENT_BEHIND_PROXY}" = "yes" ]; then
|
| 29 | # If we have a default router, then allow it to proxy auth requests to us |
- | |
| 30 | if [ -x /bin/netstat ] && [ -x /usr/bin/awk ]; then |
- | |
| 31 | GATEWAY=`netstat -nr | awk '/^0.0.0.0/{print $2;}'`
|
- | |
| 32 | elif [ -x /bin/ip ] && [ -x /usr/bin/awk ]; then |
- | |
| 33 | GATEWAY=`ip route show 0.0.0.0/0 | awk '/^default via /{print $3}'`
|
- | |
| 34 | fi |
- | |
| 35 | if [ -n "${GATEWAY}" ]; then
|
- | |
| 36 | OIDENT_OPTIONS="${OIDENT_OPTIONS} -P ${GATEWAY}"
|
29 | OIDENT_OPTIONS="${OIDENT_OPTIONS} -P `ip route show to exact 0/0 | awk '{print $3}'`"
|
| 37 | fi |
- | |
| 38 | fi |
30 | fi |
| 39 | 31 | ||
| 40 | 32 | ||
| 41 | OPTIONS="${OIDENT_OPTIONS} -u ${OIDENT_USER} -g ${OIDENT_GROUP}"
|
33 | OPTIONS="${OIDENT_OPTIONS} -u ${OIDENT_USER} -g ${OIDENT_GROUP}"
|
| 42 | 34 | ||