diff --git a/net/rosenpass/files/patch-rp b/net/rosenpass/files/patch-rp index 2236ebe19b4b..89f5a317fe68 100644 --- a/net/rosenpass/files/patch-rp +++ b/net/rosenpass/files/patch-rp @@ -1,37 +1,46 @@ ---- rp.orig 2023-08-29 21:48:48 UTC +--- rp.orig 2026-08-03 12:38:47 UTC +++ rp @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!%%BASH%% set -e @@ -78,7 +78,7 @@ frag_init() { explain=0 frag_transaction=() frag " - #! /bin/bash + #!%%BASH%% set -e" } -@@ -223,7 +223,7 @@ exchange() { +@@ -223,14 +223,14 @@ exchange() { ip link set dev $(enquote "${dev}") up" ;; - freebsd*) + freebsd*|FreeBSD*) frag " # load the WireGuard kernel module - kldload -n if_wg || fatal 'Cannot load if_wg kernel module'" +- kldload -n if_wg || fatal 'Cannot load if_wg kernel module'" ++ kldload -n if_wg || dbg 'WARNING: Cannot load if_wg kernel module, trying to proceed anyway'" + + frag " + # Create the WireGuard interface +- ifconfig wg create name $(enquote "${dev}") || true" ++ ifconfig wg create name $(enquote "${dev}") || fatal 'Cannot create wg interface'" + + cleanup " + ifconfig $(enquote "${dev}") destroy || true" @@ -351,10 +351,6 @@ main() { project_name="rosenpass" verbose=0 scriptdir="$(dirname "${script}")" - gitdir="$(detect_git_dir)" || true - if [[ -d /nix ]]; then - nixdir="$(readlink -f result/bin/rp | grep -Pio '^/nix/store/[^/]+(?=/bin/[^/]+)')" || true - fi binary="$(find_rosenpass_binary)" # Parse command