mirror of
https://git.proxmox.com/git/pve-kernel-meta
synced 2025-08-13 18:44:35 +00:00
efiboot: add new mount namespace helper
to re-execute the currently running script in an unshared mount name space. Co-Developed-By: Thomas Lamprecht <t.lamprecht@proxmox.com> Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
parent
58487bcb45
commit
7800310ce5
@ -63,3 +63,12 @@ boot_kernel_list() {
|
|||||||
warn() {
|
warn() {
|
||||||
echo "$@" 1>&2
|
echo "$@" 1>&2
|
||||||
}
|
}
|
||||||
|
|
||||||
|
reexec_in_mountns() {
|
||||||
|
if [ -z "$PVE_EFIBOOT_UNSHARED" ]; then
|
||||||
|
export PVE_EFIBOOT_UNSHARED=1
|
||||||
|
echo "Re-executing '$0' in new private mount namespace.."
|
||||||
|
unshare --mount --propagation private "$0" "$@"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user