Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 168514 - games-server/halflife-steam init-script missing option
Summary: games-server/halflife-steam init-script missing option
Status: RESOLVED DUPLICATE of bug 123930
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-27 00:12 UTC by Bjoern Olausson
Modified: 2007-02-27 05:34 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***