Technical data

8. Documentation for Developers
1. The first column contains the name of a variable which triggers inclusion of the file
referenced in the third column depending on its value in the package’s config file. The
name of a variable may appear in the first column as often as needed if multiple files
depend on it. Any variable that appears in the file opt/<PACKAGE>.txt is marked by
mkfli4l.
If multiple variables should be tested for the same value a list of variables (separated by
commas) can be used instead. It is sufficient in this case if at least one variable contains
the value required in the second column. It is important not to use spaces between the
individual variables!
In OPT variables (ie variables that begin with OPT_ and typically have the type YESNO),
the prefix OPT_ can be omitted. It does not matter whether variables are noted in
upper- or lowercase (or mixed).
2. The second column contains a value. If the variable in the first column is identical with
this value and is activated too (see below), the file referenced in the third column will be
included. If the first column contains a %-variable it will be iterated over all indices and
checked whether the respective variable matches the value. If this is the case copying
will be executed. In addition, the copy process based on the current value of the variable
will be logged.
It is possible to write a “!” in front of the value. In this case, the test is negated, meaning
the file is only copied if the variable does not contain the value.
3. In the third column a file name is referenced. The path must be given relative to the
opt directory. The file must exist and be readable, otherwise an error is raised while
generating the boot medium and the build process is aborted.
If the file name is prefixed with a rootfs:” the file is included in the list of files to be
copied to the RootFS. The prefix will be stripped before.
If the file is located below the current configuration directory it is added to the list of
files to be copied from there, otherwise the file found below opt is taken. Those files are
not allowed to have a rootfs: prefix.
If the file to copy is a kernel module the actual kernel version may be substituted by
${KERNEL_VERSION}. mkfli4l will then pick the version from the configuration and place
it there. Using this you may provide modules for several kernel versions for the package
and the module matching the current kernel version will be copied to the router. For
kernel modules the path may be omitted, mkfli4l will find the module using modules.dep
and modules.alias, see the section “Automatically Resolving Dependencies for Kernel
Modules” (Page 291).
4. the other columns may contain the options for owner, group, rights for files and conversion
listed in table 8.2.
Some examples:
copy file if OPT_TELNETD='yes', set its uid/gid to root and the rights to 755 (rwxr-xr-x)
telnetd yes files/usr/sbin/in.telnetd mode=755
288