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
(cherry picked from commit 744cab8639
)
This commit is contained in:
parent
f301bed804
commit
ac3c8a76b4
|
@ -1,4 +1,5 @@
|
||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
|
shopt -s nullglob dotglob
|
||||||
# vim: set ts=4 sw=4 sts=4 et :
|
# vim: set ts=4 sw=4 sts=4 et :
|
||||||
#
|
#
|
||||||
# bind-dirs
|
# bind-dirs
|
||||||
|
@ -38,8 +39,6 @@ init() {
|
||||||
[ -n "$rw_dest_dir" ] || rw_dest_dir="/rw/bind-dirs"
|
[ -n "$rw_dest_dir" ] || rw_dest_dir="/rw/bind-dirs"
|
||||||
[ -n "$symlink_level_max" ] || symlink_level_max="10"
|
[ -n "$symlink_level_max" ] || symlink_level_max="10"
|
||||||
mkdir --parents "$rw_dest_dir"
|
mkdir --parents "$rw_dest_dir"
|
||||||
shopt -s nullglob
|
|
||||||
shopt -s dotglob
|
|
||||||
}
|
}
|
||||||
|
|
||||||
legacy() {
|
legacy() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user