run a service via startup script (correct me if I am wrong)

Environment

Solaris 9

I have configured the Solaris9 as NTP client in which Solaris9 is syncing the time with a windows2008 R2 Server which is runing fine. Now I want that the xntpd service should start at startup. I did this via a script. Kindly correct if I did any thing wrong:

1.)Made a file under the run level in which my solaris9 boots as defaults.(I verified my default run level is 5 via the command who -r)

#cd /etc/rc3.d/
#touch S99xntpd.sh

2.) Add the below command in the created file
# vi /etc/rc3.d/S99xntpd.sh
/etc/init.d/xntpd start

3.) Verify that the root user has the correct permission

#ls -la

-rwxr--r-- 1 root root 24 Jul 16 13:06 S99xntpd.sh

if you configure /etc/inet/ntp.conf, the service should start without any further scripts!

Thanks for your kind words. But how can I configure ntp.conf ? need suggestion please.

the "search" function is a good start:

1 Like

Thanks for your words. Although what's your comments about what I shared initially regarding what I did. Will my script work ?

can't say... you'll need a config file for your way... so you need to try it if you want to do it that way.

Thanks alot.
As you said:

the "search" function is a good start:
http://www.unix.com/solaris/35057-ho...vironment.html
I read your suggestion but unable to understand how ntp.conf can be used to auto start the ntp service.. Any TIP will be appriciated please

One step is unnecessary (touch), the other ones redundant and might lead to issues. Solaris already has an xntpd service startup.

Or to write a SMF manifest.

Not on Solaris 9. smf was implemented with Solaris 10.