From f1c012026efb816d9b66bd43376fbfcfc5dab8b4 Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Thu, 7 Sep 2023 17:58:31 +0200 Subject: [PATCH] fix: [docker-host] use 'python3' as 'python' executable if missing --- precise/base-0k/hooks/install.d/00-base.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/precise/base-0k/hooks/install.d/00-base.sh b/precise/base-0k/hooks/install.d/00-base.sh index ccb2d0a..45afee6 100755 --- a/precise/base-0k/hooks/install.d/00-base.sh +++ b/precise/base-0k/hooks/install.d/00-base.sh @@ -60,6 +60,16 @@ case $(lsb_release -is) in fi sed -ri 's/^\s*#\s*(en_US\.UTF-?8.*)\s*$/\1/g' /etc/locale.gen locale-gen + + ## Debian11 doesn't have a 'python' executable but only a + ## 'python3' executable some python script don't care about + ## the version, they just want a 'python' executable. + if ! type -p python >/dev/null 2>&1; then + if py3=$(type -p python3); then + echo "No 'python' available in \$PATH, but 'python3' found, using it." >&2 + ln -svf "$py3" /usr/local/bin/python + fi + fi ;; esac