diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 08:29:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 08:29:09 +0000 |
commit | fce082bae7c1c2ea46d938180b8fcc73360e3399 (patch) | |
tree | 859e71a964aed4c7d8bf45913fe912310a78f0ac | |
parent | Adding lsb release file for Progress Linux 7 (graograman). (diff) | |
download | base-files-fce082bae7c1c2ea46d938180b8fcc73360e3399.tar.xz base-files-fce082bae7c1c2ea46d938180b8fcc73360e3399.zip |
Adding internal preseed option to select os identification.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rw-r--r-- | debian/base-files.install | 8 | ||||
-rw-r--r-- | debian/base-files.templates | 6 | ||||
-rw-r--r-- | debian/postinst.in | 32 | ||||
-rwxr-xr-x | debian/rules | 4 |
4 files changed, 46 insertions, 4 deletions
diff --git a/debian/base-files.install b/debian/base-files.install index 93be954..94b79b5 100644 --- a/debian/base-files.install +++ b/debian/base-files.install @@ -1,7 +1,7 @@ debian/local/base-files/issue /etc debian/local/base-files/issue.net /etc debian/local/base-files/motd /usr/share/base-files -debian/local/base-files/os-release /etc -debian/local/base-files/progress-linux_version /etc -debian/local/dpkg/progress-linux /etc/dpkg/origins -debian/local/lsb-release/lsb-release /etc +debian/local/base-files/os-release /usr/share/base-files/progress-linux +debian/local/base-files/progress-linux_version /usr/share/base-files/progress-linux +debian/local/dpkg/progress-linux /usr/share/base-files/progress-linux +debian/local/lsb-release/lsb-release /usr/share/base-files/progress-linux diff --git a/debian/base-files.templates b/debian/base-files.templates new file mode 100644 index 0000000..68c1aa7 --- /dev/null +++ b/debian/base-files.templates @@ -0,0 +1,6 @@ +Template: base-files/os-identification +Type: select +Choices-C: debian, progress-linux +Choices: Debian, Progress Linux +Default: progress-linux +Description: operating system identification data 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 diff --git a/debian/rules b/debian/rules index 3b8f84d..5f8cc31 100755 --- a/debian/rules +++ b/debian/rules @@ -35,6 +35,10 @@ endif mv $(DESTDIR)/etc/os-release $(DESTDIR)/usr/lib/os-release ln -s ../usr/lib/os-release $(DESTDIR)/etc/os-release +execute_after_dh_auto_install: + mkdir -p $(DESTDIR)/usr/share/base-files/debian + mv $(DESTDIR)/usr/lib/os-release $(DESTDIR)/usr/share/base-files/debian/os-release + override_dh_installchangelogs: dh_installchangelogs --no-trim |