File reverted due conflicts
This commit is contained in:
@@ -93,27 +93,26 @@ for _jail in ${JAILS}; do
|
|||||||
info "[${_jail}]:"
|
info "[${_jail}]:"
|
||||||
|
|
||||||
## aggregate variables into FSTAB entry
|
## aggregate variables into FSTAB entry
|
||||||
_jailpath_entry="${bastille_jailsdir}/${_jail}/root${_jailpath}"
|
_jailpath="${bastille_jailsdir}/${_jail}/root/${_jailpath}"
|
||||||
_fstab_entry="${_hostpath} ${_jailpath_entry} ${_type} ${_perms} ${_checks}"
|
_fstab_entry="${_hostpath} ${_jailpath} ${_type} ${_perms} ${_checks}"
|
||||||
|
|
||||||
## Create mount point if it does not exist. -- cwells
|
## Create mount point if it does not exist. -- cwells
|
||||||
if [ ! -d "${bastille_jailsdir}/${_jail}/root${_jailpath}" ]; then
|
if [ ! -d "${_jailpath}" ]; then
|
||||||
if ! mkdir -p "${bastille_jailsdir}/${_jail}/root${_jailpath}"; then
|
if ! mkdir -p "${_jailpath}"; then
|
||||||
error_exit "Failed to create mount point inside jail."
|
error_exit "Failed to create mount point inside jail."
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
## if entry doesn't exist, add; else show existing entry
|
## if entry doesn't exist, add; else show existing entry
|
||||||
if ! egrep -q "[[:blank:]]${_jailpath_entry}[[:blank:]]" "${bastille_jailsdir}/${_jail}/fstab" 2> /dev/null; then
|
if ! egrep -q "[[:blank:]]${_jailpath}[[:blank:]]" "${bastille_jailsdir}/${_jail}/fstab" 2> /dev/null; then
|
||||||
if ! echo "${_fstab_entry}" >> "${bastille_jailsdir}/${_jail}/fstab"; then
|
if ! echo "${_fstab_entry}" >> "${bastille_jailsdir}/${_jail}/fstab"; then
|
||||||
error_exit "Failed to create fstab entry: ${_fstab_entry}"
|
error_exit "Failed to create fstab entry: ${_fstab_entry}"
|
||||||
fi
|
fi
|
||||||
echo "Added: ${_fstab_entry}"
|
echo "Added: ${_fstab_entry}"
|
||||||
else
|
else
|
||||||
warn "Mountpoint already present in ${bastille_jailsdir}/${_jail}/fstab"
|
warn "Mountpoint already present in ${bastille_jailsdir}/${_jail}/fstab"
|
||||||
egrep "[[:blank:]]${_jailpath_entry}[[:blank:]]" "${bastille_jailsdir}/${_jail}/fstab"
|
egrep "[[:blank:]]${_jailpath}[[:blank:]]" "${bastille_jailsdir}/${_jail}/fstab"
|
||||||
fi
|
fi
|
||||||
mount -F "${bastille_jailsdir}/${_jail}/fstab" -a
|
mount -F "${bastille_jailsdir}/${_jail}/fstab" -a
|
||||||
_jailpath_entry=
|
|
||||||
echo
|
echo
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user