summaryrefslogtreecommitdiffstats
path: root/debian/progress-linux.config
blob: 6939689a9cde156bc6a26e82661fe45e26e03688 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
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