diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2020-02-23 12:38:43 +0100 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2020-02-23 14:08:49 +0100 |
commit | a2ca4f04ab7820444b83cb61cb601d48a7f783f3 (patch) | |
tree | d21fd10e99bd1277df1025678ed8cc7aa1803085 /community | |
parent | db90812bc5546cf7db5414add6fd5e1f2d21a8e1 (diff) | |
download | aports-a2ca4f04ab7820444b83cb61cb601d48a7f783f3.tar.bz2 aports-a2ca4f04ab7820444b83cb61cb601d48a7f783f3.tar.xz |
community/knot-resolver: rename service knot-resolver to kresd
For consistency with upstream.
Diffstat (limited to 'community')
-rw-r--r-- | community/knot-resolver/APKBUILD | 18 | ||||
-rw-r--r-- | community/knot-resolver/knot-resolver-openrc.post-upgrade | 24 | ||||
-rw-r--r-- | community/knot-resolver/knot-resolver-openrc.pre-upgrade | 11 | ||||
-rw-r--r-- | community/knot-resolver/kres-cache-gc.confd | 2 | ||||
-rw-r--r-- | community/knot-resolver/kres-cache-gc.initd | 4 | ||||
-rw-r--r-- | community/knot-resolver/kresd.confd (renamed from community/knot-resolver/knot-resolver.confd) | 2 | ||||
-rw-r--r-- | community/knot-resolver/kresd.initd (renamed from community/knot-resolver/knot-resolver.initd) | 0 |
7 files changed, 48 insertions, 13 deletions
diff --git a/community/knot-resolver/APKBUILD b/community/knot-resolver/APKBUILD index 66897ee1ea..d48bf7e9b8 100644 --- a/community/knot-resolver/APKBUILD +++ b/community/knot-resolver/APKBUILD @@ -36,7 +36,7 @@ makedepends=" py3-flake8 " checkdepends="cmocka-dev" -install="$pkgname.pre-install" +install="$pkgname.pre-install $pkgname-openrc.pre-upgrade $pkgname-openrc.post-upgrade" subpackages=" $pkgname-mod-http:http:noarch $pkgname-mod-dnstap:dnstap @@ -48,8 +48,8 @@ subpackages=" " source="https://secure.nic.cz/files/$pkgname/$pkgname-$pkgver.tar.xz $pkgname.logrotate - $pkgname.confd - $pkgname.initd + kresd.confd + kresd.initd kres-cache-gc.initd kres-cache-gc.confd " @@ -98,8 +98,8 @@ package() { rm ./usr/lib/knot-resolver/distro-preconfig.lua rm ./usr/lib/knot-resolver/upgrade-4-to-5.lua - install -m 755 -D "$srcdir"/$pkgname.initd ./etc/init.d/$pkgname - install -m 644 -D "$srcdir"/$pkgname.confd ./etc/conf.d/$pkgname + install -m 755 -D "$srcdir"/kresd.initd ./etc/init.d/kresd + install -m 644 -D "$srcdir"/kresd.confd ./etc/conf.d/kresd install -m 755 -D "$srcdir"/kres-cache-gc.initd ./etc/init.d/kres-cache-gc install -m 644 -D "$srcdir"/kres-cache-gc.confd ./etc/conf.d/kres-cache-gc install -m 644 -D "$srcdir"/$pkgname.logrotate ./etc/logrotate.d/$pkgname @@ -136,7 +136,7 @@ gpgfingerprints=" sha512sums="9d5d77d3aff082d5f0132b39627fff5cd7af6e237ded219b7b8f2156de7acacb3bf94d5e278af4bb2c9e36ea80d9259d39ba33a18bb37a626a57c70fb9dc0931 knot-resolver-5.0.1.tar.xz 688aeacb0c1f21c7e532533b402e67068897217713fb668636df7533000b493981ddfa0497f8dba7da7c804ee4ab8d587a4f52155b4e2bf1f4025d2588d314bb knot-resolver.logrotate -653bf15f07047ec72913f571bc283c76adc6bc5444c1d01524ec79fc891ec7e4022bee267ef8e83f03fd8dbccb6d5e73530acfd3987cb5571cab4c402741d189 knot-resolver.confd -79e1a7c003e13fecad5b68935c23554c735fee65fde93a4460c0562486af0656bac01c624cabdcd12e6f41c7b6414c2724a59f7447ddb7aa583d46df5814081e knot-resolver.initd -569cbe40de039b86ffc55a1633029517cda8bd26fc4e3b267796160c40b0647c2abc0eab8090e95659ce3c143f73e2c997f5c10d5b0f47c73079d622b211d3d7 kres-cache-gc.initd -be54a2b1e6031262f8aeed050a6e31fe8fea8c937fa5bc0c3b3ff67c7577fa8ba2bfd5a711f6499eb0668522b0b268c707a9fa0035292d0f9c040b96587ffcaf kres-cache-gc.confd" +9c23d035ec1acedb3d946d25a55a85f13a57fc96ed2164aae9613f27e175d81b82615e88e797dff4378115eacaa497a36723fc36a1d417006e3766520bcd674e kresd.confd +79e1a7c003e13fecad5b68935c23554c735fee65fde93a4460c0562486af0656bac01c624cabdcd12e6f41c7b6414c2724a59f7447ddb7aa583d46df5814081e kresd.initd +a1e4af78ad8df36feb41619ac63aa8505cb68b434a3e01c8929f69759f5a6abe9667a6d5738928ff67daaccab58e5fecd49ce4ff439674f1e073982042a907fd kres-cache-gc.initd +ad017f54aaa214862a67c8242efe9fa56dc66a8ac0012cc0f4eb981d6fd631b250378602f8f5af9916fff071d9a60d1e588e07458f8d891d19787c3b5d48cdb5 kres-cache-gc.confd" diff --git a/community/knot-resolver/knot-resolver-openrc.post-upgrade b/community/knot-resolver/knot-resolver-openrc.post-upgrade new file mode 100644 index 0000000000..d7013040f2 --- /dev/null +++ b/community/knot-resolver/knot-resolver-openrc.post-upgrade @@ -0,0 +1,24 @@ +#!/bin/sh + +ver_new="$1" +ver_old="$2" + +if [ "$(apk version -t "$ver_old" "5.0.1-r0")" = "<" ]; then + cat >&2 <<-EOF + * + * Service knot-resolver was renamed to kresd. + * Fixing runlevels for you... + * + EOF + + for path in $(find /etc/runlevels -type l -name knot-resolver); do + rm "$path" + ln -s /etc/init.d/kresd "${path%/*}/kresd" + done + if [ -f /run/knot-resolver.pid ] && ! [ -f /run/kresd.pid ]; then + mv /run/knot-resolver.pid /run/kresd.pid + fi + + # We've already copied it to kresd in pre-upgrade script. + rm -f /etc/conf.d/knot-resolver +fi diff --git a/community/knot-resolver/knot-resolver-openrc.pre-upgrade b/community/knot-resolver/knot-resolver-openrc.pre-upgrade new file mode 100644 index 0000000000..acfe8099df --- /dev/null +++ b/community/knot-resolver/knot-resolver-openrc.pre-upgrade @@ -0,0 +1,11 @@ +#!/bin/sh + +ver_new="$1" +ver_old="$2" + +if [ "$(apk version -t "$ver_old" "5.0.1-r0")" = '<' ]; then + # Copy /etc/conf.d/knot-resolver to kresd *if* it was modified by user. + if apk audit -q /etc/conf.d | grep -q knot-resolver && ! [ -f /etc/conf.d/kresd ]; then + cp -a /etc/conf.d/knot-resolver /etc/conf.d/kresd + fi +fi diff --git a/community/knot-resolver/kres-cache-gc.confd b/community/knot-resolver/kres-cache-gc.confd index 85056accf4..697d23d368 100644 --- a/community/knot-resolver/kres-cache-gc.confd +++ b/community/knot-resolver/kres-cache-gc.confd @@ -4,7 +4,7 @@ #garbage_interval=1000 # Path to directory with knot resolver's cache. -# If not specified, it tries to get it from /etc/conf.d/knot-resolver and if +# If not specified, it tries to get it from /etc/conf.d/kresd and if # it's not even there, defaults to /var/cache/knot-resolver. #cachedir= diff --git a/community/knot-resolver/kres-cache-gc.initd b/community/knot-resolver/kres-cache-gc.initd index 643186b649..faa64426da 100644 --- a/community/knot-resolver/kres-cache-gc.initd +++ b/community/knot-resolver/kres-cache-gc.initd @@ -13,8 +13,8 @@ pidfile="/run/$RC_SVCNAME.pid" start_stop_daemon_args="--wait $wait" start_pre() { - if [ -z "$cachedir" ] && [ -e /etc/conf.d/knot-resolver ]; then - cachedir=$(. /etc/conf.d/knot-resolver; echo "$cachedir") + if [ -z "$cachedir" ] && [ -e /etc/conf.d/kresd ]; then + cachedir=$(. /etc/conf.d/kresd; echo "$cachedir") fi : ${cachedir:="/var/cache/knot-resolver"} diff --git a/community/knot-resolver/knot-resolver.confd b/community/knot-resolver/kresd.confd index 27ff09a292..3bef12c771 100644 --- a/community/knot-resolver/knot-resolver.confd +++ b/community/knot-resolver/kresd.confd @@ -1,4 +1,4 @@ -# Config file for /etc/init.d/knot-resolver +# Configuration for /etc/init.d/kresd # Config file path. #cfgfile="/etc/knot-resolver/kresd.conf" diff --git a/community/knot-resolver/knot-resolver.initd b/community/knot-resolver/kresd.initd index 6f3db68264..6f3db68264 100644 --- a/community/knot-resolver/knot-resolver.initd +++ b/community/knot-resolver/kresd.initd |