aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorW. Kosior <koszko@koszko.org>2024-09-20 12:16:00 +0200
committerW. Kosior <koszko@koszko.org>2025-05-26 14:07:29 +0200
commitc0c61a800e216ae9afaee7b7c5765ed8d7ab0917 (patch)
tree646222e0ea5035e972370969f6e992e4578bfe48
parentada6a31a83e9adad4fc55bdd176fbddd556fec2e (diff)
downloadguix-c0c61a800e216ae9afaee7b7c5765ed8d7ab0917.tar.gz
guix-c0c61a800e216ae9afaee7b7c5765ed8d7ab0917.zip
gnu: openvpn: Make resolv.conf up/down scripts available.
* gnu/packages/vpn.scm (openvpn)[arguments]<#:phases>: Add phase to install `client.up' and `client.down' files. Change-Id: Ic6340721ab0ba086d0528fb3e070e3f7ecf2773e
-rw-r--r--gnu/packages/vpn.scm14
1 files changed, 13 insertions, 1 deletions
diff --git a/gnu/packages/vpn.scm b/gnu/packages/vpn.scm
index 0b62e8c7cf..ec2395c1ce 100644
--- a/gnu/packages/vpn.scm
+++ b/gnu/packages/vpn.scm
@@ -879,7 +879,19 @@ this process. It is compatible with Fortinet VPNs.")
"0a8r3bvg4aic9b7dix0h7990g3j1gq17wd3w6vqk8vk8xgfhyq8w"))))
(build-system gnu-build-system)
(arguments
- '(#:configure-flags '("--enable-iproute2=yes")))
+ (list #:configure-flags #~'("--enable-iproute2=yes")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'install 'install-resolv-conf-scripts
+ (lambda _
+ (with-directory-excursion "contrib/pull-resolv-conf/"
+ (for-each (lambda (name)
+ (let ((dst (format #f "~a/etc/openvpn/~a"
+ #$output name)))
+ (mkdir-p (dirname dst))
+ (copy-file name dst)
+ (chmod dst #o555)))
+ '("client.up" "client.down"))))))))
(native-inputs (list iproute pkg-config))
(inputs (append (list lz4 lzo openssl linux-pam)
(if (target-linux?) (list libcap-ng) '())))