ext-sources/svc-gdm
author yippi
Fri, 21 Nov 2008 21:16:14 +0000
changeset 14638 27ceb9334364
child 14641 1ea855bb37af
permissions -rwxr-xr-x
2008-11-21 Brian Cameron <[email protected]> * SUNWgnome-display-mgr.spec, ext-sources/svc-gdm, ext-sources/gdm.xml, base-specs/gdm.xml: Add /lib/svc/method/svc-gdm SMF method file so that the "stop" method does not cause errors on shutdown/restart. * patches/gdm-06-dbus.spec: Remove this patch. It is no longer needed for programs like GOK to startup from GDM since D-Bus autostart is working better now. Renumber other GDM patches.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
14638
27ceb9334364 2008-11-21 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
     1
#!/bin/sh
27ceb9334364 2008-11-21 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
     2
#
27ceb9334364 2008-11-21 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
     3
# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
27ceb9334364 2008-11-21 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
     4
# Use is subject to license terms.
27ceb9334364 2008-11-21 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
     5
#
27ceb9334364 2008-11-21 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
     6
#pragma ident	"@(#)svc-gdm.src	1.1	06/02/06 SMI"
27ceb9334364 2008-11-21 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
     7
#
27ceb9334364 2008-11-21 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
     8
# For modifying parameters passed to dtlogin, do not edit
27ceb9334364 2008-11-21 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
     9
# this script. Instead use svccfg(1m) to modify the SMF
27ceb9334364 2008-11-21 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    10
# repository. For example:
27ceb9334364 2008-11-21 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    11
#
27ceb9334364 2008-11-21 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    12
# # svccfg
27ceb9334364 2008-11-21 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    13
# svc:> select application/graphical-login/gdm
27ceb9334364 2008-11-21 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    14
# svc:/application/graphical-login/gdm> setprop gdm/debug = "true"
27ceb9334364 2008-11-21 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    15
# svc:/application/graphical-login/gdm> exit
27ceb9334364 2008-11-21 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    16
27ceb9334364 2008-11-21 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    17
. /lib/svc/share/smf_include.sh
27ceb9334364 2008-11-21 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    18
27ceb9334364 2008-11-21 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    19
case "$1" in
27ceb9334364 2008-11-21 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    20
'start')
27ceb9334364 2008-11-21 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    21
27ceb9334364 2008-11-21 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    22
	FMRI=svc:application/graphical-login/gdm
27ceb9334364 2008-11-21 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    23
27ceb9334364 2008-11-21 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    24
	debug=`svcprop -p gdm/debug $FMRI`
27ceb9334364 2008-11-21 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    25
27ceb9334364 2008-11-21 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    26
	arg=`eval "echo \`svcprop -p gdm/args $FMRI\`"`
27ceb9334364 2008-11-21 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    27
27ceb9334364 2008-11-21 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    28
	if [ $debug = "true" ]; then
27ceb9334364 2008-11-21 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    29
		/usr/sbin/gdm $arg --debug
27ceb9334364 2008-11-21 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    30
	else
27ceb9334364 2008-11-21 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    31
		/usr/sbin/gdm $arg
27ceb9334364 2008-11-21 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    32
	fi
27ceb9334364 2008-11-21 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    33
27ceb9334364 2008-11-21 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    34
        rc=$?
27ceb9334364 2008-11-21 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    35
	if [ $rc != 0 ]; then
27ceb9334364 2008-11-21 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    36
		echo "$0: gdm failed with $rc"
27ceb9334364 2008-11-21 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    37
		exit 1
27ceb9334364 2008-11-21 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    38
	fi
27ceb9334364 2008-11-21 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    39
	;;
27ceb9334364 2008-11-21 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    40
27ceb9334364 2008-11-21 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    41
'stop')
27ceb9334364 2008-11-21 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    42
        /usr/sbin/gdm-stop
27ceb9334364 2008-11-21 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    43
        ;;
27ceb9334364 2008-11-21 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    44
27ceb9334364 2008-11-21 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    45
*)
27ceb9334364 2008-11-21 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    46
        echo "Usage: $0 { start | stop }"
27ceb9334364 2008-11-21 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    47
        exit 1
27ceb9334364 2008-11-21 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    48
        ;;
27ceb9334364 2008-11-21 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    49
esac
27ceb9334364 2008-11-21 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    50
27ceb9334364 2008-11-21 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    51
exit $SMF_EXIT_OK