Technical data

8. Documentation for Developers
Number Task
000-099 Base system (hardware, time zone, file system)
100-199 Kernel modules (drivers)
200-299 External connections (PPPoE, ISDN4Linux, PPtP)
300-399 Network (Routing, Interfaces, Packet filter)
400-499 Server (DHCP, HTTPD, Proxy, a.s.o.)
500-900 Any
900-997 Anything causing a dialin
998-999 reserved (please do not use!)
3. These scripts shall not contain writing to files that could be part of the opt archive,
because these files could be located on a volume mounted in read-only mode. If you
have to modify such a file, you have to make it writeable before by using the function
mk_writable (see below). This will create a writable copy of the file in the RootFS if
needed. If the file is already writable the call of mk_writable will have no effect.
Important: mk_writable has to be applied directly to files in RootFS, not indirectly
via the opt directory. If, for example, you want to modify /usr/local/bin/foo, the
function mk_writable has to be called with the argument /usr/local/bin/foo.
4. Before executing the actual commands these scripts have to check for the associated OPT
really being active. This is usually done by a simple if-case:
if [ "$OPT_<OPT-Name>" = "yes" ]
then
...
# Start OPT here!
...
fi
5. For easier debugging the scripts should be enclosed in begin_script and end_script:
if [ "$OPT_<OPT-Name>" = "yes" ]
then
begin_script FOO "configuring foo ..."
...
end_script
fi
Debugging of start-scripts may be activated simply via FOO_DO_DEBUG='yes'.
6. All configuration variables are available to the scripts in direct. Explanations how to
access configuration variables in scripts can be found in the section “Working with con-
figuration variables” (Page 318).
7. The path /opt may not be used for storing OPT data. If in need of additional file space
you should enable the user to define a suitable location by using a configuration variable.
Depending on the type of data to be stored (persistent or transient data) different default
332