23245293 Move gdm to Userland and update to 3.18.2
PSARC/2016/448 GNOME Display Manager (GDM) v3.18
23245463 Move desktop-startup 0.38.0 to Userland
16882229 Desktop packages should remove restart_fmri=svc:/system/rbac:default
21020801 Add "RO" to res1 field of auth_attr.d files in gdm
21020166 html help files in gdm for RBAC profiles and authorizations must go
22134482 svc:/application/graphical-login/gdm goes into maintenance when gdm coredumps
#!/bin/sh
#
# Copyright 2008, 2016, Oracle and/or its affiliates. All rights reserved.
#
# For modifying parameters passed to gdm, do not edit this script.
# Instead use svccfg(1m) to modify the SMF repository. For example:
#
# # svccfg
# svc:> select application/graphical-login/gdm
# svc:/application/graphical-login/gdm> setprop gdm/args = "--fatal-warnings"
# svc:/application/graphical-login/gdm> exit
. /lib/svc/share/smf_include.sh
CK_FMRI='svc:/system/consolekit'
sessions="$(eval "echo $(svcprop -p consolekit/sessions $CK_FMRI)")"
case "$1" in
'start')
FMRI=svc:/application/graphical-login/gdm
arg="$(eval "echo $(svcprop -p gdm/args $FMRI)")"
/usr/sbin/gdm $arg &
rc=$?
if [[ $rc != 0 ]]; then
echo "$0: gdm failed with $rc"
exit $SMF_EXIT_ERR_FATAL
fi
# If no static sessions started, start dynamic ones
if [[ -z "$sessions" && -x /usr/lib/ConsoleKit/dsession ]]; then
sleep 2
/usr/lib/ConsoleKit/dsession --init
fi
;;
'stop')
if [[ -z "$sessions" && -x /usr/lib/ConsoleKit/dsession ]]; then
/usr/lib/ConsoleKit/dsession --fini
fi
PIDFILE='/var/run/gdm/gdm.pid'
if [[ ! -f $PIDFILE ]] ; then
echo "$PIDFILE doesn't exist, perhaps GDM isn't running"
else
kill -TERM $(cat $PIDFILE) && sleep 5
fi
# kill any stragglers that gdm itself didn't kill off
smf_kill_contract $2 TERM 1 30
[[ $? -ne 0 ]] && exit 1
;;
*)
echo "Usage: $0 { start | stop }"
exit $SMF_EXIT_ERR_FATAL
;;
esac
exit $SMF_EXIT_OK