diff options
| -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" |
