From 5a34d9aae4956ac6a7f7e10caf6bce14bbe022c4 Mon Sep 17 00:00:00 2001 From: Krzysztof kuhy Rudnicki Date: Thu, 6 Nov 2025 20:24:19 +0100 Subject: [PATCH] feat: add install unreal mcp script --- hosts/guard/pacman-hooks/pacman-post-relock-hosts.sh | 4 +++- hosts/guard/pacman-hooks/pacman-pre-unlock-hosts.sh | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/hosts/guard/pacman-hooks/pacman-post-relock-hosts.sh b/hosts/guard/pacman-hooks/pacman-post-relock-hosts.sh index e2f2a8b..83ab351 100644 --- a/hosts/guard/pacman-hooks/pacman-post-relock-hosts.sh +++ b/hosts/guard/pacman-hooks/pacman-post-relock-hosts.sh @@ -1,6 +1,8 @@ #!/usr/bin/env bash # Post-transaction hook to re-apply hosts guard protections (single-layer ro bind) +set -euo pipefail + TARGET=/etc/hosts ENFORCE=/usr/local/sbin/enforce-hosts.sh LOGTAG=hosts-guard-hook @@ -8,7 +10,7 @@ LOGTAG=hosts-guard-hook mount_layers_count() { awk '$5=="/etc/hosts"{c++} END{print c+0}' /proc/self/mountinfo 2> /dev/null || echo 0; } collapse_mounts() { local i=0 - if command -v mountpoint > /devnull 2>&1; then + if command -v mountpoint > /dev/null 2>&1; then while mountpoint -q "$TARGET"; do umount -l "$TARGET" > /dev/null 2>&1 || break i=$((i + 1)) diff --git a/hosts/guard/pacman-hooks/pacman-pre-unlock-hosts.sh b/hosts/guard/pacman-hooks/pacman-pre-unlock-hosts.sh index 8edd96b..308738f 100644 --- a/hosts/guard/pacman-hooks/pacman-pre-unlock-hosts.sh +++ b/hosts/guard/pacman-hooks/pacman-pre-unlock-hosts.sh @@ -1,6 +1,8 @@ #!/usr/bin/env bash # Non-interactive pre-transaction hook to temporarily unlock /etc/hosts +set -euo pipefail + TARGET=/etc/hosts LOGTAG=hosts-guard-hook