summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Robby Workman <rworkman@slackbuilds.org>2013-06-11 22:46:20 (GMT)
committer Niels Horn <niels.horn@slackbuilds.org>2013-06-16 02:00:05 (GMT)
commit97b17aea081d7e613f5c7d8e26a83bfa900337e4 (patch)
treedf58ccecae4842a23d07cb6ab30287fba6dfd695
parentc5027f3395fb5833b8b8d8eb5ffde43ffb48d420 (diff)
downloadslackbuilds-97b17aea081d7e613f5c7d8e26a83bfa900337e4.tar.gz
slackbuilds-97b17aea081d7e613f5c7d8e26a83bfa900337e4.tar.xz
network/radvd: Create piddir and chown before start()
Since the radvd daemon drops privileges when starting, and it doesn't write its pidfile until *after* dropping privs, it is unable to do so if /var/run/radvd does not already exist with daemon:daemon ownership. Even if this directory is created during packaging, there's no guarantee that it will persist, as /var/run on tmpfs is quite common these days (as that's how this problem was discovered here). Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
-rw-r--r--network/radvd/radvd.SlackBuild2
-rw-r--r--network/radvd/rc.radvd.new2
2 files changed, 3 insertions, 1 deletions
diff --git a/network/radvd/radvd.SlackBuild b/network/radvd/radvd.SlackBuild
index 40d66dc..460d51c 100644
--- a/network/radvd/radvd.SlackBuild
+++ b/network/radvd/radvd.SlackBuild
@@ -24,7 +24,7 @@
PRGNAM=radvd
VERSION=1.9.3
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
# Automatically determine the architecture we're building on:
diff --git a/network/radvd/rc.radvd.new b/network/radvd/rc.radvd.new
index 9fbc597..a68c057 100644
--- a/network/radvd/rc.radvd.new
+++ b/network/radvd/rc.radvd.new
@@ -13,6 +13,8 @@ radvd_start() {
if [ -x /usr/sbin/radvd ]; then
echo "Starting radvd..."
echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
+ mkdir -p /var/run/radvd
+ chown daemon:daemon /var/run/radvd
/usr/sbin/radvd -u daemon
fi
}