Fix wrong mountpoint

In ed50e3fa04 _jailpath was updated to include the full path on the host.
The test and if required mkdir were then done with the jail’s root pirectory perpended to that full path.
This commit is contained in:
Götz Salzmann
2021-05-24 13:28:18 +02:00
parent b85d6347de
commit f8f508f6f6

View File

@@ -97,8 +97,8 @@ for _jail in ${JAILS}; do
_fstab_entry="${_hostpath} ${_jailpath} ${_type} ${_perms} ${_checks}"
## Create mount point if it does not exist. -- cwells
if [ ! -d "${bastille_jailsdir}/${_jail}/root/${_jailpath}" ]; then
if ! mkdir -p "${bastille_jailsdir}/${_jail}/root/${_jailpath}"; then
if [ ! -d "${_jailpath}" ]; then
if ! mkdir -p "${_jailpath}"; then
error_exit "Failed to create mount point inside jail."
fi
fi