summaryrefslogtreecommitdiff
path: root/debian/postinst
diff options
context:
space:
mode:
Diffstat (limited to 'debian/postinst')
-rw-r--r--debian/postinst76
1 files changed, 0 insertions, 76 deletions
diff --git a/debian/postinst b/debian/postinst
deleted file mode 100644
index 6c826eb6..00000000
--- a/debian/postinst
+++ /dev/null
@@ -1,76 +0,0 @@
-#!/bin/sh
-
-set +e
-
-# is everything in place ?
-if [ ! -x "`which adduser`" ]; then
- echo "I need adduser(8) from the adduser.deb package !";
- exit 1;
-fi
-if [ ! -x "`which addgroup`" ]; then
- echo "I need addgroup(8) from the adduser.deb package !";
- exit 1;
-fi
-if [ ! -x "`which usermod`" ]; then
- echo "I need usermod(8) from the passwd.deb package !";
- exit 1;
-fi
-
-# creating gdm group if he isn't already there
-if ! grep -q ^gdm: /etc/group; then
- echo Adding system group: gdm.
- addgroup gdm
-fi
-
-# creating gdm user if he isn't already there
-if ! grep -q ^gdm: /etc/passwd; then
- echo Adding system user: gdm.
- adduser --system --ingroup gdm --home /var/lib/gdm gdm
-fi
-
-usermod -c "Gnome Display Manager" gdm
-usermod -d "/var/lib/gdm" gdm
-usermod -g "gdm" gdm
-usermod -s "/bin/false" gdm
-
-set -e
-
-if [ -d /var/lib/gdm ]; then
- chown -R gdm:gdm /var/lib/gdm
- chmod 0750 /var/lib/gdm
-fi
-
-# based on xdm's postinst by Branden Robinson
-
-# don't start gdm if we're currently in X on the display it attempts to
-# manage by default.
-nostart=
-gdm_running=
-for hostname in "" "localhost" "$(hostname)" "$(hostname -f)"; do
- if echo $DISPLAY | grep -q "^$hostname:0.*"; then
- nostart=yes
- fi
-done
-
-# or if it's already running
-# NOTE: the binary on disk most likely has changed, so we can't use --exec
-if start-stop-daemon --stop --quiet --signal 0 --pid /var/run/gdm.pid; then
- nostart=yes
- gdm_running=yes
-fi
-
-update-rc.d gdm defaults 99 01 >/dev/null
-
-if [ -d /var/state/gdm ]; then
- if [ "$gdm_running" ]; then
- echo "Note: obsolete directory /var/state/gdm cannot be removed when gdm"
- echo "is running. Reinstall the gdm package (or remove the directory"
- echo "manually) when gdm is not running."
- else
- rm -r /var/state/gdm
- fi
-fi
-
-[ "$nostart" ] || /etc/init.d/gdm start || true
-
-#DEBHELPER#