openjdk-23: use OpenJDK 23 as the boot JDK
[oi-userland.git] / components / library / ConsoleKit / files / svc-consolekit
blob75a393879d3326229c7071725330eeef91676750
1 #!/sbin/sh
3 # Copyright 2011, 2014 Oracle and/or its affiliates. All rights reserved.
4 # Use is subject to license terms.
6 # For modifying parameters passed to dtlogin, do not edit
7 # this script. Instead use svccfg(1m) to modify the SMF
8 # repository. For example:
10 # # svccfg
11 # svc:> select system/consolekit
12 # svc:/system/consolekit> setprop consolekit/args = "--fatal-warnings"
13 # svc:/system/consolekit> exit
15 . /lib/svc/share/smf_include.sh
17 case "$1" in
18 'start')
19 FMRI=svc:/system/consolekit
21 arg=`eval "echo \`svcprop -p consolekit/args $FMRI\`"`
23 SEATFILE=/etc/ConsoleKit/seats.d/00-primary.seat
25 rep=`eval "echo \`svcprop -p consolekit/sessions $FMRI\`"`
27 curline=`sed -n "/Sessions=/p" $SEATFILE`
28 cur=`expr $curline : "Sessions=\(.*\);"`
30 if [[ $cur != $rep ]]; then
31 /usr/bin/ex $SEATFILE << EOF
32 /$curline
33 s/$curline/Sessions=$rep;/
36 EOF
39 /usr/sbin/console-kit-daemon $arg
41 rc=$?
42 if [ $rc -ne 0 ]; then
43 echo "$0: consolekit failed with $rc"
44 exit $SMF_EXIT_ERR_FATAL
49 echo "Usage: $0 { start }"
50 exit $SMF_EXIT_ERR_FATAL
52 esac
54 exit $SMF_EXIT_OK