From d98714cab44c962edf6abc945588fb7275ffb3b8 Mon Sep 17 00:00:00 2001 From: Gitouche <26656-gitouche@users.noreply.framagit.org> Date: Fri, 28 Jul 2023 17:01:12 +0200 Subject: [PATCH] Revert "functions.sh : generic podman_unshare ?" This reverts commit 2a7040758c3d43de0d18ae8add4ff8b2ec9312a3. --- functions.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/functions.sh b/functions.sh index 1b61794..d67f8f9 100644 --- a/functions.sh +++ b/functions.sh @@ -53,7 +53,13 @@ sed_in_place () { fi } -# sed or die trying multiline! +# podman_unshare prefixed +podman_unshare_sed_in_place () { + podman_unshare='podman unshare' + sed_in_place "${1}" "${2}" "${3}" +} + +# sed or die trying sed_in_place_multiline () { ${podman_unshare} grep -z -q "${1}" "${3}" if [ $? -eq 0 ]; then @@ -64,9 +70,10 @@ sed_in_place_multiline () { fi } -# generic podman_unshare -podman_unshare () { - podman unshare "$@" +# podman_unshare prefixed +podman_unshare_sed_in_place_multiline () { + podman_unshare='podman unshare' + sed_in_place_multiline "${1}" "${2}" "${3}" } # check: systemd unit exists