From 744cab86399095416e75ea2a7f81cee89a47fbff Mon Sep 17 00:00:00 2001 From: Rusty Bird Date: Thu, 8 Feb 2018 13:21:01 +0000 Subject: [PATCH] bind-dirs.sh: don't fail on empty configuration directory nullglob must be active before a glob is used on a potentially empty directory. Call shopt immediately after the shebang line. Fixes QubesOS/qubes-issues#3552 --- vm-systemd/bind-dirs.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/vm-systemd/bind-dirs.sh b/vm-systemd/bind-dirs.sh index 1899c97..5cad97d 100755 --- a/vm-systemd/bind-dirs.sh +++ b/vm-systemd/bind-dirs.sh @@ -1,4 +1,5 @@ #!/bin/bash -e +shopt -s nullglob dotglob # vim: set ts=4 sw=4 sts=4 et : # # bind-dirs @@ -39,8 +40,6 @@ init() { [ -n "$rw_dest_dir" ] || rw_dest_dir="/rw/bind-dirs" [ -n "$symlink_level_max" ] || symlink_level_max="10" mkdir --parents "$rw_dest_dir" - shopt -s nullglob - shopt -s dotglob } legacy() {