Author: baggins                      Date: Wed Jul  8 10:43:59 2009 GMT
Module: packages                      Tag: HEAD
---- Log message:
- added missing and unified existing init scripts

---- Files affected:
packages/heimdal:
   heimdal-kpasswdd.init (1.5 -> 1.6) , heimdal.init (1.17 -> 1.18) , 
heimdal.spec (1.165 -> 1.166) , heimdal.sysconfig (1.1 -> 1.2) , 
heimdal-ipropd.init (NONE -> 1.1)  (NEW), heimdal-kcm.init (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/heimdal/heimdal-kpasswdd.init
diff -u packages/heimdal/heimdal-kpasswdd.init:1.5 
packages/heimdal/heimdal-kpasswdd.init:1.6
--- packages/heimdal/heimdal-kpasswdd.init:1.5  Sat Jan  5 01:15:56 2008
+++ packages/heimdal/heimdal-kpasswdd.init      Wed Jul  8 12:43:54 2009
@@ -1,13 +1,11 @@
 #!/bin/sh
 #
 # kpasswdd     Heimdal Kerberos V password changing server
-#
 # chkconfig:   2345 41 41
-#
 # description: Heimdal Kerberos V password changing server
-#
 # processname: kpasswdd
-# config:      /etc/heimdal/krb5.conf
+# config:      /etc/krb5.conf
+
 
 # Source function library
 . /etc/rc.d/init.d/functions
@@ -16,12 +14,13 @@
 . /etc/sysconfig/network
 
 # Get service config
-[ -f /etc/sysconfig/kpasswdd ] && . /etc/sysconfig/kpasswdd
+[ -f /etc/sysconfig/heimdal ] && . /etc/sysconfig/heimdal
+SERVICE_RUN_NICE_LEVEL=${KPASSWDD_SERVICE_RUN_NICE_LEVEL:-0}
 
 # Check that networking is up.
 if is_yes "${NETWORKING}"; then
        if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; 
then
-               msg_network_down "Kerberos password changing server"
+               msg_network_down "Kerberos Password Changing Server"
                exit 1
        fi
 else
@@ -29,39 +28,41 @@
 fi
 
 start() {
+       local pid
+
        if [ ! -f /var/lock/subsys/kpasswdd ]; then
-               msg_starting "Kerberos password changing server"
+               msg_starting "Kerberos Password Changing Server"
                busy
-               kpasswdd &
+               daemon --fork kpasswdd $KPASSWDD_PARAMS
                sleep 1
-               if ps -C kpasswdd >/dev/null 2>&1; then
+               pid=$(pidofproc "kpasswdd" "/var/run/kpasswdd.pid")
+               if [ -n "$pid" ]; then
+                       touch /var/lock/subsys/kpasswdd
                        ok
                else
                        fail
                fi
-               RETVAL=$?
-               [ $RETVAL -eq 0 ] && touch /var/lock/subsys/kpasswdd
        else
-               msg_already_running "Kerberos password changing server"
+               msg_already_running "Kerberos Password Changing Server"
        fi
 }
 
 stop() {
        if [ -f /var/lock/subsys/kpasswdd ]; then
-               msg_stopping "Kerberos password changing server"
+               msg_stopping "Kerberos Password Changing Server"
                killproc kpasswdd
                rm -f /var/lock/subsys/kpasswdd >/dev/null 2>&1
        else
-               msg_not_running "Kerberos password changing server"
+               msg_not_running "Kerberos Password Changing Server"
        fi
 }
 
 condrestart() {
-       if [ -f /var/lock/subsys/kpasswd ]; then
+       if [ -f /var/lock/subsys/kpasswdd ]; then
                stop
                start
        else
-               msg_not_running "Kerberos password changing server"
+               msg_not_running "Kerberos Password Changing Server"
                RETVAL=$1
        fi
 }
@@ -75,7 +76,7 @@
   stop)
        stop
        ;;
-  restart)
+  restart|force-reload)
        stop
        start
        ;;

================================================================
Index: packages/heimdal/heimdal.init
diff -u packages/heimdal/heimdal.init:1.17 packages/heimdal/heimdal.init:1.18
--- packages/heimdal/heimdal.init:1.17  Wed Jul  8 01:41:24 2009
+++ packages/heimdal/heimdal.init       Wed Jul  8 12:43:54 2009
@@ -18,6 +18,7 @@
 
 # Get service config
 [ -f /etc/sysconfig/heimdal ] && . /etc/sysconfig/heimdal
+SERVICE_RUN_NICE_LEVEL=${KDC_SERVICE_RUN_NICE_LEVEL:-0}
 
 # Check that networking is up.
 if is_yes "${NETWORKING}"; then
@@ -35,7 +36,7 @@
        if [ ! -f /var/lock/subsys/heimdal ]; then
                msg_starting "Kerberos KDC"
                busy
-               daemon kdc --detach
+               daemon kdc --detach $KDC_PARAMS
                sleep 1
                pid=$(pidofproc "kdc" "/var/run/kdc.pid")
                if [ -n "$pid" ]; then

================================================================
Index: packages/heimdal/heimdal.spec
diff -u packages/heimdal/heimdal.spec:1.165 packages/heimdal/heimdal.spec:1.166
--- packages/heimdal/heimdal.spec:1.165 Thu Jul  2 15:01:05 2009
+++ packages/heimdal/heimdal.spec       Wed Jul  8 12:43:54 2009
@@ -24,7 +24,8 @@
 Source7:       %{name}-telnetd.inetd
 Source8:       %{name}-kadmind.inetd
 Source9:       %{name}-kpasswdd.init
-Source10:      %{name}-kpasswdd.sysconfig
+Source10:      %{name}-ipropd.init
+Source11:      %{name}-kcm.init
 Patch0:                %{name}-paths.patch
 Patch1:                %{name}-am_man_fixes.patch
 Patch2:                %{name}-amfix.patch
@@ -389,7 +390,8 @@
 install %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/kadmind
 
 install %{SOURCE9} $RPM_BUILD_ROOT/etc/rc.d/init.d/kpasswdd
-install %{SOURCE10} $RPM_BUILD_ROOT/etc/sysconfig/kpasswdd
+install %{SOURCE10} $RPM_BUILD_ROOT/etc/rc.d/init.d/ipropd
+install %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/kcm
 
 # just a test plugin
 rm -f $RPM_BUILD_ROOT%{_libdir}/windc.*
@@ -737,6 +739,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.166  2009/07/08 10:43:54  baggins
+- added missing and unified existing init scripts
+
 Revision 1.165  2009/07/02 13:01:05  baggins
 - rel 7
 

================================================================
Index: packages/heimdal/heimdal.sysconfig
diff -u packages/heimdal/heimdal.sysconfig:1.1 
packages/heimdal/heimdal.sysconfig:1.2
--- packages/heimdal/heimdal.sysconfig:1.1      Mon Jul  5 15:16:49 1999
+++ packages/heimdal/heimdal.sysconfig  Wed Jul  8 12:43:54 2009
@@ -1,5 +1,26 @@
 # Customized setings for Kerberos V5
 
 # Nicelevel for Kerberos KDC Server
-SERVICE_RUN_NICE_LEVEL="+0"
- 
+KDC_SERVICE_RUN_NICE_LEVEL="+0"
+
+# Nicelevel for Kerberos Password Changing Server
+KPASSWDD_SERVICE_RUN_NICE_LEVEL="+0"
+
+# Nicelevel for Kerberos Propagation Client
+IPROPD_SERVICE_RUN_NICE_LEVEL="+0"
+
+# Additional parameters for Kerberos KDC Server
+#KDC_PARAMS=""
+
+# Additional parameters for Kerberos Password Changing Server
+#KPASSWDD_PARAMS=""
+
+# kprop master?
+MASTER_ENABLED=no
+
+# How about the kprop slave?
+SLAVE_ENABLED=no
+
+# Add at least your master server name here when using iprop-replication
+# otherwise it would fail silently.
+#SLAVE_PARAMS=""

================================================================
Index: packages/heimdal/heimdal-ipropd.init
diff -u /dev/null packages/heimdal/heimdal-ipropd.init:1.1
--- /dev/null   Wed Jul  8 12:44:00 2009
+++ packages/heimdal/heimdal-ipropd.init        Wed Jul  8 12:43:54 2009
@@ -0,0 +1,129 @@
+#!/bin/sh
+#
+# ipropd       Heimdal Kerberos V replication daemons
+# chkconfig:   2345 41 41
+# description: Heimdal Kerberos V replication daemons
+# processname: ipropd-master ipropd-slave
+# config:      /etc/krb5.conf
+
+
+# Source function library
+. /etc/rc.d/init.d/functions
+
+# Get network config
+. /etc/sysconfig/network
+
+# Get service config
+[ -f /etc/sysconfig/heimdal ] && . /etc/sysconfig/heimdal
+SERVICE_RUN_NICE_LEVEL=${IPROPD_SERVICE_RUN_NICE_LEVEL:-0}
+
+# Check that networking is up.
+if is_yes "${NETWORKING}"; then
+       if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; 
then
+               msg_network_down "Kerberos Replication Daemons"
+               exit 1
+       fi
+else
+       exit 0
+fi
+
+start() {
+       local pid
+
+       if is_yes "$MASTER_ENABLED"; then
+               if [ ! -f /var/lock/subsys/ipropd-master ]; then
+                       msg_starting "Kerberos Replication Daemon (Master)"
+                       busy
+                       daemon ipropd-master --detach
+                       sleep 1
+                       pid=$(pidofproc "ipropd-master" 
"/var/run/ipropd-master.pid")
+                       if [ -n "$pid" ]; then
+                               touch /var/lock/subsys/ipropd-master
+                               ok
+                       else
+                               fail
+                       fi
+               else
+                       msg_already_running "Kerberos Replication Daemon 
(Master)"
+               fi
+       fi
+       if is_yes "$SLAVE_ENABLED"; then
+               if [ ! -f /var/lock/subsys/ipropd-slave ]; then
+                       msg_starting "Kerberos Replication Daemon (Slave)"
+                       busy
+                       daemon ipropd-slave --detach $SLAVE_PARAMS
+                       sleep 1
+                       pid=$(pidofproc "ipropd-slave" 
"/var/run/ipropd-slave.pid")
+                       if [ -n "$pid" ]; then
+                               touch /var/lock/subsys/ipropd-slave
+                               ok
+                       else
+                               fail
+                       fi
+               else
+                       msg_already_running "Kerberos Replication Daemon 
(Slave)"
+               fi
+       fi
+}
+
+stop() {
+       if [ -f /var/lock/subsys/ipropd-master ]; then
+               msg_stopping "Kerberos Replication Daemon (Master)"
+               killproc ipropd-master
+               rm -f /var/lock/subsys/ipropd-master >/dev/null 2>&1
+       else
+               if is_yes "$MASTER_ENABLED"; then
+                       msg_not_running "Kerberos Replication Daemon (Master)"
+               fi
+       fi
+       if [ -f /var/lock/subsys/ipropd-slave ]; then
+               msg_stopping "Kerberos Replication Daemon (Slave)"
+               killproc ipropd-slave
+               rm -f /var/lock/subsys/ipropd-slave >/dev/null 2>&1
+       else
+               if is_yes "$SLAVE_ENABLED"; then
+                       msg_not_running "Kerberos Replication Daemon (Slave)"
+               fi
+       fi
+}
+
+condrestart() {
+       if [ -f /var/lock/subsys/ipropd-master -o -f 
/var/lock/subsys/ipropd-slave ]; then
+               stop
+               start
+       else
+               msg_not_running "Kerberos Replication Daemons"
+               RETVAL=$1
+       fi
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+  start)
+       start
+       ;;
+  stop)
+       stop
+       ;;
+  restart|force-reload)
+       stop
+       start
+       ;;
+  try-restart)
+       condrestart 0
+       ;;
+  force-reload)
+       condrestart 7
+       ;;
+  status)
+       is_yes "$MASTER_ENABLED" && status ipropd-master
+       is_yes "$SLAVE_ENABLED" && status ipropd-slave
+       exit $?
+       ;;
+  *)
+       msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"
+       exit 3
+esac
+
+exit $RETVAL

================================================================
Index: packages/heimdal/heimdal-kcm.init
diff -u /dev/null packages/heimdal/heimdal-kcm.init:1.1
--- /dev/null   Wed Jul  8 12:44:00 2009
+++ packages/heimdal/heimdal-kcm.init   Wed Jul  8 12:43:54 2009
@@ -0,0 +1,100 @@
+#!/bin/sh
+#
+# heimdal      Heimdal Kerberos V credential cache daemon
+#
+# chkconfig:   2345 41 41
+#
+# description: Heimdal Kerberos V credential cache daemons
+#
+# processname: kcm
+# config:      /etc/kcm.conf
+
+
+# Source function library
+. /etc/rc.d/init.d/functions
+
+# Get network config
+. /etc/sysconfig/network
+
+# Get service config
+[ -f /etc/sysconfig/kcm ] && . /etc/sysconfig/kcm
+
+# Check that networking is up.
+if is_yes "${NETWORKING}"; then
+       if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; 
then
+               msg_network_down "Kerberos KCM"
+               exit 1
+       fi
+else
+       exit 0
+fi
+
+start() {
+       local pid
+
+       if [ ! -f /var/lock/subsys/kcm ]; then
+               msg_starting "Kerberos KCM"
+               busy
+               daemon kcm --detach
+               sleep 1
+               pid=$(pidofproc "kcm" "/var/run/kcm.pid")
+               if [ -n "$pid" ]; then
+                       touch /var/lock/subsys/kcm
+                       ok
+               else
+                       fail
+               fi
+       else
+               msg_already_running "Kerberos KCM"
+       fi
+}
+
+stop() {
+       if [ -f /var/lock/subsys/kcm ]; then
+               msg_stopping "Kerberos KCM"
+               killproc kcm
+               rm -f /var/lock/subsys/kcm >/dev/null 2>&1
+       else
+               msg_not_running "Kerberos KCM"
+       fi
+}
+
+condrestart() {
+       if [ -f /var/lock/subsys/kcm ]; then
+               stop
+               start
+       else
+               msg_not_running "Kerberos KCM"
+               RETVAL=$1
+       fi
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+  start)
+       start
+       ;;
+  stop)
+       stop
+       ;;
+  restart|force-reload)
+       stop
+       start
+       ;;
+  try-restart)
+       condrestart 0
+       ;;
+  force-reload)
+       condrestart 7
+       ;;
+  status)
+       status kcm
+       exit $?
+       ;;
+  *)
+       msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"
+       exit 3
+esac
+
+exit $RETVAL
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/heimdal/heimdal-kpasswdd.init?r1=1.5&r2=1.6&f=u
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/heimdal/heimdal.init?r1=1.17&r2=1.18&f=u
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/heimdal/heimdal.spec?r1=1.165&r2=1.166&f=u
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/heimdal/heimdal.sysconfig?r1=1.1&r2=1.2&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to