mount: Create host path if it doesn’t exist

This commit is contained in:
tschettervictor
2025-04-23 19:58:09 -06:00
committed by GitHub
parent 28f14fac21
commit 963dbe09c9

View File

@@ -115,6 +115,8 @@ if { [ "${_hostpath}" = "tmpfs" ] && [ "$_type" = "tmpfs" ]; } || \
{ [ "${_hostpath}" = "proc" ] && [ "${_type}" = "procfs" ]; } || \
{ [ "${_hostpath}" = "fdesc" ] && [ "${_type}" = "fdescfs" ]; } then
warn "Detected advanced mount type ${_hostpath}"
elif [ ! -e "${_hostpath}" ] && [ "${_type}" = "nullfs" ]; then
mkdir -p "${_hostpath}"
elif [ ! -e "${_hostpath}" ] || [ "${_type}" != "nullfs" ]; then
error_notify "Invalid host path or incorrect mount type in FSTAB."
warn "Format: /host/path /jail/path nullfs ro 0 0"