commit:     a5dcfd414cf53fe80df074b7cc2930bbc60e7398
Author:     Giuseppe Foti <foti.giuseppe <AT> gmail <DOT> com>
AuthorDate: Sun Oct  8 07:05:37 2023 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Mon Oct  9 10:54:10 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a5dcfd41

net-analyzer/gsad: fix OpenRC init script

On first run the log file was created by root and was unwritable to gvm

Signed-off-by: Giuseppe Foti <foti.giuseppe <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/33243
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 net-analyzer/gsad/files/gsad-22.init                            | 6 +++++-
 net-analyzer/gsad/{gsad-22.6.0.ebuild => gsad-22.6.0-r1.ebuild} | 0
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/net-analyzer/gsad/files/gsad-22.init 
b/net-analyzer/gsad/files/gsad-22.init
index aae78b2e1ab8..a17f2dc1c084 100644
--- a/net-analyzer/gsad/files/gsad-22.init
+++ b/net-analyzer/gsad/files/gsad-22.init
@@ -3,6 +3,7 @@
 # Distributed under the terms of the GNU General Public License v2
 
 : ${GSAD_USER:=gvm}
+: ${GSAD_GROUP:=gvm}
 : ${GSAD_TIMEOUT:=30}
 : ${GSAD_PIDFILE:="/run/gsad/gsad.pid"}
 
@@ -21,6 +22,10 @@ start_pre() {
         checkpath -d --mode 0755 --owner root /run/gsad
 }
 
+start_post() {
+        checkpath -f --mode 0644 --owner "${GSAD_USER}:${GSAD_GROUP}" 
/var/log/gvm/gsad.log
+}
+
 stop_post() {
        if [ -f "${GSAD_PIDFILE}" ]; then
                ebegin "Removing PID file"
@@ -28,4 +33,3 @@ stop_post() {
                eend $?
        fi
 }
-

diff --git a/net-analyzer/gsad/gsad-22.6.0.ebuild 
b/net-analyzer/gsad/gsad-22.6.0-r1.ebuild
similarity index 100%
rename from net-analyzer/gsad/gsad-22.6.0.ebuild
rename to net-analyzer/gsad/gsad-22.6.0-r1.ebuild

Reply via email to