Home | History | Annotate | Download | only in ext-sources
      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 	FMRI=svc:/application/graphical-login/gdm:default
     22 
     23 	debug=`svcprop -p gdm/debug $FMRI`
     24 
     25 	arg=`eval "echo \`svcprop -p gdm/args $FMRI\`"`
     26 
     27 	if [ "x$debug" = "xtrue" ]; then
     28 		/usr/sbin/gdm $arg --debug &
     29 	else
     30 		/usr/sbin/gdm $arg &
     31 	fi
     32 
     33 	rc=$?
     34 	if [ $rc != 0 ]; then
     35 		echo "$0: gdm failed with $rc"
     36 		exit 1
     37 	fi
     38 	;;
     39 
     40 'stop')
     41 	/usr/sbin/gdm-stop
     42 	;;
     43 
     44 *)
     45 	echo "Usage: $0 { start | stop }"
     46 	exit 1
     47 	;;
     48 esac
     49 
     50 exit $SMF_EXIT_OK
     51