From 9757477161720a1f776411b6c41f3f07b801761f Mon Sep 17 00:00:00 2001 From: marcus Date: Tue, 8 Oct 2002 22:34:29 +0000 Subject: Add gdm2. git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@35 df743ca5-7f9a-e211-a948-0013205c9059 --- x11/gdm2/pkg-install | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 x11/gdm2/pkg-install (limited to 'x11/gdm2/pkg-install') diff --git a/x11/gdm2/pkg-install b/x11/gdm2/pkg-install new file mode 100644 index 000000000..04f07cb65 --- /dev/null +++ b/x11/gdm2/pkg-install @@ -0,0 +1,42 @@ +#!/bin/sh + +if [ -n "${PACKAGE_BUILDING}" ]; then + exit 0 +fi + +if [ "$2" = "POST-INSTALL" ]; then + USER=gdm + GROUP=${USER} + UID=92 + GID=${UID} + PW=/usr/sbin/pw + + 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 + exit 0 +fi + +if [ -z "${BATCH}" ]; then + /usr/bin/dialog --yesno "GDM may contain vulnerabilities leading local root compromise, and it is reported widely with various security sites and groups. It is not recommended that this port be installed in public environment. Do you wish to accept the security risk and build GDM anyway?" 10 60 || /usr/bin/false +fi -- cgit v1.2.3