From 5d3fdc8697e284776f0bb331ef73ac8ac8a34769 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Fri, 13 Dec 2019 14:10:19 +0100 Subject: [PATCH] Check for existence of debootstrap binary after command line processing When invoking grml-debootstrap as user without /usr/sbin inside $PATH, then the debootstrap binary will not be found and executing `grml-debootstrap --version` fails with `debootstrap not installed`. Closes: https://github.com/grml/grml-debootstrap/issues/147 --- grml-debootstrap | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/grml-debootstrap b/grml-debootstrap index 6f9743c..4957e8f 100755 --- a/grml-debootstrap +++ b/grml-debootstrap @@ -335,10 +335,6 @@ stage() { } # }}} -# make sure we have what we need {{{ -check4progs "${DEBOOTSTRAP}" || bailout 1 -# }}} - # source main configuration file {{{ if [ -r /etc/debootstrap/config ] ; then # shellcheck disable=SC1091 @@ -626,6 +622,8 @@ fi # }}} # make sure we have what we need {{{ +check4progs "${DEBOOTSTRAP}" || bailout 1 + if [ -n "$VIRTUAL" ] ; then check4progs kpartx parted qemu-img || bailout 1 fi -- 2.1.4