From e109307c8b33944508fa1958701181909bbeb5c0 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Wed, 13 Sep 2017 11:37:07 +0200 Subject: ch: check permissions of $CHROOT directory Signed-off-by: Florian Pritz --- ch | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ch b/ch index bcc759b..00def24 100755 --- a/ch +++ b/ch @@ -39,6 +39,11 @@ shopt -s nullglob umask 022 +if [[ ! -d "$CHROOTS" ]]; then + echo "chroot base directory '$CHROOTS' does not exist or is not readable" + return 1 +fi + __genchroot() { sudo btrfs subvolume snapshot "$chrootdir/root" "$copydir" } -- cgit v1.2.3-24-g4f1b