Sophie

Sophie

distrib > Mandriva > 2006.0 > i586 > media > main-src > by-pkgid > 99a52109ece5b676e3c28737c665d9a0 > files > 2

lsb-3.0-6mdk.src.rpm

#!/bin/sh
# LSB compliant init functions

# source standard Mandrake init functions
. /etc/init.d/functions

start_daemon() {
    # Start daemons.
    local force= nicelevel=
    while [ "$1" != "${1##[-+]}" ]; do
        case $1 in
	  -f)
             force="--force"
	     shift
             ;;
	  -n)
	     nicelevel=$2
	     shift 2
	     ;;
        esac
    done
    if [ -z "$1" ]; then
	gprintf "%s: Usage: start_daemon [-f] [-n nicelevel] {program} [args]\n" $0
        return 1
    fi
    gprintf "Starting %s: " $1
    daemon $force $nicelevel $*
    RETVAL=$?
    if [ $RETVAL -eq 0 ]; then
        touch /var/lock/subsys/$1
    fi
    echo
    return $RETVAL
}

# killproc is handled by the normal init.d/functions

# pidofproc is handled by the normal init.d/functions

log_success_msg() {
    success
}

log_failure_msg() {
    failure
}

log_warning_msg() {
    echo_warning
}