How is it work...
This page is concerned with installation of all scripts.
1.Purposes of each script.
2.How to set up scripts.
Ctrlserv.pl - is a small script, that will be started by crond. It will find out and process configuration files uploaded from the terminals.
Compareserv.pl - this script will compare old and new configuration files and decide: just delete file or copy it to "tocompile" directory.
Typeserv.pl - this script will be started if new terminal is found. It creates new record in dhcpd.conf file about new terminal and moves termconf
file into "tocompile" directory.
Compileserv.sh - this script will be started by crond. It collects termconf files from "tocompile" directory and compiles kernel for each new
(or terminal, which hardware configuration has changed) terminal.
Compiler.pl - compiles kernels according to terminal hardware configuration.
2.Setting up scripts.
All scripts(except Compiler.pl, it must be placed in kernel directory) must be placed in one directory! For example "/root/thinnet/".
At the first you must change your inetd.conf file. Line like this "tftp dgram udp wait root /usr/sbin/in.tftpd in.tftpd -s /tftpboot" should change to
"tftp dgram udp wait root /usr/sbin/in.tftpd in.tftpd -s -c /tftpboot", where "-c" option alows terminals to write in "/tftpboot" directory.I know, that it's maybe dangerous,
so give me advice how to solve this problem.
At the second you must create four subdirectories in "/tftpboot".
In "subnet" section of your dhcpd.conf file you should ad link to "/tftpboot/default" directory files. Something like this:
- Directory "/tftpboot/default". In this directory you must place default files for new terminals (kernel, initrd etc).
Release, which you can download here contain subdirectory with all theese files.
- Directory "/tftpboot/curtermconf". Scripts will place current terminal configuration files in this directory.
- Directory "/tftpboot/termconf". Terminals will send termconf files in this directory. Change permissions on this directory,
that tftpd can write files here.
- Directory "/tftpboot/tocompile". Scripts will place and get termconf files to compile new kernels.
option nbgrub-menu code 150 = text;
option nbgrub-menu "/default/menu.lst";
It allowes to plug in new terminals without server administrator. You just need to plug in network cable. New terminal downloads default kernel and initrd file,
sends termconf file and will be installed properly, when Ctrlserv.sh checks up "/tftpboot/termconf" next time.
Changing initrd file. You must change some files in initrd to correct work of scripts. Mount initrd and:
Put "save.config" kernel configuration file in directory, where kernel source code is placed (version 0.4 can work with kernels 2.4.xx).
Look inside all scripts. There are some directions to set up work paths.
At the end you must set up crond to start scripts:
- Change file "initrd/bin/sendif.sh". It will be made by Install.pl(or look inside...).
If you have some questions, advices, or find a bug contact me, please.