[quake] 07/08: quake3-server: use a non-hidden home path, /var/games/quake3-server/server.q3a, in preparation for multiple-instance support
Simon McVittie
smcv at debian.org
Thu Jan 22 12:40:40 UTC 2015
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to branch master
in repository quake.
commit 776b324618c8b6ef805dac1972ccbc8fbdac2cf3
Author: Simon McVittie <smcv at debian.org>
Date: Thu Jan 22 10:17:31 2015 +0000
quake3-server: use a non-hidden home path, /var/games/quake3-server/server.q3a, in preparation for multiple-instance support
---
debian/changelog | 3 +++
debian/quake3-server.init | 4 +++-
debian/quake3-server.postinst | 5 +++++
3 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/debian/changelog b/debian/changelog
index 03a54f3..59770a7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,6 +12,9 @@ quake (9) UNRELEASED; urgency=medium
- make /etc/quake*-server available as etc/quake*-server in the game
engine's search path so it's more obvious what is being exec'd (leave
the debian_server.cfg symlink in for compatibility)
+ * quake3-server: use a non-hidden home path,
+ /var/games/quake3-server/server.q3a, in preparation for multiple-instance
+ support
-- Simon McVittie <smcv at debian.org> Tue, 20 Jan 2015 08:57:12 +0000
diff --git a/debian/quake3-server.init b/debian/quake3-server.init
index 8b767a4..4e0296a 100644
--- a/debian/quake3-server.init
+++ b/debian/quake3-server.init
@@ -45,7 +45,9 @@ q3_start() {
start-stop-daemon --start --quiet --pidfile $PIDFILE --oknodo \
--background --exec $BINARY --startas $DAEMON \
--make-pidfile --chuid $USER \
- -- $DAEMON_OPTS > /dev/null 2>&1 || return 1
+ -- \
+ +set com_homepath /var/games/quake3-server/server.q3a \
+ $DAEMON_OPTS > /dev/null 2>&1 || return 1
return 0
}
diff --git a/debian/quake3-server.postinst b/debian/quake3-server.postinst
index 02a3f19..1d278d9 100644
--- a/debian/quake3-server.postinst
+++ b/debian/quake3-server.postinst
@@ -13,6 +13,11 @@ case "$1" in
install -d /var/games
install -d /var/games/quake3-server
chown Debian-quake3:games /var/games/quake3-server
+ if [ -d /var/games/quake3-server/.q3a ] && ! [ -e /var/games/quake3-server/server.q3a ]; then
+ # we use com_homepath to redirect server stuff to a non-hidden
+ # directory and be ready for multi-instance; migrate old configuration
+ ln -s .q3a /var/games/quake3-server/server.q3a
+ fi
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/quake.git
More information about the Pkg-games-commits
mailing list