summaryrefslogtreecommitdiffstats
path: root/distro
diff options
context:
space:
mode:
authorTomas Krizek <tomas.krizek@nic.cz>2020-10-05 16:18:24 +0200
committerTomas Krizek <tomas.krizek@nic.cz>2020-10-08 14:21:07 +0200
commit33bb066a8da186652ee32f09ac484e26d4b1452e (patch)
tree2c852714dab908bd618f5477be6ae88ddfc6c34b /distro
parentMerge branch 'doc-typo-fixes' into 'master' (diff)
downloadknot-resolver-33bb066a8da186652ee32f09ac484e26d4b1452e.tar.xz
knot-resolver-33bb066a8da186652ee32f09ac484e26d4b1452e.zip
distro/arch: remove upgrade script
Arch is a fast moving rolling release and users expect to upgrade their configs. The migration period over 6 months is certainly sufficient - remove this hard to read convoluted code.
Diffstat (limited to 'distro')
-rw-r--r--distro/arch/install40
1 files changed, 0 insertions, 40 deletions
diff --git a/distro/arch/install b/distro/arch/install
index 7bb1bbb1..31f9900f 100644
--- a/distro/arch/install
+++ b/distro/arch/install
@@ -5,46 +5,6 @@ post_install() {
chown -R root:knot-resolver /etc/knot-resolver
}
-pre_upgrade() {
- # upgrade from 4.x to 5.x - save socket interfaces before package uninstall
- if [ -f /usr/lib/systemd/system/kresd.socket ] ; then
- export UPG_DIR=/var/lib/knot-resolver/.upgrade-4-to-5
- mkdir -p ${UPG_DIR}
- touch ${UPG_DIR}/.unfinished
-
- for sock in kresd.socket kresd-tls.socket kresd-webmgmt.socket kresd-doh.socket ; do
- if systemctl is-enabled ${sock} 2>/dev/null | grep -qv masked ; then
- systemctl show ${sock} -p Listen > ${UPG_DIR}/${sock}
- case "$(systemctl show ${sock} -p BindIPv6Only)" in
- *ipv6-only)
- touch ${UPG_DIR}/${sock}.v6only
- ;;
- *default)
- if cat /proc/sys/net/ipv6/bindv6only | grep -q 1 ; then
- touch ${UPG_DIR}/${sock}.v6only
- fi
- ;;
- esac
- fi
- done
- fi
-}
-
-post_upgrade() {
- # upgrade from 4.x to 5.x - convert systemd socket configs to net.listen() format
- export UPG_DIR=/var/lib/knot-resolver/.upgrade-4-to-5
- if [ -f ${UPG_DIR}/.unfinished ] ; then
- rm -f ${UPG_DIR}/.unfinished
- kresd -c /usr/lib/knot-resolver/upgrade-4-to-5.lua &>/dev/null
- echo -e "\n !!! WARNING !!!"
- echo -e "Knot Resolver configuration file requires manual upgrade.\n"
- cat ${UPG_DIR}/kresd.conf.net 2>/dev/null
- fi
-
- chown -R root:knot-resolver /etc/knot-resolver
- chown -R root:knot-resolver /var/lib/knot-resolver
-}
-
post_remove() {
getent passwd knot-resolver &>/dev/null && userdel knot-resolver >/dev/null
getent group knot-resolver &>/dev/null && groupdel knot-resolver >/dev/null