From e9b9d1c8d79780a231a428bdc1ec1640a3945405 Mon Sep 17 00:00:00 2001 From: boyska Date: Thu, 9 Mar 2023 11:36:53 +0100 Subject: [PATCH] chdir / makes paths more predictable we're grepping for paths, so let's be sure about our *current* directory. --- config/chroot_local-includes/sbin/swapon.tails | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/chroot_local-includes/sbin/swapon.tails b/config/chroot_local-includes/sbin/swapon.tails index ab2ee85b82f..22d684c28de 100755 --- a/config/chroot_local-includes/sbin/swapon.tails +++ b/config/chroot_local-includes/sbin/swapon.tails @@ -2,6 +2,8 @@ set -eu +cd / + for param in "$@"; do if echo "${param}" | grep -v '^/dev/zram' | grep -q /; then echo >&2 "Setting up swap is only allowed for zram devices" -- 2.11.4.GIT