From owner-svn-ports-all@freebsd.org Wed Nov 20 21:16:15 2019 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 288721C1BF5; Wed, 20 Nov 2019 21:16:15 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47JFqM00lJz4LRm; Wed, 20 Nov 2019 21:16:15 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D2929ACF; Wed, 20 Nov 2019 21:16:14 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAKLGEv8049852; Wed, 20 Nov 2019 21:16:14 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAKLGEaf049850; Wed, 20 Nov 2019 21:16:14 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201911202116.xAKLGEaf049850@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 20 Nov 2019 21:16:14 +0000 (UTC) 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 X-SVN-Group: ports-head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in head/sysutils/am-utils: . files X-SVN-Commit-Revision: 518051 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Nov 2019 21:16:15 -0000 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"