rc.d/kdc: Support start of MIT krb5kdc

Some users wishing to use the MIT krb5kdc have discovered the
kdc script workaround applied to the MIT krb5 ports is insufficient.
Let's build into this rc script the smarts to determine whether
base or ports Hiemdal kdc is being invoked or the MIT krb5kdc.

While at it, remove kdc_start_precmd(). This will simplify a future
jail patch.

Suggested by:		netchild
Original patch:		netchild
Reviewed by:		emaste, netchild
MFC after:		1 week
Differential Revision:	https://reviews.freebsd.org/D43523
This commit is contained in:
Cy Schubert 2024-01-20 05:52:35 -08:00
parent bf531bcc5f
commit 91f78c32be

View file

@ -12,17 +12,15 @@
name=kdc
desc="Kerberos 5 server"
rcvar=${name}_enable
start_precmd=${name}_start_precmd
set_rcvar_obsolete kerberos5_server_enable kdc_enable
set_rcvar_obsolete kerberos5_server kdc_program
set_rcvar_obsolete kerberos5_server_flags kdc_flags
kdc_start_precmd()
{
command_args="$command_args --detach"
}
load_rc_config $name
if [ "${kdc_program}" = /usr/libexec/kdc -o \
"${kdc_program}" = /usr/local/libexec/kdc ]; then
command_args="$command_args --detach"
fi
run_rc_command "$1"