diff options
Diffstat (limited to 'lib/common-functions')
-rwxr-xr-x | lib/common-functions | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/common-functions b/lib/common-functions index 9ba495c..6ff5b2c 100755 --- a/lib/common-functions +++ b/lib/common-functions @@ -390,6 +390,12 @@ recursively_umount_and_rm() { exit 42 fi + if [ ! -d "${dir}" ]; then + >&2 printf 'ERROR: recursively_umount_and_rm requires a directory as argument - "%s" is not\n' \ + "${dir}" + exit 42 + fi + # the sh -c '...' construct branch below is borrowed from # archlinux/devtools lib/archroot.sh: is_subvolume(), is_same_fs() and # subvolume_delete_recursive() |