summaryrefslogtreecommitdiff
path: root/network/radvd
diff options
context:
space:
mode:
authorRobby Workman <rworkman@slackbuilds.org>2013-06-11 17:46:20 -0500
committerNiels Horn <niels.horn@slackbuilds.org>2013-06-15 23:00:05 -0300
commit97b17aea081d7e613f5c7d8e26a83bfa900337e4 (patch)
treedf58ccecae4842a23d07cb6ab30287fba6dfd695 /network/radvd
parentc5027f3395fb5833b8b8d8eb5ffde43ffb48d420 (diff)
downloadslackbuilds-97b17aea081d7e613f5c7d8e26a83bfa900337e4.tar.gz
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>
Diffstat (limited to 'network/radvd')
-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 40d66dc47d..460d51c9c6 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 9fbc597893..a68c057eab 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
}