aboutsummaryrefslogtreecommitdiffstats
path: root/x11
diff options
context:
space:
mode:
authormarcus <marcus@FreeBSD.org>2008-03-26 11:14:12 +0800
committermarcus <marcus@FreeBSD.org>2008-03-26 11:14:12 +0800
commitf1496a3421a92d05724a758ba4e8e1580468bb74 (patch)
treebe9d4078d54d07337fad8014212bd79b597c8e49 /x11
parent8b9fb8cec738f0d879d81df65b07a965c2f227a7 (diff)
downloadfreebsd-ports-gnome-f1496a3421a92d05724a758ba4e8e1580468bb74.tar.gz
freebsd-ports-gnome-f1496a3421a92d05724a758ba4e8e1580468bb74.tar.zst
freebsd-ports-gnome-f1496a3421a92d05724a758ba4e8e1580468bb74.zip
Add a delay loop which keeps GDM from starting until the gettys have been
allocated. This will allow ConsoleKit to properly initialize.
Diffstat (limited to 'x11')
-rw-r--r--x11/gdm/Makefile2
-rw-r--r--x11/gdm/files/gdm.in23
2 files changed, 23 insertions, 2 deletions
diff --git a/x11/gdm/Makefile b/x11/gdm/Makefile
index ba3c67339180..0afbcb0fbbf6 100644
--- a/x11/gdm/Makefile
+++ b/x11/gdm/Makefile
@@ -8,7 +8,7 @@
PORTNAME= gdm
PORTVERSION= 2.20.4
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= x11 gnome
MASTER_SITES= GNOME
DIST_SUBDIR= gnome2
diff --git a/x11/gdm/files/gdm.in b/x11/gdm/files/gdm.in
index 272deae4b017..8705c4742835 100644
--- a/x11/gdm/files/gdm.in
+++ b/x11/gdm/files/gdm.in
@@ -3,7 +3,7 @@
# $MCom: ports/x11/gdm/files/gdm.in,v 1.28 2008/03/11 04:21:47 mezz Exp $
# PROVIDE: gdm
-# REQUIRE: LOGIN cleanvar moused
+# REQUIRE: LOGIN cleanvar moused syscons dbus
#
# Add the following to /etc/rc.conf to start GDM at boot time:
#
@@ -15,11 +15,32 @@
gdm_enable=${gdm_enable-${gnome_enable}}
+export PATH=/bin:/sbin:/usr/bin:/usr/sbin:%%LOCALBASE%%/bin:%%LOCALBASE%%/sbin
+
name=gdm
rcvar=`set_rcvar`
command="%%PREFIX%%/sbin/${name}"
pidfile="/var/run/${name}.pid"
procname="%%PREFIX%%/sbin/gdm-binary"
+start_cmd="gdm_start"
+
+gdm_start()
+{
+ if ! checkyesno gdm_enable ; then
+ return 0
+ fi
+ echo "Starting ${name}."
+
+ ( iter=0
+ while ! ps -axoargs | grep "^/usr/libexec/getty " | grep -qv grep >/dev/null 2>&1; do
+ if [ ${iter} -eq 60 ]; then
+ break
+ fi
+ sleep 1
+ iter=$(expr ${iter} + 1)
+ done
+ ${command} ) &
+}
load_rc_config ${name}
run_rc_command "$1"