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