summaryrefslogtreecommitdiff
path: root/debian/hurd.postrm
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2011-01-16 14:37:41 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2011-01-16 14:37:41 +0100
commit46e5fb152dea6bdbdbb359842e5860ffea95335c (patch)
treed0a6cd205e59f1bccadc808fd775984179771eba /debian/hurd.postrm
parent0d310d45977052900aad97de8cd645b0522196d3 (diff)
Drop login shell
debian/hurd.{postinst,postrm}: Add/remove loginpr shell and login user with loginpr shell, to drop the login shell in order to match common Debian convention, in particular for remote telnet access...
Diffstat (limited to 'debian/hurd.postrm')
-rw-r--r--debian/hurd.postrm20
1 files changed, 20 insertions, 0 deletions
diff --git a/debian/hurd.postrm b/debian/hurd.postrm
new file mode 100644
index 00000000..ea209f71
--- /dev/null
+++ b/debian/hurd.postrm
@@ -0,0 +1,20 @@
+#!/bin/sh
+set -e
+
+if [ "$1" = purge ]; then
+ remove-shell /bin/loginpr
+ if ! deluser --quiet --system login > /dev/null; then
+ echo "
+Removing the user 'login' failed, most likely because the user is still
+logged in. To remove the user and group terminate the session in question
+and execute
+
+ deluser --quiet --system login
+ delgroup --quiet --system login
+"
+ else
+ delgroup --quiet --system login > /dev/null || true
+ fi
+fi
+
+#DEBHELPER#