Once you have your webconf working, you will want to package it for
future use (and sharing with others!). The
webconf.lrp
is configured to
exclude the /etc/webconf
and
/var/webconf
directories, so your changes
will not be backed up in any existing package. You must
create a package to be able to load the webconf plugin later. There are
two ways to do this:
If your webconf plugin consists only of
/etc/webconf/*.webconf
and
/var/webconf/www/*
files, the recommended packaging
is as a Leaf Webconf
Plugin. This is because the plugin does not have
configuration data that changes and all of the files are in directories
that are excluded from other backups. The .lwp
package is a tar.gz file with the plugin files. No "lrp" related
meta-information is needed.
Name your .lwp the same as the package name. The webconf init script normally looks for .lwp files for all the installed .lrp packages.
Here's how you can create a LWP for dropbear:
cd / tar zcvf ~/dropbear.lwp etc/webconf/dropbear.webconf var/webconf/www/dropbear.cgi
You can then copy the dropbear.lwp
to your
boot media.
Since your .lwp file will share the same name as the man .lrp package, please include your contact information somewhere in the .cgi. For instance, include your contact infromation in the footer.sh tagline. (See footer.sh above.) This is a courtesy so that the package maintainer doesn't get questions based on your plugin.
If your webconf plugin consists of files that exist outside of the
/var/webconf/*
directory tree, you must create a
standard .lrp file. This is to ensure that the files from the plugin are
not absorbed into another .lrp when a backup is done.
An example of a plugin that must be a .lrp is lrpstat. Lrpstat
installs a program in /usr/sbin
; this would be
absorbed by root.lrp if it is not listed in another
/var/lib/lrpkg/*.list
file.
When creating a .lrp style plugin, you must add the package to the
leaf.cfg
file. The Webconf init script will not
automatically load .lrps.