Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 123930 - hlds init script not shutting down server
Summary: hlds init script not shutting down server
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
: 134445 168514 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-02-24 06:39 UTC by Adam Bowers
Modified: 2011-10-05 09:14 UTC (History)
4 users (show)

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


Attachments
patch for multiserver init scripts (halflife-steam.patch,3.20 KB, patch)
2007-09-26 17:57 UTC, Sergey Belyashov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Bowers 2006-02-24 06:39:54 UTC
The rc script to shutdown the HLDS server does not seem to work.  It is not writing a pid to /var/run/hlds.pid

Steps to reproduce

/etc/init.d/hlds start 
* Stopping Halflife Dedicated Server ...

/etc/init.d/hlds stop
 * Stopping Halflife Dedicated Server ...
No process in pidfile `/var/run/hlds.pid' found running; none killed.                                                                  [ !! ]


Portage 2.0.54 (default-linux/x86/2005.1, gcc-3.4.4, glibc-2.3.5-r2, 2.6.15-gentoo-r5 i686)
=================================================================
System uname: 2.6.15-gentoo-r5 i686 Intel(R) Pentium(R) 4 CPU 1500MHz
Gentoo Base System version 1.6.14
ccache version 2.3 [enabled]
dev-lang/python:     2.3.5-r2, 2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium4 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium4 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://open-systems.ufl.edu/mirrors/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="x86 acpi apache2 apm bash-completion berkdb bzip2 cdr crypt cups dvd expat fbcon ftp gdbm gpm hal libwww mmx mp3 ncurses nls nptl pam perl python readline samba slp snmp sse ssl svga sysvipc tiff udev usb xml2 zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
Comment 1 Adam Bowers 2006-02-24 06:44:21 UTC
re-worded the summary to better describe the bug
Comment 2 Matthew Howle 2006-07-13 15:39:18 UTC
Can you post your /etc/conf.d/hlds?
Comment 3 Matthew Howle 2006-07-13 15:58:26 UTC
If /var/run/hlds.pid doesn't exist, you need to create it by "touch /var/run/hlds.pid" and then "chown games:games /var/run/hlds.pid". 

I was thinking you had the same problem as I had.  I was using "HLDS_MT=hlds_run" instead of "HLDS_MT=hlds_i686", which will correctly kill the process when stopped.
Comment 4 Tristan Heaven (RETIRED) gentoo-dev 2006-09-27 03:53:43 UTC
*** Bug 134445 has been marked as a duplicate of this bug. ***
Comment 5 Ryan Holt 2006-11-05 22:32:25 UTC
It would appear that whenever you run /etc/init.d/hlds stop it will remove the /var/run/hlds.pid file altogether; it doesn't just empty it. So when you try to restart the server there's no file (/var/run/hlds.pid) for it to place it's current process in.
Comment 6 Tristan Heaven (RETIRED) gentoo-dev 2007-02-27 05:34:07 UTC
*** Bug 168514 has been marked as a duplicate of this bug. ***
Comment 7 Bjoern Olausson 2007-02-27 10:28:08 UTC
Just add the -m otion to start-stop-deamon and it works.

See here for details http://bugs.gentoo.org/show_bug.cgi?id=168514

Regards
Bjoern
Comment 8 Sergey Belyashov 2007-09-26 17:57:38 UTC
Created attachment 131964 [details, diff]
patch for multiserver init scripts

I add to init script possibility run multiserver configuration.
This patch is applicable to files in portage tree (hlds.rc and hlds.confd).
Comment 9 Mr. Bones. (RETIRED) gentoo-dev 2011-10-05 09:14:15 UTC
well, I don't know if anyone's still using this but it's in there...