summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-vpn/openconnect')
-rw-r--r--net-vpn/openconnect/files/openconnect.initd.8.10105
-rw-r--r--net-vpn/openconnect/openconnect-8.10-r3.ebuild10
-rw-r--r--net-vpn/openconnect/openconnect-9999.ebuild10
3 files changed, 0 insertions, 125 deletions
diff --git a/net-vpn/openconnect/files/openconnect.initd.8.10 b/net-vpn/openconnect/files/openconnect.initd.8.10
deleted file mode 100644
index 020eeb91aa16..000000000000
--- a/net-vpn/openconnect/files/openconnect.initd.8.10
+++ /dev/null
@@ -1,105 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-VPN="${RC_SVCNAME#*.}"
-VPNCONF=/etc/openconnect/${VPN}.conf
-VPNDIR="/etc/openconnect/${VPN}"
-VPNLOG="/var/log/openconnect/${VPN}"
-VPNLOGFILE="${VPNLOG}/openconnect.log"
-VPNERRFILE="${VPNLOG}/openconnect.err"
-
-command="/usr/sbin/openconnect"
-name="OpenConnect: ${VPN}"
-pidfile="/run/openconnect/${VPN}.pid"
-stopsig="SIGINT"
-
-depend() {
- before netmount
-}
-
-checkconfig() {
- if [ $VPN = "openconnect" ]; then
- eerror "You cannot call openconnect directly. You must create a symbolic link to it with the vpn name:"
- eerror
- eerror "ln -s /etc/init.d/openconnect /etc/init.d/openconnect.vpn0"
- eerror
- eerror "And then call it instead:"
- eerror
- eerror "/etc/init.d/openconnect.vpn0 start"
- return 1
- fi
- if [ ! -f "${VPNCONF}" ]; then
- ewarn "The configuration file for ${VPN} does not exist."
- ewarn "Please create ${VPNCONF}"
- ewarn "This will become a fatal error in a future release."
- fi
- local server vpnopts password
- eval server=\$server_${VPN}
- eval vpnopts=\$vpnopts_${VPN}
- eval password=\$password_${VPN}
- if [ -n "$server" ] || [ -n "$vpnopts" ] || [ -n "password" ]; then
- ewarn "server_${VPN}, vpnopts${VPN} and password_${VPN} are deprecated"
- ewarn"Please move them to the appropriate settings in ${VPNCONF}"
- ewarn "They will be ignored in the future."
- fi
- return 0
-}
-
-checktuntap() {
- if [ "$RC_UNAME" = "Linux" -a ! -e /dev/net/tun ] ; then
- if ! modprobe tun ; then
- eerror "TUN/TAP support is not available in this kernel"
- return 1
- fi
- fi
-}
-
-run_hook() {
- if [ -x "$1" ]; then
- "$@"
- fi
-}
-
-start_pre() {
- checkconfig || return
- checktuntap || return
- checkpath -d "${VPNLOG}" || return
- checkpath -d /run/openconnect || return
- run_hook "${VPNDIR}/preup.sh"
-}
-
-start() {
- local server vpnopts password
- eval server=\$server_${VPN}
- eval vpnopts=\$vpnopts_${VPN}
- eval password=\$password_${VPN}
-
- ebegin "Starting ${name}"
- start-stop-daemon --start --exec "${command}" -- \
- --background \
- --config="${VPNCONF:-/dev/null}" \
- --interface="${VPN}" \
- --pid-file="${pidfile}" \
- ${vpnopts} \
- "${server}" \
- >> "${VPNLOGFILE}" \
- 2>> "${VPNERRFILE}" \
- <<EOF
-${password}
-EOF
- eend $?
-}
-
-start_post() {
- run_hook "${VPNDIR}/postup.sh"
-}
-
-stop_pre() {
- checkconfig || return
- run_hook "${VPNDIR}/predown.sh"
-}
-
-stop_post() {
- run_hook "${VPNDIR}/postdown.sh"
-}
diff --git a/net-vpn/openconnect/openconnect-8.10-r3.ebuild b/net-vpn/openconnect/openconnect-8.10-r3.ebuild
index 8b5c8962bee9..8e6903996014 100644
--- a/net-vpn/openconnect/openconnect-8.10-r3.ebuild
+++ b/net-vpn/openconnect/openconnect-8.10-r3.ebuild
@@ -139,13 +139,3 @@ src_install() {
keepdir /var/log/openconnect
}
-
-pkg_postinst() {
- local v
- for v in ${REPLACING_VERSIONS}; do
- ver_test $v -ge 8.10-r1 && continue
- ewarn "openconnect tunnel-specific configurations stored in ${EROOT}/etc/conf.d"
- ewarn "should be migrated to ${EROOT}/etc/openconnect/<tunnel>.conf"
- ewarn "For more information see ${EROOT}/usr/share/doc/${PF}/README.OpenRC"
- done
-}
diff --git a/net-vpn/openconnect/openconnect-9999.ebuild b/net-vpn/openconnect/openconnect-9999.ebuild
index 8b5c8962bee9..8e6903996014 100644
--- a/net-vpn/openconnect/openconnect-9999.ebuild
+++ b/net-vpn/openconnect/openconnect-9999.ebuild
@@ -139,13 +139,3 @@ src_install() {
keepdir /var/log/openconnect
}
-
-pkg_postinst() {
- local v
- for v in ${REPLACING_VERSIONS}; do
- ver_test $v -ge 8.10-r1 && continue
- ewarn "openconnect tunnel-specific configurations stored in ${EROOT}/etc/conf.d"
- ewarn "should be migrated to ${EROOT}/etc/openconnect/<tunnel>.conf"
- ewarn "For more information see ${EROOT}/usr/share/doc/${PF}/README.OpenRC"
- done
-}