Gentoo Archives: gentoo-commits

From: Mike Gilbert <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-vpn/openconnect/files/, net-vpn/openconnect/
Date: Sat, 02 Oct 2021 06:35:31
Message-Id: 1633156463.f8970e67e5f1dc182b59b60690320aab5bff8bfd.floppym@gentoo
1 commit: f8970e67e5f1dc182b59b60690320aab5bff8bfd
2 Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
3 AuthorDate: Sat Oct 2 06:34:23 2021 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Sat Oct 2 06:34:23 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f8970e67
7
8 net-vpn/openconnect: drop pkg_postinst
9
10 Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
11
12 net-vpn/openconnect/files/openconnect.initd.8.10 | 105 -----------------------
13 net-vpn/openconnect/openconnect-8.10-r3.ebuild | 10 ---
14 net-vpn/openconnect/openconnect-9999.ebuild | 10 ---
15 3 files changed, 125 deletions(-)
16
17 diff --git a/net-vpn/openconnect/files/openconnect.initd.8.10 b/net-vpn/openconnect/files/openconnect.initd.8.10
18 deleted file mode 100644
19 index 020eeb91aa1..00000000000
20 --- a/net-vpn/openconnect/files/openconnect.initd.8.10
21 +++ /dev/null
22 @@ -1,105 +0,0 @@
23 -#!/sbin/openrc-run
24 -# Copyright 1999-2020 Gentoo Authors
25 -# Distributed under the terms of the GNU General Public License v2
26 -
27 -VPN="${RC_SVCNAME#*.}"
28 -VPNCONF=/etc/openconnect/${VPN}.conf
29 -VPNDIR="/etc/openconnect/${VPN}"
30 -VPNLOG="/var/log/openconnect/${VPN}"
31 -VPNLOGFILE="${VPNLOG}/openconnect.log"
32 -VPNERRFILE="${VPNLOG}/openconnect.err"
33 -
34 -command="/usr/sbin/openconnect"
35 -name="OpenConnect: ${VPN}"
36 -pidfile="/run/openconnect/${VPN}.pid"
37 -stopsig="SIGINT"
38 -
39 -depend() {
40 - before netmount
41 -}
42 -
43 -checkconfig() {
44 - if [ $VPN = "openconnect" ]; then
45 - eerror "You cannot call openconnect directly. You must create a symbolic link to it with the vpn name:"
46 - eerror
47 - eerror "ln -s /etc/init.d/openconnect /etc/init.d/openconnect.vpn0"
48 - eerror
49 - eerror "And then call it instead:"
50 - eerror
51 - eerror "/etc/init.d/openconnect.vpn0 start"
52 - return 1
53 - fi
54 - if [ ! -f "${VPNCONF}" ]; then
55 - ewarn "The configuration file for ${VPN} does not exist."
56 - ewarn "Please create ${VPNCONF}"
57 - ewarn "This will become a fatal error in a future release."
58 - fi
59 - local server vpnopts password
60 - eval server=\$server_${VPN}
61 - eval vpnopts=\$vpnopts_${VPN}
62 - eval password=\$password_${VPN}
63 - if [ -n "$server" ] || [ -n "$vpnopts" ] || [ -n "password" ]; then
64 - ewarn "server_${VPN}, vpnopts${VPN} and password_${VPN} are deprecated"
65 - ewarn"Please move them to the appropriate settings in ${VPNCONF}"
66 - ewarn "They will be ignored in the future."
67 - fi
68 - return 0
69 -}
70 -
71 -checktuntap() {
72 - if [ "$RC_UNAME" = "Linux" -a ! -e /dev/net/tun ] ; then
73 - if ! modprobe tun ; then
74 - eerror "TUN/TAP support is not available in this kernel"
75 - return 1
76 - fi
77 - fi
78 -}
79 -
80 -run_hook() {
81 - if [ -x "$1" ]; then
82 - "$@"
83 - fi
84 -}
85 -
86 -start_pre() {
87 - checkconfig || return
88 - checktuntap || return
89 - checkpath -d "${VPNLOG}" || return
90 - checkpath -d /run/openconnect || return
91 - run_hook "${VPNDIR}/preup.sh"
92 -}
93 -
94 -start() {
95 - local server vpnopts password
96 - eval server=\$server_${VPN}
97 - eval vpnopts=\$vpnopts_${VPN}
98 - eval password=\$password_${VPN}
99 -
100 - ebegin "Starting ${name}"
101 - start-stop-daemon --start --exec "${command}" -- \
102 - --background \
103 - --config="${VPNCONF:-/dev/null}" \
104 - --interface="${VPN}" \
105 - --pid-file="${pidfile}" \
106 - ${vpnopts} \
107 - "${server}" \
108 - >> "${VPNLOGFILE}" \
109 - 2>> "${VPNERRFILE}" \
110 - <<EOF
111 -${password}
112 -EOF
113 - eend $?
114 -}
115 -
116 -start_post() {
117 - run_hook "${VPNDIR}/postup.sh"
118 -}
119 -
120 -stop_pre() {
121 - checkconfig || return
122 - run_hook "${VPNDIR}/predown.sh"
123 -}
124 -
125 -stop_post() {
126 - run_hook "${VPNDIR}/postdown.sh"
127 -}
128
129 diff --git a/net-vpn/openconnect/openconnect-8.10-r3.ebuild b/net-vpn/openconnect/openconnect-8.10-r3.ebuild
130 index 8b5c8962bee..8e690399601 100644
131 --- a/net-vpn/openconnect/openconnect-8.10-r3.ebuild
132 +++ b/net-vpn/openconnect/openconnect-8.10-r3.ebuild
133 @@ -139,13 +139,3 @@ src_install() {
134
135 keepdir /var/log/openconnect
136 }
137 -
138 -pkg_postinst() {
139 - local v
140 - for v in ${REPLACING_VERSIONS}; do
141 - ver_test $v -ge 8.10-r1 && continue
142 - ewarn "openconnect tunnel-specific configurations stored in ${EROOT}/etc/conf.d"
143 - ewarn "should be migrated to ${EROOT}/etc/openconnect/<tunnel>.conf"
144 - ewarn "For more information see ${EROOT}/usr/share/doc/${PF}/README.OpenRC"
145 - done
146 -}
147
148 diff --git a/net-vpn/openconnect/openconnect-9999.ebuild b/net-vpn/openconnect/openconnect-9999.ebuild
149 index 8b5c8962bee..8e690399601 100644
150 --- a/net-vpn/openconnect/openconnect-9999.ebuild
151 +++ b/net-vpn/openconnect/openconnect-9999.ebuild
152 @@ -139,13 +139,3 @@ src_install() {
153
154 keepdir /var/log/openconnect
155 }
156 -
157 -pkg_postinst() {
158 - local v
159 - for v in ${REPLACING_VERSIONS}; do
160 - ver_test $v -ge 8.10-r1 && continue
161 - ewarn "openconnect tunnel-specific configurations stored in ${EROOT}/etc/conf.d"
162 - ewarn "should be migrated to ${EROOT}/etc/openconnect/<tunnel>.conf"
163 - ewarn "For more information see ${EROOT}/usr/share/doc/${PF}/README.OpenRC"
164 - done
165 -}