summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Bauer2021-05-18 15:18:00 +0200
committerJonathan Bauer2021-05-18 15:18:00 +0200
commitc1a1addc79d796c88cfa634cbaa12a8581a98aba (patch)
treedca1d546aca475d561d1547a6433086a4b34c2de
parent[kernel-vanilla] 5.10.37 (diff)
downloadmltk-c1a1addc79d796c88cfa634cbaa12a8581a98aba.tar.gz
mltk-c1a1addc79d796c88cfa634cbaa12a8581a98aba.tar.xz
mltk-c1a1addc79d796c88cfa634cbaa12a8581a98aba.zip
chroot.inc: skip bind mounts of inexistant dirs
-rw-r--r--core/includes/chroot.inc4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/includes/chroot.inc b/core/includes/chroot.inc
index a35ca9b4..04db53ee 100644
--- a/core/includes/chroot.inc
+++ b/core/includes/chroot.inc
@@ -120,6 +120,10 @@ chroot_prepare_mounts() {
# mount pseudo-filesystems
for DIR in $CHROOT_BINDMOUNTS; do
+ if ! [ -d "$DIR" ]; then
+ pwarning "Skipping bind mount of inexistant directory: $DIR"
+ continue
+ fi
mount -o bind "${DIR}" "${CHROOT_MOUNTDIR}/${DIR}" \
|| perror "Could not bind mount '$DIR' into CHROOT_MOUNTDIR/DIR '$CHROOT_MOUNTDIR/$DIR'."
done