Date: Sun, 10 Mar 2013 08:10:43 GMT From: Yoann Gini <yoann.gini@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/176805: rc scripts provided with heimdal haven't a common FreeBSD implementation Message-ID: <201303100810.r2A8Ahts041593@red.freebsd.org> Resent-Message-ID: <201303100820.r2A8K03W081124@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201303100810.r2A8Ahts041593>