From 891ccedaddf0900b06cecf610320fe66dba9a7d5 Mon Sep 17 00:00:00 2001
From: marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059>
Date: Mon, 4 Feb 2008 06:07:29 +0000
Subject: Make sure the vty-checker loop is put in the background so GDM will
 not tie up the boot process while it's waiting for the VTYs to become active.

git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@10333 df743ca5-7f9a-e211-a948-0013205c9059
---
 x11/gdm/Makefile     |  4 ++--
 x11/gdm/files/gdm.in | 15 ++++++++++-----
 2 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/x11/gdm/Makefile b/x11/gdm/Makefile
index 03b45ac48..9fa0cf9f1 100644
--- a/x11/gdm/Makefile
+++ b/x11/gdm/Makefile
@@ -3,12 +3,12 @@
 # Whom:                Joe Marcus Clarke <marcus@FreeBSD.org>
 #
 # $FreeBSD$
-#   $MCom: ports/x11/gdm/Makefile,v 1.101 2008/02/03 00:07:45 marcus Exp $
+#   $MCom: ports/x11/gdm/Makefile,v 1.102 2008/02/03 20:52:18 mezz Exp $
 #
 
 PORTNAME=	gdm
 PORTVERSION=	2.21.6
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	x11 gnome
 MASTER_SITES=	${MASTER_SITE_GNOME}
 MASTER_SITE_SUBDIR=	sources/${PORTNAME:S/2$//}/${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/}
diff --git a/x11/gdm/files/gdm.in b/x11/gdm/files/gdm.in
index e8c3acc38..c90e98560 100644
--- a/x11/gdm/files/gdm.in
+++ b/x11/gdm/files/gdm.in
@@ -17,17 +17,21 @@ gdm_enable=${gdm_enable-${gnome_enable}}
 
 export PATH=/bin:/sbin:/usr/bin:/usr/sbin:%%LOCALBASE%%/bin:%%LOCALBASE%%/sbin
 
-name=gdm
+name="gdm"
 rcvar=`set_rcvar`
 command="%%PREFIX%%/sbin/${name}"
 pidfile="/var/run/${name}.pid"
 procname="%%PREFIX%%/sbin/gdm-binary"
+start_cmd="gdm_start"
 
-start_precmd="gdm_precmd"
-
-gdm_precmd()
+gdm_start()
 {
-    iter=0
+    if ! checkyesno gdm_enable ; then
+	return 0
+    fi
+    echo "Starting ${name}."
+
+    ( iter=0
     while ! %%LOCALBASE%%/bin/vty-checker ; do
 	if [ ${iter} -eq 60 ]; then
 	    break
@@ -35,6 +39,7 @@ gdm_precmd()
 	sleep 1
 	iter=$(expr ${iter} + 1)
     done
+    ${command} ) &
 }
 
 load_rc_config ${name}
-- 
cgit v1.2.3