Quote:> I have 2 easy( or at least I hope so) questions for you.
Yup.
Quote:> #1: I need to load two drivers and make a program run in batch mode
> at boot time,say when everything is up and ready for login
> command.Where do I put these instructions or what I have to do?
Depends on your version of `init'. Which probably depends on your
distribution of Linux. In Debian (which uses sysvinit), for example,
just add the necessary script or a symbolic link to same to /etc/rc2.d/
or whichever runlevel you want this to happen in. For more info read
up on `init'.
Quote:> #2: I need,from a C program,to make Linux reboot when something weird
> is happening.WHat call I need to do within the program?
You could call the reboot syscall directly but the cleanest way to do
this is probably through a watchdog timer. Configure your kernel with
"softdog" support (in the "character devices" section) and read up on
it. Basically this is a file in /dev which your program opens and
periodically writes to. If it closes the file or doesn't write to it
for a certain amount of time, Linux will assume that something has hung
or otherwise gone wrong and will reboot.
--
Peter Samuelson
<sampo.creighton.edu!psamuels>