diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2017-06-30 15:04:17 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2017-07-01 07:31:33 +0000 |
commit | 4b6f5bd0131003decb3126c410c02fdae7a24f33 (patch) | |
tree | 8dc40e85af6c8fc8936160b50130d6e404276308 | |
parent | Merging upstream version 20170701. (diff) | |
download | open-infrastructure-compute-tools-4b6f5bd0131003decb3126c410c02fdae7a24f33.tar.xz open-infrastructure-compute-tools-4b6f5bd0131003decb3126c410c02fdae7a24f33.zip |
Making setting of default container create script conditional depending on existence of container scripts.
This fixes a failure to upgrade the package when the package is not
in a clean state anymore.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rw-r--r-- | debian/open-infrastructure-container-tools.config | 41 |
1 files changed, 22 insertions, 19 deletions
diff --git a/debian/open-infrastructure-container-tools.config b/debian/open-infrastructure-container-tools.config index 79c393a..9aaeb83 100644 --- a/debian/open-infrastructure-container-tools.config +++ b/debian/open-infrastructure-container-tools.config @@ -26,31 +26,34 @@ db_settitle open-infrastructure-container-tools/title db_input low open-infrastructure-container-tools/cache || true db_go -SCRIPT_CHOICES="$(cd /usr/share/container-tools/scripts && find -maxdepth 1 -not -type d -and -not -name 'default' -and -not -name 'debconf' -and -not -name '*.d' -printf '%P\n' | sort)" -db_subst open-infrastructure-container-tools/script SCRIPT_CHOICES "$(echo ${SCRIPT_CHOICES} | sed -e 's| |, |g')" - -if [ -x /usr/bin/lsb_release ] +if [ -e /usr/share/container-tools/scripts ] then - DISTRIBUTOR="$(lsb_release -is 2>/dev/null)" -fi + SCRIPT_CHOICES="$(cd /usr/share/container-tools/scripts && find -maxdepth 1 -not -type d -and -not -name 'default' -and -not -name 'debconf' -and -not -name '*.d' -printf '%P\n' | sort)" + db_subst open-infrastructure-container-tools/script SCRIPT_CHOICES "$(echo ${SCRIPT_CHOICES} | sed -e 's| |, |g')" -DISTRIBUTOR="${DISTRIBUTOR:-Debian}" + if [ -x /usr/bin/lsb_release ] + then + DISTRIBUTOR="$(lsb_release -is 2>/dev/null)" + fi -case "${DISTRIBUTOR}" in - Progress*) - SCRIPT_DEFAULT="progress-linux" - ;; + DISTRIBUTOR="${DISTRIBUTOR:-Debian}" - *) - SCRIPT_DEFAULT="debian" - ;; -esac + case "${DISTRIBUTOR}" in + Progress*) + SCRIPT_DEFAULT="progress-linux" + ;; -db_subst open-infrastructure-container-tools/script SCRIPT_DEFAULT "${SCRIPT_DEFAULT}" + *) + SCRIPT_DEFAULT="debian" + ;; + esac -db_settitle open-infrastructure-container-tools/title -db_input low open-infrastructure-container-tools/script || true -db_go + db_subst open-infrastructure-container-tools/script SCRIPT_DEFAULT "${SCRIPT_DEFAULT}" + + db_settitle open-infrastructure-container-tools/title + db_input low open-infrastructure-container-tools/script || true + db_go +fi if [ -e "${CONFFILE}" ] then |