Hello list,

I have written two scripts that work together to locate all of the
serially attached devices in a system (including a serial console) as
well as determine how many serial ports the system has, then enable a
login (via agetty) for all unused serial ports.

One of the scripts is a perl script and the other a BASH script.

I want these scripts to run during system startup but I am unsure where I
should place them.

I have examined rc.sysinit, rc{runlevel}.d and rc.local and determined
that they should probably be placed in either rc.sysinit or rc.local.
However, when the scripts are placed in rc.local the system does not boot
properly, that is it gets to the end of rc3.d (it has a default run level
of 3) and goes no further. It is almost like it halts when executing the
BASH script before any gettys have started on the virtual terminals.

Can anyone suggest how I may add these scripts to my system startup
please?
You probably want to
1. Make sure the scripts accept arguments "start" and "stop", and possibly others like "status" and "restart". How to handle each of these should be obvious.


2. Add something like
# chkconfig: 345 10 90
# description: Whatever the script is supposed to do

at the top of your scripts. 10 and 90 control at what points in the startup and shutdown sequences, respectively, the scripts are executed, 345 for which runlevels they are enabled by default; please adjust as necessary. Note that shutdown sequence no is usually 100-<startup sequence no>.

3. chkconfig --add <name of 1st script>
   chkconfig --add <name of 2nd script>


Thanks.


Matthew Richards.


-- redhat-list mailing list unsubscribe mailto:[EMAIL PROTECTED] https://www.redhat.com/mailman/listinfo/redhat-list



--
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]
https://www.redhat.com/mailman/listinfo/redhat-list

Reply via email to