diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2019-02-08 20:57:57 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2019-02-18 09:56:37 +0000 |
commit | 7d38b5aa339a776dc2e4e7e6eb9d65adc910790b (patch) | |
tree | 02b6f41f435282fca0f7560cbc649e7b37d918eb /debian/progress-linux.postinst | |
parent | Updating upstream download urls. (diff) | |
download | progress-linux-7d38b5aa339a776dc2e4e7e6eb9d65adc910790b.tar.xz progress-linux-7d38b5aa339a776dc2e4e7e6eb9d65adc910790b.zip |
Dynamically showing distribution specific repositories to setup.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/progress-linux.postinst')
-rwxr-xr-x | debian/progress-linux.postinst | 40 |
1 files changed, 39 insertions, 1 deletions
diff --git a/debian/progress-linux.postinst b/debian/progress-linux.postinst index 959e4e8..ceb563d 100755 --- a/debian/progress-linux.postinst +++ b/debian/progress-linux.postinst @@ -97,6 +97,27 @@ EOF fi } +Remove_ssh_known_hosts () +{ + if [ ! -e /etc/ssh/ssh_known_hosts ] + then + return + fi + + # ssh cert-authority + grep -v "^@cert-authority \*.${DOMAIN}" /etc/ssh/ssh_known_hosts > /etc/ssh/ssh_known_hosts.tmp + + if [ "$(md5sum /etc/ssh/ssh_known_hosts.tmp | cut -d' ' -f1)" = "2a2b4fdd70705b2029b35a24217138e6" ] + then + rm -f /etc/ssh/ssh_known_hosts.tmp + rm -f /etc/ssh/ssh_known_hosts + + rmdir /etc/ssh > /dev/null 2>&1 || true + else + mv -f /etc/ssh/ssh_known_hosts.tmp /etc/ssh/ssh_known_hosts + fi +} + case "${1}" in configure) . /usr/share/debconf/confmodule @@ -109,8 +130,25 @@ case "${1}" in db_stop + DISTRIBUTION="$(cat /etc/debian_version)" + + case "${DISTRIBUTION}" in + 10.*|buster/sid) + ;; + + *) + Remove_apt_sources + Remove_apt_preferences + Remove_apt_keys + + Remove_ssh_known_hosts + + exit 0 + ;; + esac + # apt - if [ -n "${ARCHIVES}" ] + if [ -n "${ARCHIVES}" ] && [ "${ARCHIVES}" != "false" ] then Install_apt_sources Install_apt_preferences |