summaryrefslogtreecommitdiffstats
path: root/x11/gdm2/pkg-install
diff options
context:
space:
mode:
authormarcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059>2002-10-09 06:34:29 +0800
committermarcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059>2002-10-09 06:34:29 +0800
commit9757477161720a1f776411b6c41f3f07b801761f (patch)
treeb7548c0751da1d0970ba7f7d07cd1f49c24985d6 /x11/gdm2/pkg-install
parentbcd2d3ec2230608909933e9eb018052c1c6ca989 (diff)
downloadmarcuscom-ports-9757477161720a1f776411b6c41f3f07b801761f.tar
marcuscom-ports-9757477161720a1f776411b6c41f3f07b801761f.tar.gz
marcuscom-ports-9757477161720a1f776411b6c41f3f07b801761f.tar.bz2
marcuscom-ports-9757477161720a1f776411b6c41f3f07b801761f.tar.lz
marcuscom-ports-9757477161720a1f776411b6c41f3f07b801761f.tar.xz
marcuscom-ports-9757477161720a1f776411b6c41f3f07b801761f.tar.zst
marcuscom-ports-9757477161720a1f776411b6c41f3f07b801761f.zip
Add gdm2.
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@35 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'x11/gdm2/pkg-install')
-rw-r--r--x11/gdm2/pkg-install42
1 files changed, 42 insertions, 0 deletions
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