From d4515738898041adf31dacf193937e1659d8a7cd Mon Sep 17 00:00:00 2001 From: Sagformas Date: Tue, 4 Oct 2022 11:05:05 +0200 Subject: [PATCH] Advanced Mount Types Support --- usr/local/share/bastille/mount.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/usr/local/share/bastille/mount.sh b/usr/local/share/bastille/mount.sh index d7e6eb9c..4e946c66 100644 --- a/usr/local/share/bastille/mount.sh +++ b/usr/local/share/bastille/mount.sh @@ -65,8 +65,10 @@ if [ -z "${_hostpath}" ] || [ -z "${_jailpath}" ] || [ -z "${_type}" ] || [ -z " exit 1 fi -## if host path doesn't exist or type is not "nullfs" -if [ ! -d "${_hostpath}" ] || [ "${_type}" != "nullfs" ]; then +## if host path doesn't exist, type is not "nullfs" or are using advanced mount type "tmpfs,linprocfs,linsysfs, fdescfs, procfs" +if [ "${_hostpath}" == "tmpfs" -a "$_type" == "tmpfs" ] || [ "${_hostpath}" == "linprocfs" -a "${_type}" == "linprocfs" ] || [ "${_hostpath}" == "linsysfs" -a "${_type}" == "linsysfs" ] || [ "${_hostpath}" == "proc" -a "${_type}" == "procfs" ] || [ "${_hostpath}" == "fdesc" -a "${_type}" == "fdescfs" ] ; then + warn "Detected advanced mount type ${_hostpath}" +elif [ ! -d "${_hostpath}" ] || [ "${_type}" != "nullfs" ]; then error_notify "Detected invalid host path or incorrect mount type in FSTAB." warn "Format: /host/path jail/path nullfs ro 0 0" warn "Read: ${_fstab}"