svc-gdm revision 19134
561N/A#!/bin/sh
561N/A#
837N/A# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
837N/A# Use is subject to license terms.
561N/A#
561N/A#pragma ident "@(#)svc-gdm.src 1.1 06/02/06 SMI"
561N/A#
561N/A# For modifying parameters passed to dtlogin, do not edit
561N/A# this script. Instead use svccfg(1m) to modify the SMF
561N/A# repository. For example:
561N/A#
561N/A# # svccfg
561N/A# svc:> select application/graphical-login/gdm
561N/A# svc:/application/graphical-login/gdm> setprop gdm/args = "--fatal-warnings"
561N/A# svc:/application/graphical-login/gdm> exit
561N/A
561N/A. /lib/svc/share/smf_include.sh
561N/A
561N/Acase "$1" in
561N/A'start')
561N/A FMRI=svc:/application/graphical-login/gdm:default
561N/A
561N/A arg=`eval "echo \`svcprop -p gdm/args $FMRI\`"`
561N/A
561N/A /usr/sbin/gdm $arg &
561N/A
561N/A rc=$?
561N/A if [ $rc != 0 ]; then
561N/A echo "$0: gdm failed with $rc"
561N/A exit 1
837N/A fi
561N/A ;;
561N/A
561N/A'stop')
561N/A PIDFILE=/var/run/gdm.pid
561N/A if test '!' -f $PIDFILE ; then
561N/A echo "$PIDFILE doesn't exist, perhaps GDM isn't running"
837N/A else
561N/A # exec the kill to get the correct return code
561N/A exec kill -TERM `cat $PIDFILE`
561N/A fi
;;
*)
echo "Usage: $0 { start | stop }"
exit 1
;;
esac
exit $SMF_EXIT_OK