summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlarig Le Lay <alarig@swordarmor.fr>2023-03-12 01:37:14 +0100
committerJoonas Niilola <juippis@gentoo.org>2023-03-12 10:36:10 +0200
commit3bff7b72a68e95bdf2755fd49433dc1294915c80 (patch)
tree6e8b67bf71d245a05f24ee033c69a440f99a564f
parentdev-tcltk/tdom: stat64 check is allowed (diff)
downloadgentoo-3bff7b72a68e95bdf2755fd49433dc1294915c80.tar.gz
gentoo-3bff7b72a68e95bdf2755fd49433dc1294915c80.tar.bz2
gentoo-3bff7b72a68e95bdf2755fd49433dc1294915c80.zip
net-misc/bird: fixes for the initrd script
Fixes for the initrd script (can’t check conf with a restricted socket anymore, and unix rights fixes while not running as root) Bug: https://bugs.gentoo.org/900723 Signed-off-by: Alarig Le Lay <alarig@swordarmor.fr> Closes: https://github.com/gentoo/gentoo/pull/30065 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
-rw-r--r--net-misc/bird/bird-2.0.12.ebuild2
-rw-r--r--net-misc/bird/files/initd-bird-214
2 files changed, 9 insertions, 7 deletions
diff --git a/net-misc/bird/bird-2.0.12.ebuild b/net-misc/bird/bird-2.0.12.ebuild
index 043f67e052c9..ced3b211938d 100644
--- a/net-misc/bird/bird-2.0.12.ebuild
+++ b/net-misc/bird/bird-2.0.12.ebuild
@@ -11,7 +11,7 @@ SRC_URI="ftp://bird.network.cz/pub/${PN}/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="~amd64 ~arm64 ~x86 ~x64-macos"
+KEYWORDS="amd64 ~arm64 ~x86 ~x64-macos"
IUSE="+client custom-cflags debug libssh"
RDEPEND="
diff --git a/net-misc/bird/files/initd-bird-2 b/net-misc/bird/files/initd-bird-2
index 3b759df883d8..fc4908990c20 100644
--- a/net-misc/bird/files/initd-bird-2
+++ b/net-misc/bird/files/initd-bird-2
@@ -5,13 +5,12 @@
extra_started_commands="reload"
-pidfile="/run/${RC_SVCNAME}.pid"
+pidfile="/run/${RC_SVCNAME}/${RC_SVCNAME}.pid"
command="/usr/sbin/${RC_SVCNAME}"
retry=15
-start_stop_daemon_args="--make-pidfile"
CONF_FILE="/etc/${RC_SVCNAME}.conf"
-SOCK="/run/${RC_SVCNAME}.ctl"
+SOCK="/run/${RC_SVCNAME}/${RC_SVCNAME}.ctl"
if [ ${BIRD_GROUP} ]; then
BIRD_OPTS="${BIRD_OPTS} -g ${BIRD_GROUP}"
@@ -22,10 +21,9 @@ fi
client_args="-s ${SOCK}"
command_args="${client_args} -c ${CONF_FILE} -P ${pidfile} ${BIRD_OPTS}"
-client_args="${client_args} -r"
depend() {
- need net
+ use net
use logger
}
@@ -52,8 +50,12 @@ reload() {
eend $?
}
+start_pre() {
+ checkpath -d -m 0755 -o bird:bird "/run/${RC_SVCNAME}"
+}
+
start_post() {
- checkpath -f -m 0655 -o bird:bird "${pidfile}"
+ ln -sf "${SOCK}" /run
}
stop_pre() {