mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-02 05:44:03 +02:00
Merge pull request #2292 from alexbelgium/codex/fix-issue-with-hassio-addons
Ensure wireguard sysctl wrapper is always used
This commit is contained in:
@@ -1,4 +1,7 @@
|
|||||||
|
|
||||||
|
## 5.1.4-1 (21-12-2025)
|
||||||
|
- Fix WireGuard sysctl wrapper paths to resolve #2289.
|
||||||
|
|
||||||
## 5.1.4 (29-11-2025)
|
## 5.1.4 (29-11-2025)
|
||||||
- Update to latest version from linuxserver/docker-qbittorrent (changelog : https://github.com/linuxserver/docker-qbittorrent/releases)
|
- Update to latest version from linuxserver/docker-qbittorrent (changelog : https://github.com/linuxserver/docker-qbittorrent/releases)
|
||||||
## 5.1.2-22 (24-11-2025)
|
## 5.1.2-22 (24-11-2025)
|
||||||
|
|||||||
@@ -145,4 +145,4 @@ schema:
|
|||||||
slug: qbittorrent
|
slug: qbittorrent
|
||||||
udev: true
|
udev: true
|
||||||
url: https://github.com/alexbelgium/hassio-addons
|
url: https://github.com/alexbelgium/hassio-addons
|
||||||
version: "5.1.4"
|
version: "5.1.4-1"
|
||||||
|
|||||||
1
qbittorrent/rootfs/sbin/sysctl
Symbolic link
1
qbittorrent/rootfs/sbin/sysctl
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../usr/local/sbin/sysctl
|
||||||
@@ -1,17 +1,40 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
REAL_SYSCTL="/sbin/sysctl"
|
SCRIPT_PATH="$(readlink -f "$0")"
|
||||||
if [[ ! -x "${REAL_SYSCTL}" ]]; then
|
REAL_SYSCTL_CMD=()
|
||||||
REAL_SYSCTL="/usr/sbin/sysctl"
|
|
||||||
|
_maybe_set_backend() {
|
||||||
|
local candidate="$1"
|
||||||
|
if [[ -x "${candidate}" && "$(readlink -f "${candidate}")" != "${SCRIPT_PATH}" ]]; then
|
||||||
|
REAL_SYSCTL_CMD=("${candidate}")
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Prefer system binaries that are not the wrapper itself
|
||||||
|
_maybe_set_backend "/sbin/sysctl" \
|
||||||
|
|| _maybe_set_backend "/usr/sbin/sysctl" \
|
||||||
|
|| _maybe_set_backend "/bin/sysctl" \
|
||||||
|
|| _maybe_set_backend "/usr/bin/sysctl"
|
||||||
|
|
||||||
|
# Fallback to the busybox applet if no dedicated binary was found
|
||||||
|
if [[ ${#REAL_SYSCTL_CMD[@]} -eq 0 ]] && command -v busybox >/dev/null 2>&1; then
|
||||||
|
REAL_SYSCTL_CMD=("$(command -v busybox)" sysctl)
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ${#REAL_SYSCTL_CMD[@]} -eq 0 ]]; then
|
||||||
|
echo "sysctl wrapper: no backend sysctl binary found" >&2
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$#" -ge 2 && "$1" == "-q" && "$2" == "net.ipv4.conf.all.src_valid_mark=1" ]]; then
|
if [[ "$#" -ge 2 && "$1" == "-q" && "$2" == "net.ipv4.conf.all.src_valid_mark=1" ]]; then
|
||||||
if "${REAL_SYSCTL}" "$@" >/dev/null 2>&1; then
|
if "${REAL_SYSCTL_CMD[@]}" "$@" >/dev/null 2>&1; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
# Suppress failure for this specific key to keep wg-quick from aborting in unprivileged environments.
|
# Suppress failure for this specific key to keep wg-quick from aborting in unprivileged environments.
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exec "${REAL_SYSCTL}" "$@"
|
exec "${REAL_SYSCTL_CMD[@]}" "$@"
|
||||||
|
|||||||
1
qbittorrent/rootfs/usr/sbin/sysctl
Symbolic link
1
qbittorrent/rootfs/usr/sbin/sysctl
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../local/sbin/sysctl
|
||||||
Reference in New Issue
Block a user