functions.sh : generic podman_unshare ?
This commit is contained in:
parent
a582523a0e
commit
2a7040758c
15
functions.sh
15
functions.sh
|
@ -53,13 +53,7 @@ sed_in_place () {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# podman_unshare prefixed
|
# sed or die trying multiline!
|
||||||
podman_unshare_sed_in_place () {
|
|
||||||
podman_unshare='podman unshare'
|
|
||||||
sed_in_place "${1}" "${2}" "${3}"
|
|
||||||
}
|
|
||||||
|
|
||||||
# sed or die trying
|
|
||||||
sed_in_place_multiline () {
|
sed_in_place_multiline () {
|
||||||
${podman_unshare} grep -z -q "${1}" "${3}"
|
${podman_unshare} grep -z -q "${1}" "${3}"
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
|
@ -70,10 +64,9 @@ sed_in_place_multiline () {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# podman_unshare prefixed
|
# generic podman_unshare
|
||||||
podman_unshare_sed_in_place_multiline () {
|
podman_unshare () {
|
||||||
podman_unshare='podman unshare'
|
podman unshare "$@"
|
||||||
sed_in_place_multiline "${1}" "${2}" "${3}"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# check: systemd unit exists
|
# check: systemd unit exists
|
||||||
|
|
Loading…
Reference in a new issue