diff options
Diffstat (limited to 'debian/progress-linux.config')
-rwxr-xr-x | debian/progress-linux.config | 124 |
1 files changed, 124 insertions, 0 deletions
diff --git a/debian/progress-linux.config b/debian/progress-linux.config new file mode 100755 index 0000000..6939689 --- /dev/null +++ b/debian/progress-linux.config @@ -0,0 +1,124 @@ +#!/bin/sh + +set -e + +NAME="Progress Linux" +PROJECT="progress-linux" + +. /usr/share/debconf/confmodule + +Run_debconf () +{ + # debconf templates + db_subst ${PROJECT}/archives CHOICES "${NAME} ${RELEASE} (${CODENAME}), ${NAME} ${RELEASE} (${CODENAME}-security), ${NAME} ${RELEASE} (${CODENAME}-updates), ${NAME} ${RELEASE} (${CODENAME}-extras), ${NAME} ${RELEASE} (${CODENAME}-test), ${NAME} ${RELEASE}.99 (${CODENAME}-backports), ${NAME} ${RELEASE}.99 (${CODENAME}-backports-extras), ${NAME} ${RELEASE}.99 (${CODENAME}-backports-test)" + db_subst ${PROJECT}/archives CHOICES_C "${CODENAME}, ${CODENAME}-security, ${CODENAME}-updates, ${CODENAME}-extras, ${CODENAME}-test, ${CODENAME}-backports, ${CODENAME}-backports-extras, ${CODENAME}-backports-test" + db_subst ${PROJECT}/archive-areas CHOICES "main, contrib, non-free, non-free-firmware, restricted" + + # apt archives + db_settitle ${PROJECT}/title + db_input high ${PROJECT}/archives || true + db_go + + if db_get ${PROJECT}/archives + then + # apt archive-areas + db_settitle ${PROJECT}/title + db_input high ${PROJECT}/archive-areas || true + db_go + + # apt mirror + db_settitle ${PROJECT}/title + db_input high ${PROJECT}/mirror || true + db_go + fi +} + +DEBIAN_VERSION="$(cat /etc/debian_version)" +PROGRESS_LINUX_VERSION="$(if [ -e /etc/progress-linux_version ]; then cat /etc/progress-linux_version; fi)" + +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 + ;; + + 7*) + RELEASE="7" + CODENAME="graograman" + + Run_debconf + ;; + + 8*) + RELEASE="8" + CODENAME="horok" + + Run_debconf + ;; + + 9*) + RELEASE="9" + CODENAME="illuan" + + 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 + ;; + + 12.*|bookworm/sid) + RELEASE="7" + CODENAME="graograman" + + Run_debconf + ;; + + 13.*|trixie/sid) + RELEASE="8" + CODENAME="horok" + + Run_debconf + ;; + + 14.*|forky/sid) + RELEASE="9" + CODENAME="illuan" + + Run_debconf + ;; + + *) + echo "W: unsupported debian release" + ;; + esac +fi + +db_stop |