inittab always restarts a process which was commented out


 
Thread Tools Search this Thread
Operating Systems HP-UX inittab always restarts a process which was commented out
# 1  
Old 06-08-2006
Power inittab always restarts a process which was commented out

I have a script that reads the /etc/inittab file and puts a # in front of the line with my program. Then I do a "init q". But the process is restarted at once. Smilie I need the process stopped, because I want to replace the binary!

Who can advise?
# 2  
Old 06-08-2006
init does not support any way of commenting out a line from inittab. And removing the line would not be the right thing to do anyway. Edit the action field and change "respawn" to "off". Then "init q" will cause init to immediately kill the process in question and it won't restart it. Change it back to respawn and do another "init q" to get it going again after you replace the binary.
# 3  
Old 06-08-2006
In the meanwhile I found out that another process did a "init q" with the "inittab-before-the-modifying".

I found it easier to add only a comment than changing "respawn" to "off". Smilie

Thanks for helping.
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Read command restarts at beginning of file

I am reading in a file in a Korn shell script. The file has one header row followed by possibly millions of data rows. I want to do one thing to the header row and write it out to a new output file, then something different to the data rows. My code looks like this: read header < $infile ... (4 Replies)
Discussion started by: DJR
4 Replies

2. Solaris

Unix restarts error in sar command

Hi Folks, I am again here with a peculier problem. Please see the code root@celdws01: # sar -u -f /var/adm/sa/sa21 SunOS celdws01 5.9 Generic_118558-34 sun4u 12/21/2011 10:10:09 %usr %sys %wio %idle 10:10:09 unix restarts Can anyone help me in... (9 Replies)
Discussion started by: vivek.goel.piet
9 Replies

3. UNIX for Dummies Questions & Answers

What breaks inittab

Today there was a situation where processes running from inittab was broken. Can someone help me understand, how to find out, who might have stopped those processes? Or how does it get broken? G (2 Replies)
Discussion started by: ggayathri
2 Replies

4. Windows & DOS: Issues & Discussions

system restarts after shutdown!!

Hello, from last few days my laptop is not whutting down properly.. when ever i ty to shutdown it restarts again.. what may be problem?? antivirus is updated till date.. and i use windows xp sp2.... regards, deepak. (5 Replies)
Discussion started by: smarty86
5 Replies

5. Red Hat

Network always restarts

Hi guys :) I got a big problem. Yesterday I changed the IP of a server. Then i restarted the network service, did a DNS entry and so on. Nameserver are the same as always. After a few minutes after boot the network disconnects -> no ping, no ssh. Approximately 30 seconds later it starts... (1 Reply)
Discussion started by: mario_linux
1 Replies

6. UNIX for Dummies Questions & Answers

Selecteing only non commented rows

Hi, I have develop a script that will read a single line from file and do some operations.But now my problwm is that if in that file suppose 1 line is commented, then i have to ignore that line...Can anybody help me out to solve this issue?:confused: Details are: Script: #!/bin/sh... (1 Reply)
Discussion started by: Amey Joshi
1 Replies

7. Shell Programming and Scripting

File deletion when server restarts

Hi, In a shell script I am makin use of 3 files f1,f2 and f3.txt. When the Unix server is restarted I want to delete all these 3 files if they are existing. ( I suppose I will have to use this command rm /thefilepath/f* but dont know in which script to use.) Anyone knows what can be... (6 Replies)
Discussion started by: k_oops9
6 Replies

8. UNIX for Dummies Questions & Answers

inittab solaris

Hi! Is it possible to add more ttys in Solaris, like with inittab in Linux? I want to switch between the ttys with Alt F1+F2+F3 .... like Linux does. How can i do this? (1 Reply)
Discussion started by: donald1111
1 Replies
Login or Register to Ask a Question