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