[29356] in Kerberos

home help back first fref pref prev next nref lref last post

create a startup script for krb5kdc, and using chkconfig

daemon@ATHENA.MIT.EDU (Le Trung Kien)
Sun Feb 24 23:18:25 2008

Message-ID: <cb25fa940802242017y4acf0ee1yb0a089f0b1ae712f@mail.gmail.com>
Date: Mon, 25 Feb 2008 11:17:50 +0700
From: "Le Trung Kien" <aloneattack@gmail.com>
To: kerberos@mit.edu
MIME-Version: 1.0
Content-Disposition: inline
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: kerberos-bounces@mit.edu

Hi, I'm attempting to create a startup script for krb5kdc daemon to start
automatically at the booting of system.
And here is my content of krb5kdc script:

*************************************************************************************
#! /bin/bash
#
# krb5kdc          Start/Stop the krb5kdc daemon.
#
# chkconfig: - 9 60
# description:
# processname: krb5kdc
# config:
# pidfile:

# Source function library.
. /etc/init.d/functions

RETVAL=0

# See how we were called.

prog="krb5kdc"

start() {
        echo -n $"Starting $prog: "
        daemon krb5kdc
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/krb5kdc
        return $RETVAL
}

stop() {
        echo -n $"Stopping $prog: "
        killproc krb5kdc
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/krb5kdc
        return $RETVAL
}

rhstatus() {
        status krb5kdc
}

restart() {
        stop
        start
}

reload() {
        echo -n $"Reloading krb5kdc daemon configuration: "
        killproc krb5kdc -HUP
        retval=$?
        echo
        return $RETVAL
}

case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  restart)
        restart
        ;;
  reload)
        reload
        ;;
  status)
        rhstatus
        ;;
  krb5kdcrestart)
        [ -f /var/lock/subsys/krb5kdc ] && restart || :
        ;;
  *)
        echo $"Usage: $0 {start|stop|status|reload|restart|krb5kdcrestart}"
        exit 1
esac

exit $?

*************************************************************************************

then I place this file in /etc/rc.d/init.d directory and use

chkconfig --add krb5kdc

I got :

service krb5kdc does not support chkconfig

Any suggestion please.

Thank you.
Le Trung Kien
________________________________________________
Kerberos mailing list           Kerberos@mit.edu
https://mailman.mit.edu/mailman/listinfo/kerberos

home help back first fref pref prev next nref lref last post