summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-08-27 04:08:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-08-27 04:16:02 +0000
commitf53b44404ebb93cd01871bd2b0c7f0f2367e1406 (patch)
treea2d2fe39048e6cd9a2c81cb053bda3dee003db53
parentUpdating to standards version 4.6.0. (diff)
downloadprogress-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>
-rwxr-xr-xdebian/progress-linux.config70
-rwxr-xr-xdebian/progress-linux.postinst2
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)
-
;;
*)