diff options
Diffstat (limited to 'lang/erlang')
-rw-r--r-- | lang/erlang/Makefile | 5 | ||||
-rw-r--r-- | lang/erlang/files/epmd.in | 24 |
2 files changed, 23 insertions, 6 deletions
diff --git a/lang/erlang/Makefile b/lang/erlang/Makefile index 0136bd7d1fcc..324e1807ff1c 100644 --- a/lang/erlang/Makefile +++ b/lang/erlang/Makefile @@ -1,7 +1,7 @@ PORTNAME= erlang DISTVERSIONPREFIX= OTP- DISTVERSION= 26.2.5.12 -PORTREVISION= 1 +PORTREVISION= 2 PORTEPOCH= 4 CATEGORIES= lang parallel java DIST_SUBDIR= erlang @@ -38,6 +38,9 @@ SUB_LIST= _TOOLS_VSN=${_TOOLS_VSN} WRKSRC= ${WRKSRC_otp} +USERS= beam +GROUPS= beam + _EI_VSN= 5.5.1 _SNMP_VSN= 5.15 _TOOLS_VSN= 3.6 diff --git a/lang/erlang/files/epmd.in b/lang/erlang/files/epmd.in index 15bf2c1bf1ae..1c9dc45c45bc 100644 --- a/lang/erlang/files/epmd.in +++ b/lang/erlang/files/epmd.in @@ -8,7 +8,7 @@ # epmd_enable="YES" # # Configure optional flags with: -# epmd_flags="-address 127.0.0.1" +# epmd_opts="-address 127.0.0.1" . /etc/rc.subr @@ -18,10 +18,24 @@ rcvar=epmd_enable load_rc_config ${name} : ${epmd_enable="NO"} -: ${epmd_flags:-""} +: ${epmd_opts:-""} +: ${epmd_user="beam"} -procname=%%PREFIX%%/bin/epmd -start_cmd="%%PREFIX%%/bin/epmd -daemon ${epmd_flags}" -stop_cmd="%%PREFIX%%/bin/epmd -kill >/dev/null" +procname="daemon" +pidfile="/var/run/epmd/epmd.pid" +command="/usr/sbin/daemon" +command_args="-f -r -P ${pidfile} %%PREFIX%%/bin/epmd ${epmd_opts}" +command_user="${epmd_user}" + +start_precmd="epmd_precmd" + +epmd_precmd() +{ + if [ ! -d "/var/run/epmd" ]; then + install -d -o ${epmd_user} -g ${epmd_user} /var/run/epmd + fi + # Ensure beam user can write pidfile + install -m 644 -g ${epmd_user} -o ${epmd_user} /dev/null ${pidfile} +} run_rc_command "$1" |