# that we won't hide a previous mount. We also ignore
# duplicate destinations in a more or less arbitrary way.
[ -e "${bindings}" ] && sort -k2 -sbu ${bindings} >> ${custom_mounts}
# that we won't hide a previous mount. We also ignore
# duplicate destinations in a more or less arbitrary way.
[ -e "${bindings}" ] && sort -k2 -sbu ${bindings} >> ${custom_mounts}
# After all mounts are considered we add symlinks so they
# won't be hidden by some mount.
[ -e "${links}" ] && sort -k2 -sbu ${links} >> ${custom_mounts}
# After all mounts are considered we add symlinks so they
# won't be hidden by some mount.
[ -e "${links}" ] && sort -k2 -sbu ${links} >> ${custom_mounts}
[ "${DEBUG}" = "Yes" ] && cp ${custom_mounts} ${persistent_backing}
# Now we do the actual mounting (and symlinking)
while read source dest options # < ${custom_mounts}
do
[ "${DEBUG}" = "Yes" ] && cp ${custom_mounts} ${persistent_backing}
# Now we do the actual mounting (and symlinking)
while read source dest options # < ${custom_mounts}
do
if mountpoint -q "${dest}";
then
log_warning_msg "Skipping custom mount ${source} on ${dest}: destination is already a mount point"
if mountpoint -q "${dest}";
then
log_warning_msg "Skipping custom mount ${source} on ${dest}: destination is already a mount point"