Lines 1-26
Link Here
|
1 |
#!/bin/sh |
1 |
#!/bin/sh |
|
|
2 |
|
2 |
# $FreeBSD: ports/x11/gdm/files/gdm.in,v 1.20 2010/07/25 19:35:05 kwm Exp $ |
3 |
# $FreeBSD: ports/x11/gdm/files/gdm.in,v 1.20 2010/07/25 19:35:05 kwm Exp $ |
3 |
# $MCom: ports-stable/x11/gdm/files/gdm.in,v 1.5 2010/07/21 13:50:46 kwm Exp $ |
4 |
# $MCom: ports-stable/x11/gdm/files/gdm.in,v 1.5 2010/07/21 13:50:46 kwm Exp $ |
4 |
|
5 |
# |
5 |
# PROVIDE: gdm |
6 |
# PROVIDE: gdm |
6 |
# REQUIRE: LOGIN cleanvar moused syscons dbus |
7 |
# REQUIRE: LOGIN cleanvar moused syscons dbus |
7 |
# |
8 |
# |
8 |
# Add the following to /etc/rc.conf to start GDM at boot time: |
9 |
# Add the following to /etc/rc.conf to start GDM at boot time: |
9 |
# |
10 |
# |
10 |
# gdm_enable="YES" |
11 |
# gdm_enable="YES" |
11 |
# |
|
|
12 |
|
12 |
|
13 |
. /etc/rc.subr |
13 |
. /etc/rc.subr |
14 |
. %%GNOME_SUBR%% |
14 |
. %%GNOME_SUBR%% |
15 |
|
15 |
|
16 |
gdm_enable=${gdm_enable-${gnome_enable}} |
|
|
17 |
gdm_preserve_base_pam_conf=${gdm_preserve_base_pam_conf-NO} |
18 |
gdm_lang=${gdm_lang-${LANG}} |
19 |
|
20 |
export PATH=/bin:/sbin:/usr/bin:/usr/sbin:%%LOCALBASE%%/bin:%%LOCALBASE%%/sbin |
16 |
export PATH=/bin:/sbin:/usr/bin:/usr/sbin:%%LOCALBASE%%/bin:%%LOCALBASE%%/sbin |
21 |
|
17 |
|
22 |
name="gdm" |
18 |
name="gdm" |
23 |
rcvar=`set_rcvar` |
19 |
rcvar=`set_rcvar` |
|
|
20 |
|
21 |
load_rc_config ${name} |
22 |
|
23 |
gnome_enable=${gnome_enable:-NO} |
24 |
gdm_enable=${gdm_enable-${gnome_enable}} |
25 |
gdm_preserve_base_pam_conf=${gdm_preserve_base_pam_conf-NO} |
26 |
gdm_lang=${gdm_lang-${LANG}} |
27 |
|
24 |
command="%%PREFIX%%/sbin/${name}" |
28 |
command="%%PREFIX%%/sbin/${name}" |
25 |
pidfile="/var/run/${name}.pid" |
29 |
pidfile="/var/run/${name}.pid" |
26 |
procname="%%PREFIX%%/sbin/gdm-binary" |
30 |
procname="%%PREFIX%%/sbin/gdm-binary" |
Lines 28-42
Link Here
|
28 |
|
32 |
|
29 |
gdm_start() |
33 |
gdm_start() |
30 |
{ |
34 |
{ |
31 |
if ! checkyesno gdm_enable ; then |
35 |
local iter |
32 |
return 0 |
36 |
|
33 |
fi |
|
|
34 |
echo "Starting ${name}." |
37 |
echo "Starting ${name}." |
35 |
|
38 |
|
36 |
# make sure there is no pam configuration for gdm service in base system |
39 |
# make sure there is no pam configuration for gdm service in base system |
37 |
if ! checkyesno gdm_preserve_base_pam_conf && [ -f /etc/pam.d/gdm ]; then |
40 |
if ! checkyesno gdm_preserve_base_pam_conf && [ -f /etc/pam.d/gdm ]; then |
38 |
cp -p /etc/pam.d/gdm /etc/pam.d/gdm_disabled |
41 |
cp -p /etc/pam.d/gdm /etc/pam.d/gdm_disabled |
39 |
rm -f /etc/pam.d/gdm |
42 |
unlink /etc/pam.d/gdm |
40 |
fi |
43 |
fi |
41 |
|
44 |
|
42 |
( iter=0 |
45 |
( iter=0 |
Lines 49-54
Link Here
|
49 |
done |
52 |
done |
50 |
iter=0 |
53 |
iter=0 |
51 |
while ! %%LOCALBASE%%/bin/lshal >/dev/null 2>&1 ; do |
54 |
while ! %%LOCALBASE%%/bin/lshal >/dev/null 2>&1 ; do |
|
|
55 |
if [ ! -x %%LOCALBASE%%/bin/lshal ]; then |
56 |
err 1 "%%LOCALBASE%%/bin/lshal is not installed" |
57 |
fi |
52 |
if [ ${iter} -eq 60 ]; then |
58 |
if [ ${iter} -eq 60 ]; then |
53 |
break |
59 |
break |
54 |
fi |
60 |
fi |
Lines 58-62
Link Here
|
58 |
LANG=${gdm_lang} ${command} ${gdm_flags} ) & |
64 |
LANG=${gdm_lang} ${command} ${gdm_flags} ) & |
59 |
} |
65 |
} |
60 |
|
66 |
|
61 |
load_rc_config ${name} |
|
|
62 |
run_rc_command "$1" |
67 |
run_rc_command "$1" |