Cross Reference: svc-gdm
xref
: /
solaris-userland
/
components
/
gnome
/
gdm
/
files
/
svc-gdm
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
7199
N/A
#!/
bin
/
sh
7199
N/A
#
7199
N/A
# Copyright 2008, 2016, Oracle
and
/
or
its affiliates. All rights reserved.
7199
N/A
#
7199
N/A
# For modifying parameters passed to gdm, do not edit this script.
7199
N/A
# Instead use svccfg(1m) to modify the SMF repository. For example:
7199
N/A
#
7199
N/A
# # svccfg
7199
N/A
# svc:> select
application
/
graphical-login
/
gdm
7199
N/A
# svc:/
application
/
graphical-login
/
gdm
> setprop
gdm
/
args
= "--fatal-warnings"
7199
N/A
# svc:/
application
/
graphical-login
/
gdm
> exit
7199
N/A
7199
N/A
. /
lib
/
svc
/
share
/
smf_include.sh
7199
N/A
7199
N/A
CK_FMRI
=
'svc:/
system
/
consolekit
'
7199
N/A
sessions
=
"
$(
eval
"echo
$(
svcprop
-p
consolekit
/
sessions
$CK_FMRI
)
"
)
"
7199
N/A
7199
N/A
case
"$1"
in
7199
N/A
'start'
)
7199
N/A
FMRI
=
svc
:/
application
/
graphical-login
/
gdm
7199
N/A
7199
N/A
arg
=
"
$(
eval
"echo
$(
svcprop
-p
gdm
/
args
$FMRI
)
"
)
"
7199
N/A
7199
N/A
/
usr
/
sbin
/
gdm
$arg
&
7199
N/A
7199
N/A
rc
=$?
7199
N/A
if
[[
$rc
!=
0
]];
then
7199
N/A
echo
"$0: gdm failed with
$rc
"
7199
N/A
exit
$SMF_EXIT_ERR_FATAL
7199
N/A
fi
7199
N/A
7199
N/A
# If no static sessions started, start dynamic ones
7199
N/A
if
[[ -z
"
$sessions
"
&& -x /
usr
/
lib
/
ConsoleKit
/
dsession
]];
then
7199
N/A
sleep
2
7199
N/A
/
usr
/
lib
/
ConsoleKit
/
dsession
--
init
7199
N/A
fi
7199
N/A
;;
7199
N/A
7199
N/A
'stop'
)
7199
N/A
if
[[ -z
"
$sessions
"
&& -x /
usr
/
lib
/
ConsoleKit
/
dsession
]];
then
7199
N/A
/
usr
/
lib
/
ConsoleKit
/
dsession
--
fini
7199
N/A
fi
7199
N/A
7199
N/A
PIDFILE
=
'/
var
/
run
/
gdm
/
gdm.pid
'
7199
N/A
if
[[ ! -f
$PIDFILE
]] ;
then
7199
N/A
echo
"
$PIDFILE
doesn't exist, perhaps GDM isn't running"
7199
N/A
else
7199
N/A
kill
-
TERM
$(
cat
$PIDFILE
)
&&
sleep
5
7199
N/A
fi
7199
N/A
# kill any stragglers that gdm itself didn't kill off
7199
N/A
smf_kill_contract
$
2
TERM
1
30
7199
N/A
[[ $? -
ne
0
]] &&
exit
1
7199
N/A
;;
7199
N/A
7199
N/A
*)
7199
N/A
echo
"Usage: $0 { start | stop }"
7199
N/A
exit
$SMF_EXIT_ERR_FATAL
7199
N/A
;;
7199
N/A
esac
7199
N/A
7199
N/A
exit
$SMF_EXIT_OK