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