106.21. vpnc-script-20240208
Routing and DNS script openconnect runs when a tunnel connects
20240208-1 · GPL-2.0-or-later · 0.1 SBU · 56.4 KiB, 2 files · 41_system, 813 of 1047 · ports/core/network/vpnc-script
Homepage: https://gitlab.com/openconnect/vpnc-scripts
Why it is in KDOS. The comment above vpnc-script and openconnect in script/phases/41_system/packages.d/network.txt:
Corporate VPN: AnyConnect, GlobalProtect, Fortinet and Pulse. The script is what gives the tunnel its routes — openconnect execs it on every connect.
NO NetworkManager PLUGIN. Upstream's checks webkit2gtk UNCONDITIONALLY, and the dialog it builds with it is the thing the VPN service delegates authentication to. No recipe builds it against the webkitgtk port, and a build with the dialog disabled would be a connection type the surface offers and cannot authenticate.
vpnc-script is the script openconnect runs when a tunnel comes up or goes down: it sets the tunnel’s addresses and routes with ip and writes its DNS servers. The port installs it as /usr/share/vpnc-scripts/vpnc-script, the path openconnect is built to call.
Depends on: iproute2.
Required by (1): openconnect.
Sources: vpnc-script. Every step kpkg takes applies to this port.
Install: script/chroot/exec.sh bash -c 'source script/phases/41_system/phase.env && kpkg install vpnc-script'
build.sh:
install -Dm755 "$PORT_SRC/vpnc-script" "$PKG/usr/share/vpnc-scripts/vpnc-script"
install -Dm644 "/usr/share/licenses/iproute2/COPYING" "$PKG/usr/share/licenses/$name/COPYING"
Directories: /usr/share/licenses/vpnc-script, /usr/share/vpnc-scripts.
The source is that one script, fetched from a pinned commit. Its header puts it under the GPL-2.0 or any later version and does not include the licence text, so kpkg finds none. The last line of build.sh installs iproute2’s /usr/share/licenses/iproute2/COPYING, the GPL-2.0 text, which is there because iproute2 is in depends.