aboutsummaryrefslogtreecommitdiffstats
path: root/x11/gdm/files/gdm.in
diff options
context:
space:
mode:
Diffstat (limited to 'x11/gdm/files/gdm.in')
-rw-r--r--x11/gdm/files/gdm.in29
1 files changed, 12 insertions, 17 deletions
diff --git a/x11/gdm/files/gdm.in b/x11/gdm/files/gdm.in
index bdc726d08d8..9feb8801fe6 100644
--- a/x11/gdm/files/gdm.in
+++ b/x11/gdm/files/gdm.in
@@ -1,30 +1,26 @@
#!/bin/sh
-
# $FreeBSD$
-# $MCom: ports-stable/x11/gdm/files/gdm.in,v 1.5 2010/07/21 13:50:46 kwm Exp $
-#
+# $MCom: ports/x11/gdm/files/gdm.in,v 1.50 2012/01/15 18:18:36 kwm Exp $
+
# PROVIDE: gdm
# REQUIRE: LOGIN cleanvar moused syscons dbus
#
# Add the following to /etc/rc.conf to start GDM at boot time:
#
# gdm_enable="YES"
+#
. /etc/rc.subr
. %%GNOME_SUBR%%
-export PATH=/bin:/sbin:/usr/bin:/usr/sbin:%%LOCALBASE%%/bin:%%LOCALBASE%%/sbin
-
-name="gdm"
-rcvar=gdm_enable
-
-load_rc_config ${name}
-
-gnome_enable=${gnome_enable:-NO}
gdm_enable=${gdm_enable-${gnome_enable}}
gdm_preserve_base_pam_conf=${gdm_preserve_base_pam_conf-NO}
gdm_lang=${gdm_lang-${LANG}}
+export PATH=/bin:/sbin:/usr/bin:/usr/sbin:%%LOCALBASE%%/bin:%%LOCALBASE%%/sbin
+
+name="gdm"
+rcvar=gdm_enable
command="%%PREFIX%%/sbin/${name}"
pidfile="/var/run/${name}.pid"
procname="%%PREFIX%%/sbin/gdm-binary"
@@ -32,14 +28,15 @@ start_cmd="gdm_start"
gdm_start()
{
- local iter
-
+ if ! checkyesno gdm_enable ; then
+ return 0
+ fi
echo "Starting ${name}."
# make sure there is no pam configuration for gdm service in base system
if ! checkyesno gdm_preserve_base_pam_conf && [ -f /etc/pam.d/gdm ]; then
cp -p /etc/pam.d/gdm /etc/pam.d/gdm_disabled
- unlink /etc/pam.d/gdm
+ rm -f /etc/pam.d/gdm
fi
( iter=0
@@ -52,9 +49,6 @@ gdm_start()
done
iter=0
while ! %%LOCALBASE%%/bin/lshal >/dev/null 2>&1 ; do
- if [ ! -x %%LOCALBASE%%/bin/lshal ]; then
- err 1 "%%LOCALBASE%%/bin/lshal is not installed"
- fi
if [ ${iter} -eq 60 ]; then
break
fi
@@ -64,4 +58,5 @@ gdm_start()
LANG=${gdm_lang} ${command} ${gdm_flags} ) &
}
+load_rc_config ${name}
run_rc_command "$1"