O'Reilly logo

Linux and Unix Shell Programming by David Tansley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

28.5. Using inittab to launch applications

There are other ways to start up applications; indeed, you can do this by placing an entry in inittab. On a couple of systems I look after, I have entries in inittab, not because these systems do not have run level directories, but because I have a few system checker scripts that I want to be run as soon as the system has finished coming up. Inittab is an ideal place to put these.

For this example we’ll use one of my disk mirror check scripts that is run as soon as we are in run level 3. First I make sure the script runs properly, then make a backup copy of inittab.

						$ cp /etc/inittab /etc/inittab.bak
					

Next edit inittab. I make the following entry at the end of the file.

 # disk checker script, let’s ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required