Date: Wed, 20 Nov 2019 21:16:14 +0000 (UTC) From: Cy Schubert <cy@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r518051 - in head/sysutils/am-utils: . files Message-ID: <201911202116.xAKLGEaf049850@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: cy Date: Wed Nov 20 21:16:14 2019 New Revision: 518051 URL: https://svnweb.freebsd.org/changeset/ports/518051 Log: Add rc.d support, stealing the rc.d file from base. MFH: 2019Q4 Added: head/sysutils/am-utils/files/amd.in (contents, props changed) Modified: head/sysutils/am-utils/Makefile Modified: head/sysutils/am-utils/Makefile ============================================================================== --- head/sysutils/am-utils/Makefile Wed Nov 20 21:08:26 2019 (r518050) +++ head/sysutils/am-utils/Makefile Wed Nov 20 21:16:14 2019 (r518051) @@ -3,7 +3,7 @@ PORTNAME= am-utils PORTVERSION= 6.2 -PORTREVISION= 4 +PORTREVISION= 5 PORTEPOCH= 1 CATEGORIES= sysutils net MASTER_SITES= ftp://ftp.am-utils.org/pub/am-utils/ \ @@ -42,6 +42,8 @@ OPENLDAP_CONFIGURE_WITH= ldap OPENLDAP_PORTDOCS= README.ldap ldap-id.txt ldap.schema OPTIONS_SUB= yes + +USE_RC_SUBR= amd post-patch: @${RM} ${WRKSRC}/doc/am-utils.info* Added: head/sysutils/am-utils/files/amd.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/am-utils/files/amd.in Wed Nov 20 21:16:14 2019 (r518051) @@ -0,0 +1,50 @@ +#!/bin/sh +# +# $FreeBSD$ +# Obtained from: FreeBSD: head/libexec/rc/rc.d/amd 298514 2016-04-23 16:10:54Z lme +# + +# PROVIDE: amd +# REQUIRE: rpcbind ypset nfsclient FILESYSTEMS ldconfig +# BEFORE: DAEMON +# KEYWORD: nojail shutdown + +. /etc/rc.subr + +name="amd" +desc="Automatically mount filesystems" +rcvar="amd_enable" +command="/usr/sbin/${name}" +start_precmd="amd_precmd" +command_args="&" +extra_commands="reload" + +amd_precmd() +{ + force_depend nfsclient nfs_client || return 1 + force_depend rpcbind || return 1 + + case ${amd_map_program} in + [Nn][Oo] | '') + ;; + *) + rc_flags="${rc_flags} `echo $(eval ${amd_map_program})`" + ;; + esac + + case "${amd_flags}" in + '') + if [ ! -r /etc/amd.conf ]; then + warn 'amd will not load without arguments' + return 1 + fi + ;; + *) + rc_flags="-p ${rc_flags}" + command_args="> /var/run/amd.pid 2> /dev/null" + ;; + esac +} + +load_rc_config $name +run_rc_command "$1"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201911202116.xAKLGEaf049850>