Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Need help.
How can I reconfigure the initialization process in such a way that while the system is switching to runlevel 2, as a first message displayed there will be:
Hello there !
And while the system is switching to runlevel 0 or 6 the last message (except "System halted" or similar generated by the kernel itself) should be:
Good bye.
I know that I have to write the script and links. But I don't know how to do it. This is my first time to learn about Administration. Can anyone help me?

Have a look in /etc/rc.d/init.d and you will find a bunch of scripts. These control the daemons/services etc that are started when going into or switching run levels.
Now have a look in /etc/rc3.d/ and you will see a bunch of symbolic links pointing to the scripts in the above folder. Notice that they all start with either an S or a K and a number. The K indicates that the specified service should be killed when entering that run level and the S shows which ones should be started. The numbers refer to the order in which they are run, going from low to high.
So for your examples, to get something running straight away in run level 2, your script should be linked to by /etc/rc2.d/S00hello.....last thing in run level 6: /etc/rc6.d/K99goodbye (or possibly /etc/rc6.d/S00goodbye)
Have a look at how the other scripts in /etc/rc.d/init.d are constructed if you want to write your own.

![]() |
Installing Downloaded pro...
|
german news forum ?
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |