14638
|
1 |
#!/bin/sh
|
|
2 |
#
|
|
3 |
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
|
|
4 |
# Use is subject to license terms.
|
|
5 |
#
|
|
6 |
#pragma ident "@(#)svc-gdm.src 1.1 06/02/06 SMI"
|
|
7 |
#
|
|
8 |
# For modifying parameters passed to dtlogin, do not edit
|
|
9 |
# this script. Instead use svccfg(1m) to modify the SMF
|
|
10 |
# repository. For example:
|
|
11 |
#
|
|
12 |
# # svccfg
|
|
13 |
# svc:> select application/graphical-login/gdm
|
|
14 |
# svc:/application/graphical-login/gdm> setprop gdm/debug = "true"
|
|
15 |
# svc:/application/graphical-login/gdm> exit
|
|
16 |
|
|
17 |
. /lib/svc/share/smf_include.sh
|
|
18 |
|
|
19 |
case "$1" in
|
|
20 |
'start')
|
|
21 |
|
|
22 |
FMRI=svc:application/graphical-login/gdm
|
|
23 |
|
|
24 |
debug=`svcprop -p gdm/debug $FMRI`
|
|
25 |
|
|
26 |
arg=`eval "echo \`svcprop -p gdm/args $FMRI\`"`
|
|
27 |
|
|
28 |
if [ $debug = "true" ]; then
|
|
29 |
/usr/sbin/gdm $arg --debug
|
|
30 |
else
|
|
31 |
/usr/sbin/gdm $arg
|
|
32 |
fi
|
|
33 |
|
|
34 |
rc=$?
|
|
35 |
if [ $rc != 0 ]; then
|
|
36 |
echo "$0: gdm failed with $rc"
|
|
37 |
exit 1
|
|
38 |
fi
|
|
39 |
;;
|
|
40 |
|
|
41 |
'stop')
|
|
42 |
/usr/sbin/gdm-stop
|
|
43 |
;;
|
|
44 |
|
|
45 |
*)
|
|
46 |
echo "Usage: $0 { start | stop }"
|
|
47 |
exit 1
|
|
48 |
;;
|
|
49 |
esac
|
|
50 |
|
|
51 |
exit $SMF_EXIT_OK
|