Operating System - HP-UX
1837073 Members
2599 Online
110112 Solutions
New Discussion

need help adding entry into inittab

 
SOLVED
Go to solution
Andrew Imm
New Member

need help adding entry into inittab

I am running Services for Unix 3.0 on Microsoft NT. On my UX 11i I added an entry in the inittab
syncpass:2:respawn:/usr/bin/ssod
I ran the init q afterwards and the process still does not start at bootup. However it will run manually.

Any help would be most appreciated.

Andrew Imm
6 REPLIES 6
PIYUSH D. PATEL
Honored Contributor

Re: need help adding entry into inittab

Hi,

change the run levels.....by default the Unix system boots to run level 3

Check the run level by

# init -r

Change it to 3 and it will work

Piyush
PIYUSH D. PATEL
Honored Contributor

Re: need help adding entry into inittab

Hi,

you can put two/three entries also


syncpass:234:respawn:/usr/bin/ssod

Piyush
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: need help adding entry into inittab

You probably don't want to put this inittab; if you do, you probably want to change 'respawn' to 'once'.

The standard way of starting a process at boot time is to create an entry in /sbin/init.d.
There is a template file there that you can copy and adapt to your needs. You then link the version in /sbin/init.d to start and kill scripts in /sbin/rcN.d.

For example, let's say your script in /sbin/init.d is called 'silly'. You would then make a symbolic link in rc2.d to start the script abd a link in rc1.d to kill the script.

e.g. ln -s /sbin/init.d/silly /sbin/rc2.d/S901silly

ln -s /sbin/init.d/silly /sbin/rc1.d/K099silly.

If the script is started in run-level N (the 'S' script), it should be killed (the 'K' script) in run-level N - 1. By convention, K + S = 1000; that generally brings a service up and down in correct order.

Man rc for details.
If it ain't broke, I can fix that.
MANOJ SRIVASTAVA
Honored Contributor

Re: need help adding entry into inittab

Hi Imma


The entry should look like this :L

syncpass:234:respawn:/usr/bin/ssod


if you want to run it at runlevels 2 ,3 4 and also the file /usr/bin/ssod should be excutable atleast by root.


Manoj Srivastava


PIYUSH D. PATEL
Honored Contributor

Re: need help adding entry into inittab

Hi,

CHECK THE CURRENT RUN LEVEL BY

# who -r

By mistake I wrote init -r.

Piyush
Andrew Imm
New Member

Re: need help adding entry into inittab

Thx for helping out with this. I was able to get it operational. Thx