diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-08-27 04:08:33 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-08-27 04:16:02 +0000 |
commit | f53b44404ebb93cd01871bd2b0c7f0f2367e1406 (patch) | |
tree | a2d2fe39048e6cd9a2c81cb053bda3dee003db53 | |
parent | Updating to standards version 4.6.0. (diff) | |
download | progress-linux-f53b44404ebb93cd01871bd2b0c7f0f2367e1406.tar.xz progress-linux-f53b44404ebb93cd01871bd2b0c7f0f2367e1406.zip |
Making distribution detection and version handling more robust.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x | debian/progress-linux.config | 70 | ||||
-rwxr-xr-x | debian/progress-linux.postinst | 2 |
2 files changed, 42 insertions, 30 deletions
diff --git a/debian/progress-linux.config b/debian/progress-linux.config index a3e55e3..4532d78 100755 --- a/debian/progress-linux.config +++ b/debian/progress-linux.config @@ -36,33 +36,47 @@ Run_debconf () DEBIAN_VERSION="$(cat /etc/debian_version)" PROGRESS_LINUX_VERSION="$(if [ -e /etc/progress-linux_version ]; then cat /etc/progress-linux_version; fi)" -case "${DEBIAN_VERSION}" in - 10.*|buster/sid) - RELEASE="5" - CODENAME="engywuck" - - Run_debconf - ;; - - 11.*|bullseye/sid) - case "${PROGRESS_LINUX_VERSION}" in - 5*) - RELEASE="5" - CODENAME="engywuck" - ;; - - *) - RELEASE="6" - CODENAME="fuchur" - ;; - esac - - Run_debconf - ;; - - *) - echo "W: unsupported debian release" - ;; -esac +if [ -n "${PROGRESS_LINUX_VERSION}" ] +then + case "${PROGRESS_LINUX_VERSION}" in + 5*) + RELEASE="5" + CODENAME="engywuck" + + Run_debconf + ;; + + 6*) + RELEASE="6" + CODENAME="fuchur" + + Run_debconf + ;; + + *) + echo "W: unsupported debian release" + ;; + esac +else + case "${DEBIAN_VERSION}" in + 10.*|buster/sid) + RELEASE="5" + CODENAME="engywuck" + + Run_debconf + ;; + + 11.*|bullseye/sid) + RELEASE="6" + CODENAME="fuchur" + + Run_debconf + ;; + + *) + echo "W: unsupported debian release" + ;; + esac +fi db_stop diff --git a/debian/progress-linux.postinst b/debian/progress-linux.postinst index 3e4dd5c..b102b48 100755 --- a/debian/progress-linux.postinst +++ b/debian/progress-linux.postinst @@ -207,11 +207,9 @@ case "${1}" in case "${DEBIAN_VERSION}" in 10.*|buster/sid) - ;; 11.*|bullseye/sid) - ;; *) |