summaryrefslogtreecommitdiffstats
path: root/debian/postinst.in
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 05:17:56 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 05:17:56 +0000
commite000a91fbdb86f6e833987654e164e0ae2bb0570 (patch)
tree5131148abc81c8e8f666d418caa399de51196587 /debian/postinst.in
parentAdding lsb release file for Progress Linux 6 (fuchur). (diff)
downloadbase-files-e000a91fbdb86f6e833987654e164e0ae2bb0570.tar.xz
base-files-e000a91fbdb86f6e833987654e164e0ae2bb0570.zip
Adding internal preseed option to select os identification.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--debian/postinst.in32
1 files changed, 32 insertions, 0 deletions
diff --git a/debian/postinst.in b/debian/postinst.in
index 98e0865..2bc830a 100644
--- a/debian/postinst.in
+++ b/debian/postinst.in
@@ -128,3 +128,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