summaryrefslogtreecommitdiffstats
path: root/share/scripts/debconf
diff options
context:
space:
mode:
Diffstat (limited to 'share/scripts/debconf')
-rwxr-xr-xshare/scripts/debconf107
1 files changed, 14 insertions, 93 deletions
diff --git a/share/scripts/debconf b/share/scripts/debconf
index 31f5bf2..ac59b75 100755
--- a/share/scripts/debconf
+++ b/share/scripts/debconf
@@ -280,67 +280,17 @@ Configure_apt ()
case "${MODE}" in
progress-linux)
- AREA="$(echo ${ARCHIVE_AREAS} | sed -e 's|,| |g')"
- DIST="$(echo ${DISTRIBUTION} | sed -e 's|-backports||')"
- echo "deb ${MIRROR} ${DIST} ${AREA}" > "${DIRECTORY}/etc/apt/sources.list.d/progress-linux.list"
-
- case "${DISTRIBUTION}" in
- *-backports)
- echo "deb ${MIRROR} ${DIST}-backports ${AREA}" >> "${DIRECTORY}/etc/apt/sources.list.d/progress-linux.list"
- ;;
- esac
-
-cat > "${DIRECTORY}/etc/apt/preferences.d/progress-linux.pref" << EOF
-Package: *
-Pin: release n=${DIST}
-Pin-Priority: 999
-
-Package: *
-Pin: release n=${DIST}-security
-Pin-Priority: 999
-
-Package: *
-Pin: release n=${DIST}-updates
-Pin-Priority: 999
-
-Package: *
-Pin: release n=${DIST}-extras
-Pin-Priority: 999
-EOF
- case "${DISTRIBUTION}" in
- *-backports)
-
-cat >> "${DIRECTORY}/etc/apt/preferences.d/progress-linux.pref" << EOF
-
-Package: *
-Pin: release n=${DIST}-backports
-Pin-Priority: 999
-
-Package: *
-Pin: release n=${DIST}-backports-extras
-Pin-Priority: 999
+cat > "${DIRECTORY}/progress-linux.cfg" << EOF
+progress-linux progress-linux/archives multiselect ${ARCHIVES}
+progress-linux progress-linux/archive-areas multiselect $(echo ${ARCHIVE_AREAS} | sed -e 's|,| |g')
EOF
- ;;
+ Chroot "${DIRECTORY}" "debconf-set-selections progress-linux.cfg"
+ Chroot "${DIRECTORY}" "DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=criticial dpkg-reconfigure progress-linux"
- *)
+ rm -f "${DIRECTORY}/progress-linux.cfg"
-cat >> "${DIRECTORY}/etc/apt/preferences.d/progress-linux.pref" << EOF
-
-#Package: *
-#Pin: release n=${DIST}-backports
-#Pin-Priority: 999
-
-#Package: *
-#Pin: release n=${DIST}-backports-extras
-#Pin-Priority: 999
-EOF
-
- ;;
- esac
-
- Chroot "${DIRECTORY}" "apt-key add /usr/share/progress-linux/pgp-keys/apt.progress-linux.org.gpg"
Chroot "${DIRECTORY}" "apt update"
;;
esac
@@ -458,45 +408,16 @@ Configure_system ()
case "${MODE}" in
progress-linux)
- AREA="$(echo ${ARCHIVE_AREAS} | sed -e 's|,| |g')"
- DIST="$(echo ${DISTRIBUTION} | sed -e 's|-backports||')"
- echo "deb ${MIRROR} ${DIST} ${AREA}" > "${DIRECTORY}/etc/apt/sources.list.d/progress-linux.list"
+cat > "${DIRECTORY}/progress-linux.cfg" << EOF
+progress-linux progress-linux/archives multiselect ${ARCHIVES}
+progress-linux progress-linux/archive-areas multiselect $(echo ${ARCHIVE_AREAS} | sed -e 's|,| |g')
+EOF
- for REPO in ${ARCHIVES}
- do
- case "${REPO}" in
- ${DIST}-security)
- echo "deb ${MIRROR_SECURITY} ${DIST}-security ${AREA}" >> "${DIRECTORY}/etc/apt/sources.list.d/progress-linux.list"
- ;;
-
- ${DIST}-updates)
- echo "deb ${MIRROR} ${DIST}-updates ${AREA}" >> "${DIRECTORY}/etc/apt/sources.list.d/progress-linux.list"
- ;;
-
- ${DIST}-extras)
- if echo "${AREA}" | grep -qs non-free
- then
- echo "deb ${MIRROR} ${DIST}-extras ${AREA} restricted" >> "${DIRECTORY}/etc/apt/sources.list.d/progress-linux.list"
- else
- echo "deb ${MIRROR} ${DIST}-extras ${AREA}" >> "${DIRECTORY}/etc/apt/sources.list.d/progress-linux.list"
- fi
- ;;
-
- ${DIST}-backports)
- echo "deb ${MIRROR} ${DIST}-backports ${AREA}" >> "${DIRECTORY}/etc/apt/sources.list.d/progress-linux.list"
- ;;
-
- ${DIST}-backports-extras)
- if echo "${AREA}" | grep -qs non-free
- then
- echo "deb ${MIRROR} ${DIST}-backports-extras ${AREA} restricted" >> "${DIRECTORY}/etc/apt/sources.list.d/progress-linux.list"
- else
- echo "deb ${MIRROR} ${DIST}-backports-extras ${AREA}" >> "${DIRECTORY}/etc/apt/sources.list.d/progress-linux.list"
- fi
- ;;
- esac
- done
+ Chroot "${DIRECTORY}" "debconf-set-selections progress-linux.cfg"
+ Chroot "${DIRECTORY}" "DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=criticial dpkg-reconfigure progress-linux"
+
+ rm -f "${DIRECTORY}/progress-linux.cfg"
;;
esac