From c1a1addc79d796c88cfa634cbaa12a8581a98aba Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Tue, 18 May 2021 15:18:00 +0200 Subject: chroot.inc: skip bind mounts of inexistant dirs --- core/includes/chroot.inc | 4 ++++ 1 file changed, 4 insertions(+) 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 -- cgit v1.2.3-55-g7522