Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 168514

Summary: games-server/halflife-steam init-script missing option
Product: Gentoo Linux Reporter: Bjoern Olausson <contactme>
Component: [OLD] GamesAssignee: Gentoo Games <games>
Status: RESOLVED DUPLICATE    
Severity: minor    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Bjoern Olausson 2007-02-27 00:12:36 UTC
The provided initscript is missing an option (-m) to sucessfully create the pid-file

false:
start-stop-daemon --start -p /var/run/hlds.pid

working:
start-stop-daemon --start -m -p /var/run/hlds.pid


Reproducible: Always

Steps to Reproduce:
1. /etc/init.d/hlds start
2. cat /var/run/hlds.pid
3. /etc/init.d/hlds stop


Actual Results:  
2.) no pidfile
3.) Process could not be stopped because of missing pidfile

Expected Results:  
2.) cat /var/run/hlds.pid should display the pid of the running server.
3.) Should kill the process containd in the pidfile

Working example:


depend() {
        use net
}

checkconfig() {
        local var
        for var in HLDS_PATH HLDS_MT HLDS_OPTS ; do
                if [[ -z ${!var} ]] ; then
                        eerror "Need to set ${var} in /etc/conf.d/HLDS_PATH"
                        return 1
                fi
        done
        return 0
}

start() {
        checkconfig || return $?

        ebegin "Starting Halflife Dedicated Server"
        export LD_LIBRARY_PATH=${HLDS_PATH}:${HLDS_PATH}/bin:${LD_LIBRARY_PATH}
        start-stop-daemon --start -m -p /var/run/hlds.pid \
                --chdir ${HLDS_PATH} -c games:games \
                -n ${HLDS_MT} -b -a ${HLDS_PATH}/${HLDS_MT} \
                -- ${HLDS_OPTS}
        eend $?
}

stop() {
        ebegin "Stopping Halflife Dedicated Server"
        start-stop-daemon --stop -p /var/run/hlds.pid
        eend $?
}
Comment 1 Tristan Heaven (RETIRED) gentoo-dev 2007-02-27 05:34:07 UTC

*** This bug has been marked as a duplicate of bug 123930 ***