diff options
author | hrs <hrs@FreeBSD.org> | 2014-09-16 13:53:10 +0800 |
---|---|---|
committer | hrs <hrs@FreeBSD.org> | 2014-09-16 13:53:10 +0800 |
commit | d2fe354fa64491428de197a6f948ec67213ccd70 (patch) | |
tree | 9bd65f98b48af554e5a5006db4787dbd08c7f88b /security | |
parent | bf3231fdf0a9d9654d0bf64f812db5113d0c1a55 (diff) | |
download | freebsd-ports-gnome-d2fe354fa64491428de197a6f948ec67213ccd70.tar.gz freebsd-ports-gnome-d2fe354fa64491428de197a6f948ec67213ccd70.tar.zst freebsd-ports-gnome-d2fe354fa64491428de197a6f948ec67213ccd70.zip |
Add ipropd_master and ipropd_slave rc.d scripts for branches which do not
have them.
PR: 176805
Diffstat (limited to 'security')
-rw-r--r-- | security/heimdal/Makefile | 5 | ||||
-rw-r--r-- | security/heimdal/files/ipropd_master.in | 48 | ||||
-rw-r--r-- | security/heimdal/files/ipropd_slave.in | 40 |
3 files changed, 92 insertions, 1 deletions
diff --git a/security/heimdal/Makefile b/security/heimdal/Makefile index f7b821f0b552..82f2f00721fb 100644 --- a/security/heimdal/Makefile +++ b/security/heimdal/Makefile @@ -3,7 +3,7 @@ PORTNAME= heimdal PORTVERSION= 1.5.2 -PORTREVISION= 15 +PORTREVISION= 16 CATEGORIES= security ipv6 MASTER_SITES= http://www.h5l.org/dist/src/ \ http://ftp.pdc.kth.se/pub/heimdal/src/ \ @@ -38,6 +38,9 @@ CONFIGURE_ARGS= --with-libintl \ --with-hdbdir="/var/${PORTNAME}" \ --sysconfdir="${PREFIX}/etc" MAKE_ENV= INSTALL_CATPAGES=no +.if !exists(/etc/rc.d/ipropd_master) +USE_RC_SUBR= ipropd_master ipropd_slave +.endif INFO= heimdal hx509 diff --git a/security/heimdal/files/ipropd_master.in b/security/heimdal/files/ipropd_master.in new file mode 100644 index 000000000000..293c79a997a3 --- /dev/null +++ b/security/heimdal/files/ipropd_master.in @@ -0,0 +1,48 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: ipropd_master +# REQUIRE: kerberos +# KEYWORD: shutdown + +# ipropd_master_keytab: +# Keytab file for iprop service. +# ipropd_master_slaves: +# A list of slave nodes (hostname). + +. /etc/rc.subr + +name=ipropd_master +rcvar=${name}_enable +: ${ipropd_master_enable:=NO} +: ${ipropd_master_program:=%%PREFIX%%/libexec/ipropd-master} +: ${ipropd_master_keytab:="/etc/krb5.keytab"} +required_files="$ipropd_master_keytab" +start_precmd=${name}_start_precmd +start_postcmd=${name}_start_postcmd + +ipropd_master_start_precmd() +{ + + if [ -z "$ipropd_master_slaves" ]; then + warn "\$ipropd_master_slaves is empty." + return 1 + fi + for _slave in $ipropd_master_slaves; do + echo $_slave + done > /var/heimdal/slaves || return 1 + command_args="$command_args \ + --keytab=\"$ipropd_master_keytab\" \ + --detach \ + " +} +ipropd_master_start_postcmd() +{ + + echo "${name}: slave nodes: $ipropd_master_slaves" +} + +load_rc_config $name +run_rc_command "$1" diff --git a/security/heimdal/files/ipropd_slave.in b/security/heimdal/files/ipropd_slave.in new file mode 100644 index 000000000000..a3fd46e30978 --- /dev/null +++ b/security/heimdal/files/ipropd_slave.in @@ -0,0 +1,40 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: ipropd_slave +# REQUIRE: kerberos +# KEYWORD: shutdown + +# ipropd_slave_keytab: +# Keytab file for iprop service. +# ipropd_slave_master: +# Hostname of the master node. + +. /etc/rc.subr + +name=ipropd_slave +rcvar=${name}_enable +: ${ipropd_slave_enable:=NO} +: ${ipropd_slave_program:=%%PREFIX%%/libexec/ipropd-slave} +: ${ipropd_slave_keytab:="/etc/krb5.keytab"} +required_files="$ipropd_slave_keytab" +start_precmd=${name}_start_precmd + +ipropd_slave_start_precmd() +{ + + if [ -z "$ipropd_slave_master" ]; then + warn "\$ipropd_slave_master is empty." + return 1 + fi + command_args=" \ + $command_args \ + --keytab=\"$ipropd_slave_keytab\" \ + --detach \ + $ipropd_slave_master" +} + +load_rc_config $name +run_rc_command "$1" |