mirror of
https://git.freebsd.org/ports.git
synced 2025-05-07 11:20:46 -04:00
Align with security/openvpn for RC script improvements, dropping the TUNNELBLICK patch (integrated upstream) and pkg-help file (no longer required). Note that pkcs11* and mbedTLS currently do not mix (I randomly checked different option sets), an issue this port shares with security/openvpn. "checking mbedtls pkcs11 support... configure: error: mbedtls has no pkcs11 wrapper compiled in" PR: 215734 Submitted by: Eric F. Crist (maintainer)
27 lines
782 B
Bash
27 lines
782 B
Bash
#!/bin/sh
|
|
# OpenVPN simple up/down script for openresolvconf integration.
|
|
# (C) Copyright 2016 Baptiste Daroussin
|
|
# BSD 2-clause license.
|
|
|
|
set -e +u
|
|
: ${script_type:=down}
|
|
case "${script_type}" in
|
|
up)
|
|
i=1
|
|
while :; do
|
|
eval option=\"\$foreign_option_${i}\" || break
|
|
[ "${option}" ] || break
|
|
set -- ${option}
|
|
i=$((i + 1))
|
|
[ "$1" = "dhcp-option" ] || continue
|
|
case "$2" in
|
|
DNS) echo "nameserver ${3}" ;;
|
|
DOMAIN) echo "domain ${3}" ;;
|
|
DOMAIN-SEARCH) echo "search ${3}" ;;
|
|
esac
|
|
done | /sbin/resolvconf -a "${dev}"
|
|
;;
|
|
down)
|
|
/sbin/resolvconf -d "${dev}" -f
|
|
;;
|
|
esac
|