summaryrefslogtreecommitdiff
path: root/ipmasq/rules/A01interfaces_ipsec.def
blob: 484fb9e9c75d70d68930a3c3b32bb7327d36e8f3 (plain)
  1. # You should not edit this file. Instead, create a file with the same
  2. # name as this one, but with a .rul extension instead of .def. The
  3. # .rul file will override this one.
  4. #
  5. # However, any changes you make to this file will be preserved.
  6. # find IPsec interface names, and separate them from INTERNAL
  7. IPSEC=$(enumerate-if | sort -u | grep ipsec)
  8. if [ -n "$IPSEC" ]; then
  9. for i in $IPSEC; do
  10. INTERNAL=$(echo $INTERNAL | sed -e "s/\( *\|^\)$i\( *\|$\)/\1/")
  11. done
  12. fi
  13. # remove interfaces that don't have networks attached to them
  14. if [ -n "$IPSEC" ]; then
  15. for i in $IPSEC; do
  16. nm=$(nmofif $i)
  17. if [ -z "${nm}" ]; then
  18. IPSEC=$(echo $IPSEC | sed -e "s/\( *\|^\)$i\( *\|$\)/\1/")
  19. fi
  20. done
  21. fi