summaryrefslogtreecommitdiffstats
path: root/x11/gdm/pkg-install
diff options
context:
space:
mode:
authorahze <ahze@df743ca5-7f9a-e211-a948-0013205c9059>2005-11-06 13:28:01 +0800
committerahze <ahze@df743ca5-7f9a-e211-a948-0013205c9059>2005-11-06 13:28:01 +0800
commit968d434e1b320ebbe55b570c9934916a84412ae7 (patch)
tree2c68a130d10b066ade643c666421479cde5ba5c7 /x11/gdm/pkg-install
parent15a5da34041692a805eb2f5a8ca1f1d1200adbe1 (diff)
downloadmarcuscom-ports-968d434e1b320ebbe55b570c9934916a84412ae7.tar
marcuscom-ports-968d434e1b320ebbe55b570c9934916a84412ae7.tar.gz
marcuscom-ports-968d434e1b320ebbe55b570c9934916a84412ae7.tar.bz2
marcuscom-ports-968d434e1b320ebbe55b570c9934916a84412ae7.tar.lz
marcuscom-ports-968d434e1b320ebbe55b570c9934916a84412ae7.tar.xz
marcuscom-ports-968d434e1b320ebbe55b570c9934916a84412ae7.tar.zst
marcuscom-ports-968d434e1b320ebbe55b570c9934916a84412ae7.zip
- Add gdm at version 2.13.0.0
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@5076 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'x11/gdm/pkg-install')
-rw-r--r--x11/gdm/pkg-install47
1 files changed, 47 insertions, 0 deletions
diff --git a/x11/gdm/pkg-install b/x11/gdm/pkg-install
new file mode 100644
index 000000000..bcce174fd
--- /dev/null
+++ b/x11/gdm/pkg-install
@@ -0,0 +1,47 @@
+#!/bin/sh
+
+case $2 in
+POST-INSTALL)
+ USER=gdm
+ GROUP=${USER}
+ UID=92
+ GID=${UID}
+ PW=/usr/sbin/pw
+ CHMOD=/bin/chmod
+ CHOWN=/usr/sbin/chown
+ MKDIR=/bin/mkdir
+
+ if ${PW} group show "${GROUP}" 2>/dev/null; then
+ echo "You already have a group \"${GROUP}\", so I will use it."
+ else
+ if ${PW} groupadd ${GROUP} -g ${GID}; then
+ echo "Added group \"${GROUP}\"."
+ else
+ echo "Adding group \"${GROUP}\" failed..."
+ exit 1
+ fi
+ fi
+
+ if ${PW} user show "${USER}" 2>/dev/null; then
+ echo "You already have a user \"${USER}\", so I will use it."
+ else
+ if ${PW} useradd ${USER} -u ${UID} -g ${GROUP} -h - \
+ -d "/nonexistent" -s /sbin/nologin -c "GNOME Display Manager"
+ then
+ echo "Added user \"${USER}\"."
+ else
+ echo "Adding user \"${USER}\" failed..."
+ exit 1
+ fi
+ fi
+ ${MKDIR} -p /var/gdm
+ ${MKDIR} -p /var/log/gdm
+ ${CHOWN} -R root:${GROUP} /var/gdm
+ ${CHMOD} 1770 /var/gdm
+ ${CHOWN} root:wheel ${PKG_PREFIX}/share/gnome/gdm
+ ${CHMOD} 0755 ${PKG_PREFIX}/share/gnome/gdm
+
+ ${MKDIR} -p ${PKG_PREFIX}/etc/dm/Sessions
+ exit 0
+ ;;
+esac