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.
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 14:49: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 14:49: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 14:49:46 -0000
@@ -0,0 +1,9 @@
+#!/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_cmd $1

Reply via email to