Commit 0e5ab56e authored by thomas.forbriger's avatar thomas.forbriger

BFO2LSDF [MERGE]: merge previous edit

Merge branch 'master' of ssh://gitserver//home/tforb/git.git/csback

Conflicts:
	BFO2LSDF.sh
parents 35fd0b3a 710b6650
......@@ -32,7 +32,8 @@
# 02/09/2016 V1.7 make program fit for bromo:
# - support dry-run
# - use openvpn instead of vpnc
# 12/09/2016 V1.8 do not close VPN connection
# 03/09/2016 V1.8 report only IPv4 address
# 12/09/2016 V1.9 do not close VPN connection
#
# ============================================================================
#
......@@ -61,7 +62,6 @@ EXCLUDE_PATTERNS=(\
IP=/bin/ip
LOGGER=/bin/logger
NETSTAT=/bin/netstat
JNC=/usr/local/bin/jnc
GREP=/usr/bin/grep
RSYNC=/usr/bin/rsync
......@@ -94,8 +94,8 @@ do
${IP} addr show ${TUN_INTERFACE} > /dev/null 2>&1
if [ $? -eq 0 ]
then
tunIPs=$(${IP} addr show ${TUN_INTERFACE} | ${GREP} -e "inet" | \
awk '{print $2}')
tunIPs=$(${IP} addr show ${TUN_INTERFACE} | ${GREP} -e "inet " | \
head -n 1 | awk '{print $2}')
${LOGGER} -i -p user.info "${LOGINFO} VPN connection already had been \
established using IP ${tunIPs}."
else
......@@ -111,8 +111,8 @@ do
${IP} addr show ${TUN_INTERFACE} > /dev/null 2>&1
if [ $? -eq 0 ]
then
tunIPs=$(${IP} addr show ${TUN_INTERFACE} | ${GREP} -e "inet" | \
awk '{print $2}')
tunIPs=$(${IP} addr show ${TUN_INTERFACE} | ${GREP} -e "inet " | \
head -n 1 | awk '{print $2}')
${LOGGER} -i -p user.info "${LOGINFO} VPN connection is \
established using IP ${tunIPs}."
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment