Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

rc local Vs Init Tab

Status
Not open for further replies.

logic4fun1

Programmer
Jun 29, 2006
6
US
All,

I would like to touch a file at a particular location before even init tab fires up in the case of a reboot of the box.

How and what should i use to get this accomplished.

thanks for your help
logic
 
You could try (at your own risk!) adding a second line like:

[tt]si::sysinit:/etc/rc.d/bcheckrc[/tt]

to /etc/inittab. I'm not sure how it would handle multiple 'si' entries though, you may end up with an unbootable system, so keep your rescue boot-disk handy!

Annihilannic.
 
Oops, forgot to modify it:

[tt]si::sysinit:/bin/touch somefilename[/tt]

Annihilannic.
 
Annihilannic, Would that do it "before inittab fires up"?

And a question to logic4fun1; why would you want to do it before inittab?

I was going to suggest to write a bash script and put it into init.d, but inittab still fires up before all init.d scripts in order to determine the runlevel.


I am not sure weather it can be done and I am very not sure weather it is a wise thing to do.



Cheers

QatQat

Life is what happens when you are making other plans.
 
QatQat, no, it wouldn't do it before init fires up... but I don't think you would be able to do anything before init starts without modifying the kernel.

Adding a line to the top of rc.sysinit would probably be the simplest method.

I agree, it's a strange requirement.

Annihilannic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top