RC_COPY=/etc/init.d/dtlogin
+XCOMM
+XCOMM Allow for configured and factory versions of dtlogin.xml
+XCOMM
+
+if [ -f CDE_CONFIGURATION_TOP/config/dtlogin.xml ]
+then
+ SVC_MASTER=CDE_CONFIGURATION_TOP/config/dtlogin.xml
+elif [ -f CDE_INSTALLATION_TOP/config/dtlogin.xml ]
+then
+ SVC_MASTER=CDE_INSTALLATION_TOP/config/dtlogin.xml
+fi
+
+SVC_COPY=application/graphical-login/dtlogin
+
LEVEL_0_KILL=/etc/rc0.d/K10dtlogin
LEVEL_1_KILL=/etc/rc1.d/K10dtlogin
LEVEL_2_START=/etc/rc2.d/S99dtlogin
case "$mode" in
'-d')
- /usr/bin/rm -f $LEVEL_2_START
+ if [ -f /usr/sbin/svcadm ]; then
+ if svcs $SVC_COPY >/dev/null 2>&1; then
+ if ! svcadm disable $SVC_COPY >/dev/null; then
+ Message 12 "disable failed"
+ Message 13 "could not disable dtlogin service" "svc-dtlogin"
+ exit 1
+ fi
+ fi
+ else
- if [ -f $LEVEL_2_START ]; then
- Message 12 "disable failed"
- Message 13 "could not remove $LEVEL_2_START" $LEVEL_2_START
- exit 1
+ /usr/bin/rm -f $LEVEL_2_START
+
+ if [ -f $LEVEL_2_START ]; then
+ Message 12 "disable failed"
+ Message 13 "could not remove $LEVEL_2_START" $LEVEL_2_START
+ exit 1
+ fi
fi
Message 14 "done"
;;
'-e')
- if [ -f $RC_MASTER ]; then
+ if [ -f /usr/sbin/svcadm ]; then
+ if ! svcs $SVC_COPY >/dev/null 2>&1; then
+ if ! svccfg import $SVC_MASTER; then
+ Message 16 "Enable Failed"
+ Message 17 "could not import $SVC_MASTER" $SVC_MASTER
+ exit 1
+ fi
+ elif ! svcadm enable $SVC_COPY >/dev/null; then
+ Message 16 "enable failed"
+ Message 17 "could not enable dtlogin service" svc-dtlogin
+ exit 1
+ fi
+ else
+ if [ -f $RC_MASTER ]; then
/usr/bin/rm -f $RC_COPY
- fi
+ fi
- if [ ! -x $RC_COPY ]; then
- if [ ! -f $RC_MASTER ]; then
+ if [ ! -x $RC_COPY ]; then
+ if [ ! -f $RC_MASTER ]; then
Message 16 "enable failed"
Message 17 "could not find $RC_MASTER" $RC_MASTER
exit 1
- fi
+ fi
- /usr/bin/cp $RC_MASTER $RC_COPY
- /usr/bin/chmod 0555 $RC_COPY
+ /usr/bin/cp $RC_MASTER $RC_COPY
+ /usr/bin/chmod 0555 $RC_COPY
- if [ ! -x $RC_COPY ]; then
+ if [ ! -x $RC_COPY ]; then
Message 16 "enable failed"
Message 18 "could not create $RC_COPY" $RC_COPY
exit 1
- fi
- fi
+ fi
+ fi
- /usr/bin/rm -f $LEVEL_0_KILL
- /usr/bin/ln $RC_COPY $LEVEL_0_KILL
+ /usr/bin/rm -f $LEVEL_0_KILL
+ /usr/bin/ln $RC_COPY $LEVEL_0_KILL
- /usr/bin/rm -f $LEVEL_1_KILL
- /usr/bin/ln $RC_COPY $LEVEL_1_KILL
+ /usr/bin/rm -f $LEVEL_1_KILL
+ /usr/bin/ln $RC_COPY $LEVEL_1_KILL
- /usr/bin/rm -f $LEVEL_2_START
- /usr/bin/ln $RC_COPY $LEVEL_2_START
+ /usr/bin/rm -f $LEVEL_2_START
+ /usr/bin/ln $RC_COPY $LEVEL_2_START
- if [ ! -f $LEVEL_2_START ]; then
- Message 16 "enable failed"
- Message 19 "could not create $LEVEL_2_START" $LEVEL_2_START
- exit 1
- fi
+ if [ ! -f $LEVEL_2_START ]; then
+ Message 16 "enable failed"
+ Message 19 "could not create $LEVEL_2_START" $LEVEL_2_START
+ exit 1
+ fi
+ fi
Message 14 "done"
Message 20 "desktop auto-start enabled."
;;
;;
'-kill')
+ if [ -f /usr/sbin/svcadm ]; then
+ svcadm disable -t $SVC_COPY
+ fi
+
rc_master_check
$RC_MASTER stop
--- /dev/null
+<?xml version='1.0'?>
+<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
+<service_bundle type='manifest' name='export'>
+ <service name='application/graphical-login/dtlogin' type='service' version='0'>
+ <dependency name='filesystem' grouping='require_all' restart_on='none' type='service'>
+ <service_fmri value='svc:/system/filesystem/local'/>
+ </dependency>
+ <dependency name='multi-user' grouping='require_all' restart_on='error' type='service'>
+ <service_fmri value='svc:/milestone/multi-user:default'/>
+ </dependency>
+ <dependency name='sysconfig' grouping='require_all' restart_on='none' type='service'>
+ <service_fmri value='svc:/milestone/sysconfig'/>
+ </dependency>
+ <dependency name='fc-cache' grouping='require_all' restart_on='none' type='service'>
+ <service_fmri value='svc:/application/font/fc-cache'/>
+ </dependency>
+ <dependency name='utmpx' grouping='require_all' restart_on='none' type='service'>
+ <service_fmri value='svc:/system/utmp'/>
+ </dependency>
+ <dependency name='hal' grouping='require_all' restart_on='none' type='service'>
+ <service_fmri value='svc:/system/hal'/>
+ </dependency>
+ <dependency name='dbus' grouping='require_all' restart_on='none' type='service'>
+ <service_fmri value='svc:/system/dbus'/>
+ </dependency>
+ <dependency name='graphical-login' grouping='exclude_all' restart_on='none' type='service'>
+ <service_fmri value='svc:/application/graphical-login/lightdm'/>
+ <service_fmri value='svc:/application/graphical-login/gdm'/>
+ <service_fmri value='svc:/application/graphical-login/xdm'/>
+ </dependency>
+ <instance name='default' enabled='true'>
+ <exec_method name='start' type='method' exec='/usr/dt/bin/dtlogin -daemon' timeout_seconds='60'/>
+ <exec_method name='stop' type='method' exec='/usr/dt/bin/dtconfig -kill' timeout_seconds='60'/>
+ <exec_method name='refresh' type='method' exec='/usr/dt/bin/dtconfig -reset' timeout_seconds='60'/>
+ <property_group name='dtlogin' type='application'>
+ <propval name='args' type='astring' value=''/>
+ </property_group>
+ <property_group name='general' type='framework'>
+ <propval name='action_authorization' type='astring' value='solaris.smf.manage.dt.login'/>
+ </property_group>
+ </instance>
+ <template>
+ <common_name>
+ <loctext xml:lang='C'>Desktop Login Manager</loctext>
+ </common_name>
+ <description>
+ <loctext xml:lang='C'>Desktop Login Manager</loctext>
+ </description>
+ <documentation>
+ <manpage title='dtlogin' section='1' manpath='/usr/dt/man'/>
+ </documentation>
+ </template>
+ </service>
+</service_bundle>