Skip to content

Commit

Permalink
Check for existence of debootstrap binary after command line processing
Browse files Browse the repository at this point in the history
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: #147
  • Loading branch information
mika committed Dec 13, 2019
1 parent 22cdc9f commit 5d3fdc8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions grml-debootstrap
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 5d3fdc8

Please sign in to comment.