patch-tests_t_client_sh 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. --- openvpn-2.3.10.orig/tests/t_client.sh 2016-01-04 13:18:21.000000000 +0100
  2. +++ openvpn-2.3.10/tests/t_client.sh 2016-02-07 15:19:08.000000000 +0100
  3. @@ -1,4 +1,4 @@
  4. -#!/bin/sh
  5. +#!/bin/bash
  6. #
  7. # run OpenVPN client against ``test reference'' server
  8. # - check that ping, http, ... via tunnel works
  9. @@ -86,12 +86,12 @@ fail()
  10. get_ifconfig_route()
  11. {
  12. # linux / iproute2? (-> if configure got a path)
  13. - if [ -n "/usr/sbin/ip" ]
  14. + if [ -n "/bin/ip" ]
  15. then
  16. echo "-- linux iproute2 --"
  17. - /usr/sbin/ip addr show | grep -v valid_lft
  18. - /usr/sbin/ip route show
  19. - /usr/sbin/ip -o -6 route show | grep -v ' cache' | sed -E -e 's/ expires [0-9]*sec//' -e 's/ (mtu|hoplimit|cwnd|ssthresh) [0-9]+//g' -e 's/ (rtt|rttvar) [0-9]+ms//g'
  20. + /bin/ip addr show | grep -v valid_lft
  21. + /bin/ip route show
  22. + /bin/ip -o -6 route show | grep -v ' cache' | sed -E -e 's/ expires [0-9]*sec//' -e 's/ (mtu|hoplimit|cwnd|ssthresh) [0-9]+//g' -e 's/ (rtt|rttvar) [0-9]+ms//g'
  23. return
  24. fi
  25. @@ -99,26 +99,26 @@ get_ifconfig_route()
  26. case `uname -s` in
  27. Linux)
  28. echo "-- linux / ifconfig --"
  29. - LANG=C /usr/sbin/ifconfig -a |egrep "( addr:|encap:)"
  30. + LANG=C /sbin/ifconfig -a |egrep "( addr:|encap:)"
  31. LANG=C netstat -rn -4 -6
  32. return
  33. ;;
  34. FreeBSD|NetBSD|Darwin)
  35. echo "-- FreeBSD/NetBSD/Darwin [MacOS X] --"
  36. - /usr/sbin/ifconfig -a | egrep "(flags=|inet)"
  37. + /sbin/ifconfig -a | egrep "(flags=|inet)"
  38. netstat -rn | awk '$3 !~ /^UHL/ { print $1,$2,$3,$NF }'
  39. return
  40. ;;
  41. OpenBSD)
  42. echo "-- OpenBSD --"
  43. - /usr/sbin/ifconfig -a | egrep "(flags=|inet)" | \
  44. + /sbin/ifconfig -a | egrep "(flags=|inet)" | \
  45. sed -e 's/pltime [0-9]*//' -e 's/vltime [0-9]*//'
  46. netstat -rn | awk '$3 !~ /^UHL/ { print $1,$2,$3,$NF }'
  47. return
  48. ;;
  49. SunOS)
  50. echo "-- Solaris --"
  51. - /usr/sbin/ifconfig -a | egrep "(flags=|inet)"
  52. + /sbin/ifconfig -a | egrep "(flags=|inet)"
  53. netstat -rn | awk '$3 !~ /^UHL/ { print $1,$2,$3,$6 }'
  54. return
  55. ;;