From owner-freebsd-ports-bugs@FreeBSD.ORG Sun Mar 10 08:20:00 2013 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 9AAA1248 for ; Sun, 10 Mar 2013 08:20:00 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 7EA091DE for ; Sun, 10 Mar 2013 08:20:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r2A8K01L081125 for ; Sun, 10 Mar 2013 08:20:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r2A8K03W081124; Sun, 10 Mar 2013 08:20:00 GMT (envelope-from gnats) Resent-Date: Sun, 10 Mar 2013 08:20:00 GMT Resent-Message-Id: <201303100820.r2A8K03W081124@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Yoann Gini Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id D01A7128 for ; Sun, 10 Mar 2013 08:10:43 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id A9E56188 for ; Sun, 10 Mar 2013 08:10:43 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.5/8.14.5) with ESMTP id r2A8AhKI041594 for ; Sun, 10 Mar 2013 08:10:43 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.5/8.14.5/Submit) id r2A8Ahts041593; Sun, 10 Mar 2013 08:10:43 GMT (envelope-from nobody) Message-Id: <201303100810.r2A8Ahts041593@red.freebsd.org> Date: Sun, 10 Mar 2013 08:10:43 GMT From: Yoann Gini To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: ports/176805: rc scripts provided with heimdal haven't a common FreeBSD implementation X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Mar 2013 08:20:00 -0000 >Number: 176805 >Category: ports >Synopsis: rc scripts provided with heimdal haven't a common FreeBSD implementation >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Mar 10 08:20:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Yoann Gini >Release: 9.1-RELEASE >Organization: iNig-Services >Environment: FreeBSD srv0.public.stardav.net 9.1-RELEASE FreeBSD 9.1-RELEASE #0: Thu Mar 7 19:30:04 CET 2013 root@srv0.public.stardav.net:/usr/obj/usr/src/sys/GENERIC_IPSEC amd64 >Description: The original kdc.sh.sample script provided to run a Heimdal KDC on FreeBSD isn't a "FreeBSD style" rc script. To be able to use it you need to edit the content of the rc script and your need to rename it. And in my case, the edited script work in command line but don't work to start service at load. I've rewrite the script to be compatible with the rc load system and split it in three parts, kdc, kpasswd and ipropd to stick to the original MIT KDC scripts. But it can be edited to be join in only one file but with less controls on service restart… I attach my scripts to this PR, feel free to use. >How-To-Repeat: >Fix: Patch attached with submission follows: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # heimdal_ipropd # heimdal_kdc # heimdal_kpasswdd # echo x - heimdal_ipropd sed 's/^X//' >heimdal_ipropd << '9ea9306d1448844f21cbc6a066ac3d4d' X#!/bin/sh X X# PROVIDE: heimdal_ipropd X# REQUIRE: NETWORKING heimdal_kdc heimdal_kpasswdd X X. /etc/rc.subr X Xname="heimdal_ipropd" Xrcvar="heimdal_ipropd_enable" X Xload_rc_config $name X XPREFIX="/usr/local" X Xcommand="${PREFIX}/libexec/ipropd" X Xstart_cmd="heimdal_ipropd_start" Xstop_cmd="heimdal_ipropd_stop" X X X Xheimdal_ipropd_start() X{ X case "${heimdal_kdc_role}" in X master) run_ipropd=1;; X X slave) run_ipropd=2;; X X *) echo "heimdal_kdc_role is not set." >&2 X exit 64 X ;; X esac X X echo -n "Staring Heimdal ipropd server" X X test "${run_ipropd}" -eq "1" && ${command}-master ${heimdal_ipropd_flags} & X test "${run_ipropd}" -eq "2" && ${command}-slave ${heimdal_ipropd_flags} & X} X Xheimdal_ipropd_stop() X{ X test -f "/var/run/ipropd.pid" && kill `cat /var/run/ipropd.pid` X} X Xrun_rc_command "$1" 9ea9306d1448844f21cbc6a066ac3d4d echo x - heimdal_kdc sed 's/^X//' >heimdal_kdc << 'dfe84c54b153460ba32771c85b815108' X#!/bin/sh X X# PROVIDE: heimdal_kdc X# REQUIRE: NETWORKING X X. /etc/rc.subr X Xname="heimdal_kdc" Xrcvar="heimdal_kdc_enable" X Xload_rc_config $name X XPREFIX="/usr/local" X Xcommand="${PREFIX}/libexec/kdc" X Xstart_cmd="heimdal_kdc_start" Xstop_cmd="heimdal_kdc_stop" X X X Xheimdal_kdc_start() X{ X case "${heimdal_kdc_role}" in X master) run_kdc=1;; X X slave) run_kdc=1;; X X *) echo "heimdal_kdc_role is not set." >&2 X exit 64 X ;; X esac X X echo -n "Staring Heimdal KDC server" X X test "${run_kdc}" -eq "1" && ${command} ${heimdal_kdc_flags} & X} X Xheimdal_kdc_stop() X{ X test -f "/var/run/kdc.pid" && kill `cat /var/run/kdc.pid` X} X Xrun_rc_command "$1" dfe84c54b153460ba32771c85b815108 echo x - heimdal_kpasswdd sed 's/^X//' >heimdal_kpasswdd << '27674d41edff5d20245f38701bdc2bed' X#!/bin/sh X X# PROVIDE: heimdal_kpasswdd X# REQUIRE: NETWORKING heimdal_kdc X X. /etc/rc.subr X Xname="heimdal_kpasswdd" Xrcvar="heimdal_kpasswdd_enable" X Xload_rc_config $name X XPREFIX="/usr/local" X Xcommand="${PREFIX}/libexec/kpasswdd" X Xstart_cmd="heimdal_kpasswdd_start" Xstop_cmd="heimdal_kpasswdd_stop" X X X Xheimdal_kpasswdd_start() X{ X case "${heimdal_kdc_role}" in X master) run_kpasswdd=1;; X X slave) run_kpasswdd=1;; X X *) echo "heimdal_kdc_role is not set." >&2 X exit 64 X ;; X esac X X echo -n "Staring Heimdal kpasswdd server" X X test "${run_kpasswdd}" -eq "1" && ${command} ${heimdal_kpasswdd_flags} & X} X Xheimdal_kpasswdd_stop() X{ X test -f "/var/run/kpasswdd.pid" && kill `cat /var/run/kpasswdd.pid` X} X Xrun_rc_command "$1" 27674d41edff5d20245f38701bdc2bed exit >Release-Note: >Audit-Trail: >Unformatted: