Hi,
In Solaris 9 and below release we are using the rc script in inittab. I don't have much idea abt inittab in Solaris.
In Solris 9 and below:
We use rc3 script to start up the server. And we run database script before the rc3.
os:23:respawn:/etc/init.d/database start >/dev/null 2>&1
s3:3:wait:/sbin/rc3 >/dev/msglog 2<>/dev/msglog </dev/console
Now I install my product in Solaris 10 and the
Initab entry looks like
ap::sysinit:/sbin/autopush -f /etc/iu.ap
sp::sysinit:/sbin/soconfig -f /etc/sock2path
smf::sysinit:/lib/svc/bin/svc.startd >/dev/msglog 2<>/dev/msglog </dev/console
p3:s1234:powerfail:/usr/sbin/shutdown -y -i5 -g0 >/dev/msglog 2<>/dev/msglog
pt:s1234:powerfail:/usr/lib/svc/method/installupdates lock
When I check svcs -a
The database has not been started before the server boot.
So the server reboot has been failed
Now I need to know how I can start the database, when I reboot the server.
Please help me where I need to add that path. How can I add the path to SVCS(SMF). L
Regards,
Kalai
Thanks a lot
I need one more information.
Whre i need to mention for respawn.
Also i need to add this sevrice between existing service.
Thanks a lot
I just followed the steps given.
when i check svcs newservice it provieds the following output.
STATE STIME FMRI
offline 20:18:18 svc:/site/newservice:default
i tried to enable but it does not get enabled.
# svcadm -v enable site/newservice
svc:/site/newservice:default enabled.
# svcs newservice
STATE STIME FMRI
offline 20:18:18 svc:/site/newservice:default
How can i enable the service.It should get work while rebooting the server.
It must be missing a dependency. Do:
svcs -l newservice
the dependency is missing,
So what i need to add to dependency,what path need to be mentioned.
telepath@design5: svcs -l newservice.
svcs: Pattern 'newservice.' doesn't match any instances
svcs -l svc:/site/newservice:default
In solaris9 and below the following data is available in inittab.
s3:3:wait:/sbin/rc3 >/dev/msglog 2<>/dev/msglog </dev/console
In Solaris 10 I tried to create a service for above rc3 script and in dependency I mentioned the below detail
</dependency>
<dependency
name='usr'
type='service'
grouping='require_all'
restart_on='none'>
<service_fmri value='svc:/sbin/rc3'/>
</dependency>
Now the service is not getting enabled.
# svcs -l svc:/site/newservice:default
fmri svc:/site/newservice:default
name New Service
enabled true
state offline
next_state none
state_time Mon 16 Mar 2009 08:43:40 PM PDT
restarter svc:/system/svc/restarter:default
dependency require_all/none svc:/sbin/rc3 (absent)
please help me to create the service.
Correct me the mistake I have done.
Regards,
Kalai