[openarena] 01/02: Lock Debian-openarena account in purge instead of deleting it (see #621833)
Simon McVittie
smcv at debian.org
Wed Mar 2 09:58:51 UTC 2016
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to branch master
in repository openarena.
commit e6a5b8b7362d96a4da633aaed73e8b0438c04d23
Author: Simon McVittie <smcv at debian.org>
Date: Wed Mar 2 09:48:28 2016 +0000
Lock Debian-openarena account in purge instead of deleting it (see #621833)
---
debian/changelog | 7 +++++++
debian/openarena-server.postinst | 6 ++++++
debian/openarena-server.postrm | 8 +++++++-
3 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/debian/changelog b/debian/changelog
index 682f676..676040f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+openarena (0.8.8-16) UNRELEASED; urgency=medium
+
+ * Lock Debian-openarena account in purge instead of deleting it
+ (see #621833)
+
+ -- Simon McVittie <smcv at debian.org> Wed, 02 Mar 2016 09:30:47 +0000
+
openarena (0.8.8-15) unstable; urgency=medium
* Use DEB_VENDOR instead of lsb_release
diff --git a/debian/openarena-server.postinst b/debian/openarena-server.postinst
index 8793127..d32c7fe 100644
--- a/debian/openarena-server.postinst
+++ b/debian/openarena-server.postinst
@@ -10,6 +10,12 @@ case "$1" in
--gecos "OpenArena dedicated server" \
--ingroup games --force-badname Debian-openarena
fi
+ # Unlock account, if it was locked by our postrm
+ if [ -f /etc/shadow ]; then
+ usermod -U -e '' Debian-openarena
+ else
+ usermod -U Debian-openarena
+ fi
install -d /var/games
install -d /var/games/openarena-server
chown Debian-openarena:games /var/games/openarena-server
diff --git a/debian/openarena-server.postrm b/debian/openarena-server.postrm
index 5a420c9..5b357e5 100644
--- a/debian/openarena-server.postrm
+++ b/debian/openarena-server.postrm
@@ -5,7 +5,13 @@ set -e
#DEBHELPER#
if [ "$1" = "purge" ] ; then
- deluser --quiet --system Debian-openarena > /dev/null || true
+ # Lock account on purge
+ if [ -f /etc/shadow ]; then
+ usermod -L -e 1 Debian-openarena
+ else
+ usermod -L Debian-openarena
+ fi
+
rm -r /var/games/openarena-server
rmdir --ignore-fail-on-non-empty /var/games
fi
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/openarena.git
More information about the Pkg-games-commits
mailing list