diff --git a/modules.d/99squash-lib/module-setup.sh b/modules.d/99squash-lib/module-setup.sh index 6a0b6f85..be3d3dc0 100755 --- a/modules.d/99squash-lib/module-setup.sh +++ b/modules.d/99squash-lib/module-setup.sh @@ -72,6 +72,14 @@ squash_install() { squash_installpost() { local _file _handler + # this shouldn't happen but... + # ...better safe than deleting your rootfs + if [[ -z $initdir ]]; then + #shellcheck disable=SC2016 + dfatal '$initdir not set. Something went terribly wrong.' + exit 1 + fi + _handler=$(squash_get_handler) [[ -n $_handler ]] || return 1