The init.d/functions folder is specific to Red Hat and I think a couple
other distros.  I am including the init scripts you will need for gmond,
gexec and authd.  They need to go in /etc/init.d/
They have been thoroughly tested on SuSE 7.3, and I have used them briefly
on 8.0.  The structure of the SuSE init files hasn't changed from what I
have seen, so there shouldn't be any problem with 8.1.  Sounds like you
got a handle on the rest of it.

For future reference, there is a template in /etc/init.d/skeleton that can
modified to start many init processes.

I have been meaning to build SuSE specific RPMs, but other things have
kept me busy.  I will probably not build them for 7.3, but rather 8.0 and
8.1.

Hope this helps.

--
Michael Stone
Linux / High Performance Computing Administrator

The University of Texas at Austin
Mechanical Engineering Department
ETC 3.130     ph: 471.5951
agentsmith[at]mail.utexas.edu

http://hpc.me.utexas.edu

On Thu, 17 Oct 2002 [EMAIL PROTECTED] wrote:

> There is a problem while installing this software under Suse Linux 8.1:
>
> At [http://ganglia.sourceforge.net/ganglia_docs/install.html] in section
> 2.1.1. is described how to install the package from source. Everything works
> just fine since step 8 ("Start up gmond and make sure it is started at 
> reboot")
> came up.
>
> First, the directory /etc/rc.d/init.d does not exist under Suse Linux 8.1,
> so I changed it to /etc/init.d and copied the init script of gmond to this
> location.
>
> Second, I have to set up the gmond startup with the tool from Suse (yast).
> Changed "runlevel" options to "2", "3" and "5". Ok, fine.
>
> Third - and that is the point I can not go further on - is the execution of
> "/etc/init.d/gmond start". There is always the error message that states
>
> /etc/init.d/gmond: line 9: /etc/init.d/functions: No such file or directory
>
> There is no "functions" file in Suse's Linux distribution :-(( arrgh...
>
> I just took a look how they started the ircd deamon. Maybe it is the same
> way:
>
> [...]
> . /etc/rc.status
>
> # Shell functions sourced from /etc/rc.status:
> # rc_check check and set local and overall rc status
> # rc_status check and set local and overall rc status
> # rc_status -v ditto but be verbose in local rc status
> # rc_status -v -r ditto and clear the local rc status
> # rc_failed set local and overall rc status to failed
> # rc_reset clear local rc status (overall remains)
> # rc_exit exit appropriate to overall rc status
>
> IRCD_BIN=/usr/sbin/ircd
>
> # First reset status of this service
> rc_reset
> case "$1" in
> start)
> echo -n "Starting service ircd"
> [... and so on ...]
>
>
> I guess I have to change the init script of this gmond thing to work in
> Suse's distribution. But I don't know how to set this up. Can anybody help me?
>
> I also tried to install the RPM-file, but the same problem appears...
>
> # rpm -Uvh ganglia-monitor-core-2.5.0-1.i386.rpm
> ganglia-monitor-core ##################################################
> /etc/rc.d/init.d/gmond: line 9: /etc/rc.d/init.d/functions: No such file or
> directory
>
>
> Thanks,
> Frank
>
> --
> +++ GMX - Mail, Messaging & more  http://www.gmx.net +++
> NEU: Mit GMX ins Internet. Rund um die Uhr f?r 1 ct/ Min. surfen!
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by: viaVerio will pay you up to
> $1,000 for every account that you consolidate with us.
> http://ad.doubleclick.net/clk;4749864;7604308;v?
> http://www.viaverio.com/consolidator/osdn.cfm
> _______________________________________________
> Ganglia-general mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ganglia-general
>
#! /bin/sh
# Copyright (c) 1995-2000 SuSE GmbH Nuernberg, Germany.
#
# Author: Kurt Garloff <[EMAIL PROTECTED]>
#         Michael Stone <[EMAIL PROTECTED]>
# init.d/gmetad
#
# System startup script for the gmetad component of ganglia.
#
### BEGIN INIT INFO
# Provides: gmetad
# Required-Start: $network $remote_fs $syslog $inetd
# Required-Stop:  $network $remote_fs $syslog $inetd
# Default-Start:  3 5
# Default-Stop:   0 1 2 6
# Description:    Start gmetad for the ganglia web interface.
### END INIT INFO

# Source SuSE config
. /etc/rc.config

# Determine the base and follow a runlevel link name.
base=${0##*/}
link=${base#*[SK][0-9][0-9]}

# Force execution if not called by a runlevel directory.
test $link = $base && START_GMETAD=yes
test "$START_GMETAD" = yes || exit 0

GMETAD_BIN=/usr/sbin/gmetad
test -x $GMETAD_BIN || exit 5

# Shell functions sourced from /etc/rc.status:
#      rc_check         check and set local and overall rc status
#      rc_status        check and set local and overall rc status
#      rc_status -v     ditto but be verbose in local rc status
#      rc_status -v -r  ditto and clear the local rc status
#      rc_failed        set local and overall rc status to failed
#      rc_failed <num>  set local and overall rc status to <num><num>
#      rc_reset         clear local rc status (overall remains)
#      rc_exit          exit appropriate to overall rc status
. /etc/rc.status

# First reset status of this service
rc_reset

# Return values acc. to LSB for all commands but status:
# 0 - success
# 1 - generic or unspecified error
# 2 - invalid or excess argument(s)
# 3 - unimplemented feature (e.g. "reload")
# 4 - insufficient privilege
# 5 - program is not installed
# 6 - program is not configured
# 7 - program is not running
# 
# Note that starting an already running service, stopping
# or restarting a not-running service as well as the restart
# with force-reload (in case signalling is not supported) are
# considered a success.

case "$1" in
    start)
        echo -n "Starting GANGLIA Meta Daemon"
        ## Start daemon with startproc(8). If this fails
        ## the echo return value is set appropriate.

        # NOTE: startproc return 0, even if service is 
        # already running to match LSB spec.
        startproc $GMETAD_BIN

        # Remember status and be verbose
        rc_status -v
        ;;
    stop)
        echo -n "Shutting down GANGLIA Meta Daemon"
        ## Stop daemon with killproc(8) and if this fails
        ## set echo the echo return value.

        killproc -TERM $GMETAD_BIN

        # Remember status and be verbose
        rc_status -v
        ;;
    restart)
        ## Stop the service and regardless of whether it was
        ## running or not, start it again.
        $0 stop
        $0 start

        # Remember status and be quiet
        rc_status
        ;;
    status)
        echo -n "Checking for GANGLIA Meta Daemon: "
        ## Check status with checkproc(8), if process is running
        ## checkproc will return with exit status 0.

        # Status has a slightly different for the status command:
        # 0 - service running
        # 1 - service dead, but /var/run/  pid  file exists
        # 2 - service dead, but /var/lock/ lock file exists
        # 3 - service not running

        # NOTE: checkproc returns LSB compliant status values.
        checkproc $GMETAD_BIN
        rc_status -v
        ;;
    *)
        echo "Usage: $0 {start|stop|status|restart}"
        exit 1
        ;;
esac
rc_exit
#! /bin/sh
# Copyright (c) 1995-2000 SuSE GmbH Nuernberg, Germany.
#
# Author: Kurt Garloff <[EMAIL PROTECTED]>
#         Oliver M?ssinger <[EMAIL PROTECTED]>
#
# init.d/gmond
#
#   and symbolic its link
#
# /sbin/rcgmond
#
# System startup script for the nessus backend nessusd
#
### BEGIN INIT INFO
# Provides: gmond
# Required-Start: $network $remote_fs $syslog
# Required-Stop:  $network $remote_fs $syslog
# Default-Start:  3 5
# Default-Stop:   0 1 2 6
# Description:    Start gmond-
### END INIT INFO

# Source SuSE config
. /etc/rc.config

# Determine the base and follow a runlevel link name.
base=${0##*/}
link=${base#*[SK][0-9][0-9]}

# Force execution if not called by a runlevel directory.
test $link = $base && START_GMOND=yes
test "$START_GMOND" = yes || exit 0

GMOND_BIN=/usr/sbin/gmond

test -x $GMOND_BIN || exit 5

# Shell functions sourced from /etc/rc.status:
#      rc_check         check and set local and overall rc status
#      rc_status        check and set local and overall rc status
#      rc_status -v     ditto but be verbose in local rc status
#      rc_status -v -r  ditto and clear the local rc status
#      rc_failed        set local and overall rc status to failed
#      rc_failed <num>  set local and overall rc status to <num><num>
#      rc_reset         clear local rc status (overall remains)
#      rc_exit          exit appropriate to overall rc status
. /etc/rc.status

# First reset status of this service
rc_reset

# Return values acc. to LSB for all commands but status:
# 0 - success
# 1 - generic or unspecified error
# 2 - invalid or excess argument(s)
# 3 - unimplemented feature (e.g. "reload")
# 4 - insufficient privilege
# 5 - program is not installed
# 6 - program is not configured
# 7 - program is not running
# 
# Note that starting an already running service, stopping
# or restarting a not-running service as well as the restart
# with force-reload (in case signalling is not supported) are
# considered a success.

case "$1" in
    start)
        echo -n "Starting gmond"
        ## Start daemon with startproc(8). If this fails
        ## the echo return value is set appropriate.

        # NOTE: startproc return 0, even if service is 
        # already running to match LSB spec.
        startproc $GMOND_BIN
        
        # Remember status and be verbose
        rc_status -v
        ;;
    stop)
        echo -n "Shutting down gmond"
        ## Stop daemon with killproc(8) and if this fails
        ## set echo the echo return value.

        killproc -TERM $GMOND_BIN

        # Remember status and be verbose
        rc_status -v
        ;;
    restart)
        ## Stop the service and regardless of whether it was
        ## running or not, start it again.
        $0 stop
        $0 start

        # Remember status and be quiet
        rc_status
        ;;
    status)
        echo -n "Checking for gmond: "
        ## Check status with checkproc(8), if process is running
        ## checkproc will return with exit status 0.

        # Status has a slightly different for the status command:
        # 0 - service running
        # 1 - service dead, but /var/run/  pid  file exists
        # 2 - service dead, but /var/lock/ lock file exists
        # 3 - service not running

        # NOTE: checkproc returns LSB compliant status values.
        checkproc $GMOND_BIN
        rc_status -v
        ;;
    *)
        echo "Usage: $0 {start|stop|status|restart}"
        exit 1
        ;;
esac
rc_exit
#! /bin/sh
# Copyright (c) 1995-2000 SuSE GmbH Nuernberg, Germany.
#
# Author: Kurt Garloff <[EMAIL PROTECTED]>
#         Michael Stone <[EMAIL PROTECTED]>
#
# init.d/authd
#
#
### BEGIN INIT INFO
# Provides: authd
# Required-Start: $network $remote_fs $syslog $gmond
# Required-Stop:  $network $remote_fs $syslog $gmond
# Default-Start:  3 5
# Default-Stop:   0 1 2 6
# Description:    Start authd to allow authentication for ganglia clustering 
operations.
### END INIT INFO

# Source SuSE config
. /etc/rc.config

# Determine the base and follow a runlevel link name.
base=${0##*/}
link=${base#*[SK][0-9][0-9]}

# Force execution if not called by a runlevel directory.
test $link = $base && START_AUTHD=yes
test "$START_AUTHD" = yes || exit 0

AUTHD_BIN=/usr/local/sbin/authd
test -x $AUTHD_BIN || exit 5

# Shell functions sourced from /etc/rc.status:
#      rc_check         check and set local and overall rc status
#      rc_status        check and set local and overall rc status
#      rc_status -v     ditto but be verbose in local rc status
#      rc_status -v -r  ditto and clear the local rc status
#      rc_failed        set local and overall rc status to failed
#      rc_failed <num>  set local and overall rc status to <num><num>
#      rc_reset         clear local rc status (overall remains)
#      rc_exit          exit appropriate to overall rc status
. /etc/rc.status

# First reset status of this service
rc_reset

# Return values acc. to LSB for all commands but status:
# 0 - success
# 1 - generic or unspecified error
# 2 - invalid or excess argument(s)
# 3 - unimplemented feature (e.g. "reload")
# 4 - insufficient privilege
# 5 - program is not installed
# 6 - program is not configured
# 7 - program is not running
# 
# Note that starting an already running service, stopping
# or restarting a not-running service as well as the restart
# with force-reload (in case signalling is not supported) are
# considered a success.

case "$1" in
    start)
        echo -n "Starting authd"
        ## Start daemon with startproc(8). If this fails
        ## the echo return value is set appropriate.

        # NOTE: startproc return 0, even if service is 
        # already running to match LSB spec.
        startproc $AUTHD_BIN

        # Remember status and be verbose
        rc_status -v
        ;;
    stop)
        echo -n "Shutting down authd"
        ## Stop daemon with killproc(8) and if this fails
        ## set echo the echo return value.

        killproc -TERM $AUTHD_BIN

        # Remember status and be verbose
        rc_status -v
        ;;
    restart|reload)
        ## Stop the service and regardless of whether it was
        ## running or not, start it again.
        $0 stop
        $0 start

        # Remember status and be quiet
        rc_status
        ;;
    status)
        echo -n "Checking for authd: "
        ## Check status with checkproc(8), if process is running
        ## checkproc will return with exit status 0.

        # Status has a slightly different for the status command:
        # 0 - service running
        # 1 - service dead, but /var/run/  pid  file exists
        # 2 - service dead, but /var/lock/ lock file exists
        # 3 - service not running

        # NOTE: checkproc returns LSB compliant status values.
        checkproc $AUTHD_BIN
        rc_status -v
        ;;
    *)
        echo "Usage: $0 {start|stop|status|restart|reload}"
        exit 1
        ;;
esac
rc_exit

Reply via email to