On 1/29/23 17:12, A Tammy wrote:
On 1/29/23 09:58, Volker Schlecht wrote:
Adds a simple rc script to run a system-wide instance of epmd, under a
non-privileged user id and listening on localhost only by default.
needs rc_reload=NO
Fixed diff attached.
Since there's no configuration that could be reloaded, why's that important?
Index: Makefile
===================================================================
RCS file: /cvs/ports/lang/erlang/25/Makefile,v
retrieving revision 1.9
diff -u -p -r1.9 Makefile
--- Makefile 18 Jan 2023 09:31:52 -0000 1.9
+++ Makefile 29 Jan 2023 16:22:45 -0000
@@ -11,7 +11,7 @@ PKGNAME-main= erlang-$V
PKGNAME-wx= erlang-wx-$V
EPOCH= 0
-REVISION-main= 1
+REVISION-main= 2
REVISION-wx= 1
VERSION_SPEC= >=25v0,<26v0
Index: pkg/PLIST-main
===================================================================
RCS file: /cvs/ports/lang/erlang/25/pkg/PLIST-main,v
retrieving revision 1.4
diff -u -p -r1.4 PLIST-main
--- pkg/PLIST-main 16 Jan 2023 18:27:30 -0000 1.4
+++ pkg/PLIST-main 29 Jan 2023 16:22:46 -0000
@@ -1,3 +1,6 @@
+@newgroup _erlang:888
+@newuser _erlang:888:_erlang::Erlang Account:/var/empty:/sbin/nologin
+@rcscript ${RCDIR}/epmd
@option no-default-conflict
@option is-branch
@conflict erlang-wx->=25,<25.1.2
Index: pkg/epmd.rc
===================================================================
RCS file: pkg/epmd.rc
diff -N pkg/epmd.rc
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ pkg/epmd.rc 29 Jan 2023 16:22:46 -0000
@@ -0,0 +1,11 @@
+#!/bin/ksh
+
+daemon="${TRUEPREFIX}/bin/epmd${MAJ_V} -daemon"
+daemon_flags="-address 127.0.0.1"
+daemon_user=_erlang
+
+. /etc/rc.d/rc.subr
+
+rc_reload=NO
+
+rc_cmd $1