- some init script cleanups
- drop unquoted check and silent exit for "$NETWORKING" (#426852, #242500) - krb524: don't barf on missing database if it looks like we're using kldap, same as for kadmin - return non-zero status for missing files which cause startup to fail
This commit is contained in:
parent
0aaa920daa
commit
f072055a76
10
kadmind.init
10
kadmind.init
@ -14,9 +14,6 @@
|
||||
# Get config.
|
||||
. /etc/sysconfig/network
|
||||
|
||||
# Check that networking is up.
|
||||
[ ${NETWORKING} = "no" ] && exit 0
|
||||
|
||||
# Get config.
|
||||
[ -r /etc/sysconfig/kadmin ] && . /etc/sysconfig/kadmin
|
||||
|
||||
@ -34,13 +31,14 @@ start() {
|
||||
# then we don't know for sure that this is an error.
|
||||
if ! grep -q 'db_library.*=.*kldap' /etc/krb5.conf ; then
|
||||
echo $"Error. Default principal database does not exist."
|
||||
exit 0
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
if [ -f /var/kerberos/krb5kdc/kpropd.acl ] ; then
|
||||
echo $"Error. This appears to be a slave server, found kpropd.acl"
|
||||
exit 0
|
||||
exit 6
|
||||
else
|
||||
[ -x $kadmind ] || exit 5
|
||||
if [ ! -f /var/kerberos/krb5kdc/kadm5.keytab ] ; then
|
||||
echo -n $"Extracting kadm5 Service Keys: "
|
||||
# This should always work.
|
||||
@ -97,7 +95,7 @@ case "$1" in
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $0 {start|stop|status|condrestart|reload|restart}"
|
||||
RETVAL=1
|
||||
RETVAL=2
|
||||
;;
|
||||
esac
|
||||
|
||||
|
12
kpropd.init
12
kpropd.init
@ -12,9 +12,6 @@
|
||||
# Get config.
|
||||
. /etc/sysconfig/network
|
||||
|
||||
# Check that networking is up.
|
||||
[ ${NETWORKING} = "no" ] && exit 0
|
||||
|
||||
# Source function library.
|
||||
. /etc/init.d/functions
|
||||
|
||||
@ -22,11 +19,10 @@ RETVAL=0
|
||||
prog="Kerberos 5 Propagation Server"
|
||||
kpropd=/usr/kerberos/sbin/kpropd
|
||||
|
||||
# Sheel functions to cut down on useless shell instances.
|
||||
# Shell functions to cut down on useless shell instances.
|
||||
start() {
|
||||
if [ ! -f /var/kerberos/krb5kdc/kpropd.acl ] ; then
|
||||
exit 0
|
||||
fi
|
||||
[ -f /var/kerberos/krb5kdc/kpropd.acl ] || exit 6
|
||||
[ -x $kpropd ] || exit 5
|
||||
echo -n $"Starting $prog: "
|
||||
daemon ${kpropd} -S
|
||||
RETVAL=$?
|
||||
@ -65,7 +61,7 @@ case "$1" in
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $0 {start|stop|status|restart|condrestart}"
|
||||
RETVAL=1
|
||||
RETVAL=2
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -222,6 +222,13 @@ to obtain initial credentials from a KDC using a private key and a
|
||||
certificate.
|
||||
|
||||
%changelog
|
||||
* Wed Jan 2 2007 Nalin Dahyabhai <nalin@redhat.com> 1.6.3-4
|
||||
- some init script cleanups
|
||||
- drop unquoted check and silent exit for "$NETWORKING" (#426852, #242500)
|
||||
- krb524: don't barf on missing database if it looks like we're using kldap,
|
||||
same as for kadmin
|
||||
- return non-zero status for missing files which cause startup to fail
|
||||
|
||||
* Tue Dec 18 2007 Nalin Dahyabhai <nalin@redhat.com> 1.6.3-3
|
||||
- allocate space for the nul-terminator in the local pathname when looking up
|
||||
a file context, and properly free a previous context (Jose Plans, #426085)
|
||||
|
13
krb524d.init
13
krb524d.init
@ -13,9 +13,6 @@
|
||||
# Get config.
|
||||
. /etc/sysconfig/network
|
||||
|
||||
# Check that networking is up.
|
||||
[ ${NETWORKING} = "no" ] && exit 0
|
||||
|
||||
# Get config.
|
||||
[ -r /etc/sysconfig/krb524 ] && . /etc/sysconfig/krb524
|
||||
|
||||
@ -29,8 +26,14 @@ krb524d=/usr/kerberos/sbin/krb524d
|
||||
# Shell functions to cut down on unnecessary shell invocations.
|
||||
start() {
|
||||
if [ ! -f /var/kerberos/krb5kdc/principal ] ; then
|
||||
exit 0
|
||||
# Make an educated guess -- if they're using kldap somewhere,
|
||||
# then we don't know for sure that this is an error.
|
||||
if ! grep -q 'db_library.*=.*kldap' /etc/krb5.conf ; then
|
||||
echo $"Error. Default principal database does not exist."
|
||||
exit 6
|
||||
fi
|
||||
fi
|
||||
[ -x $krb524d ] || exit 5
|
||||
echo -n $"Starting $prog: "
|
||||
daemon ${krb524d} ${KRB524D_ARGS:--m}
|
||||
RETVAL=$?
|
||||
@ -68,7 +71,7 @@ case "$1" in
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $0 {start|stop|status|restart|condrestart}"
|
||||
RETVAL=1
|
||||
RETVAL=2
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -13,9 +13,6 @@
|
||||
# Get config.
|
||||
. /etc/sysconfig/network
|
||||
|
||||
# Check that networking is up.
|
||||
[ ${NETWORKING} = "no" ] && exit 0
|
||||
|
||||
# Get config.
|
||||
[ -r /etc/sysconfig/krb5kdc ] && . /etc/sysconfig/krb5kdc
|
||||
|
||||
@ -26,8 +23,9 @@ RETVAL=0
|
||||
prog="Kerberos 5 KDC"
|
||||
krb5kdc=/usr/kerberos/sbin/krb5kdc
|
||||
|
||||
# Sheel functions to cut down on useless shell instances.
|
||||
# Shell functions to cut down on useless shell instances.
|
||||
start() {
|
||||
[ -x $krb5kdc ] || exit 5
|
||||
echo -n $"Starting $prog: "
|
||||
daemon ${krb5kdc} ${KRB5REALM:+-r ${KRB5REALM}} $KRB5KDC_ARGS
|
||||
RETVAL=$?
|
||||
@ -75,7 +73,7 @@ case "$1" in
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $0 {start|stop|status|reload|restart|condrestart}"
|
||||
RETVAL=1
|
||||
RETVAL=2
|
||||
;;
|
||||
esac
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user