From fce082bae7c1c2ea46d938180b8fcc73360e3399 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 10:29:09 +0200 Subject: Adding internal preseed option to select os identification. Signed-off-by: Daniel Baumann --- debian/postinst.in | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'debian/postinst.in') diff --git a/debian/postinst.in b/debian/postinst.in index 0ca10b6..bf2bd4e 100644 --- a/debian/postinst.in +++ b/debian/postinst.in @@ -114,3 +114,35 @@ if [ "$1" = "configure" ] && [ "$2" != "" ]; then install_directory mnt 755 root fi fi + +case "${1}" in + configure) + . /usr/share/debconf/confmodule + + db_get base-files/os-identification + OS_IDENTIFICATION="${RET}" # select (w/o empty) + + db_stop + + rm -f /etc/lsb-release + rm -f /usr/lib/os-release + rm -f /etc/dpkg/origins/default + rm -f /etc/dpkg/origins/progress-linux + rm -f /etc/progress-linux_version + + case "${OS_IDENTIFICATION}" in + debian) + cp /usr/share/base-files/debian/os-release /usr/lib/os-release + ln -s debian /etc/dpkg/origins/default + ;; + + progress-linux) + cp /usr/share/base-files/progress-linux/lsb-release /etc/lsb-release + cp /usr/share/base-files/progress-linux/os-release /usr/lib/os-release + cp /usr/share/base-files/progress-linux/progress-linux /etc/dpkg/origins/progress-linux + ln -s progress-linux /etc/dpkg/origins/default + cp /usr/share/base-files/progress-linux/progress-linux_version /etc/progress-linux_version + ;; + esac + ;; +esac -- cgit v1.2.3