aboutsummaryrefslogtreecommitdiff
path: root/network
diff options
context:
space:
mode:
authorBadchay <badchay@protonmail.com>2022-11-12 11:15:02 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-11-12 11:15:02 +0700
commitebb382ba077e712e935abde33254166587cdfad7 (patch)
tree1f4193a5b214b3ae763aea910046d12f33218be1 /network
parent6533958a9588710114031ff7152edba83a8796a4 (diff)
network/unbound: Fix build.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network')
-rw-r--r--network/unbound/doinst.sh24
-rw-r--r--network/unbound/unbound.SlackBuild3
2 files changed, 10 insertions, 17 deletions
diff --git a/network/unbound/doinst.sh b/network/unbound/doinst.sh
index f7243783f544..9e3a986fd909 100644
--- a/network/unbound/doinst.sh
+++ b/network/unbound/doinst.sh
@@ -26,20 +26,12 @@ preserve_perms etc/rc.d/rc.unbound.new
config etc/unbound/unbound.conf.new
config etc/logrotate.d/unbound.new
-# MD5SUM d837bf4c42abb7048c90d720a579f829 is a file hash from the previous initscript.
-
-if [ $(md5sum /etc/rc.d/rc.unbound | cut -f 1 -d " ") == "d837bf4c42abb7048c90d720a579f829" ]
-then
- echo ""
- echo "Warning! Red Hat style init script detected at /etc/rc.d/rc.unbound !"
- echo "It's likely from your previous Unbound installation."
- echo "The init script will probably work just fine but the script has since been rewritten"
- echo "as of Unbound version 1.16.2 and it's no longer supported by this SlackBuild."
- echo ""
- echo "Simply run the following commands to install the new Unbound init script:"
- echo "# cd /etc/rc.d && mv rc.unbound.new rc.unbound"
- echo ""
- echo "...or if you use slackpkg:"
- echo "# slackpkg new-config"
- echo ""
+if [ -r /etc/logrotate.d/unbound ] && [ $(stat -c "%U:%G" "/etc/logrotate.d/unbound") != "root:root" ]; then
+ echo "Incorrect permissions detected on /etc/logrotate.d/unbound !"
+ echo "This will prevent Unbound logrotate script from working."
+ echo ""
+ echo "Previous Unbound SlackBuild scripts didn't set this correctly."
+ echo ""
+ echo "To fix it, simply run:"
+ echo "# chown root:root /etc/logrotate.d/unbound"
fi
diff --git a/network/unbound/unbound.SlackBuild b/network/unbound/unbound.SlackBuild
index 21e073482c5b..0845c98a051b 100644
--- a/network/unbound/unbound.SlackBuild
+++ b/network/unbound/unbound.SlackBuild
@@ -28,7 +28,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=unbound
VERSION=${VERSION:-1.17.0}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -162,6 +162,7 @@ chown $UB_USER:$UB_GROUP $PKG/var/run/unbound/
chown $UB_USER:$UB_GROUP $PKG/var/log/unbound/
cp -a $CWD/unbound.logrotate $PKG/etc/logrotate.d/unbound.new
+chown root:root $PKG/etc/logrotate.d/unbound.new
mv $PKG/etc/unbound/unbound.conf $PKG/etc/unbound/unbound.conf.new
install -m 0644 -D $CWD/rc.unbound $PKG/etc/rc.d/rc.unbound.new