/usr/sbin and /usr/share vs. /opt...
This is a massive change for cfg2html and one that will be quite controversial as well as difficult to manage. cfg2html has been in the /opt directory for many, many years -- a directory that I believe is the proper location for HP-UX.
The HP-UX directory structure changed more than 15 years ago from Sys V.3 layout to Sys V.4 starting in 1995 (with HP-UX 10.01) and defines the content for the system directories.
From man hier on HP-UX:
/opt Root of subtree for optional application packages.
/usr/sbin System administration commands.
/usr/share Architecture-independent sharable files.
For HP-UX, /usr/sbin has been reserved for HP-supplied administration commands for the root user. I don’t see any code there that is not provided by HP for the OS.
/usr/share was designated as the documentation directory containing man pages, dictionaries and libraries that are mostly based on text files. There is not a single executable file in any of the /usr/share hierarchy for an HP-UX installation.
/opt on the other hand was intended as an application or package hierarchy, one in which the startup, config, doc, and library directories could be stored in a single location.
So the change for cfg2html is not only unexpected, but is quite non-standard, leading to additional consequences such as install and versioning issues. I have not looked at the software distributor scripts but to be compliant with SD, the software should be able to update, revert and uninstall. For this new mapping, the /opt/cfg2html directory would have to be archived (or removed) during version 6 installation, and ideally, be able to be restored using swremove. With the standard /opt hierarchy, this is a simple task. But with the /usr/share hierarchy, this becomes much less intuitive and will require some extensive testing and special README documentation.
Here are the new directories that I have found:
/usr/sbin
/etc/cfg2html
/var/log/cfg2html
/usr/share/cfg2html
/usr/share/doc/cfg2html
/usr/newconfig/etc/cfg2html
There are two config files that need to be documented: local.conf and default.conf but no docs covering what should be there, specifically the local.conf file.
The README and man page have a lot of obsolete information and the history files are missing anything for version 5.
The man page for cfg2html needs a symlink added as part of the install so it appears in /usr/share/man/man8. This will avoid the extra step of adding it onto the end of /etc/MANPATH.
For Linux, the manpage man hier I see:
/usr/sbin
This directory contains program binaries for system administration
which are not essential for the boot process, for mounting /usr,
or for system repair.
/usr/share
This directory contains subdirectories with specific application
data, that can be shared among different architectures of the
same OS. Often one finds stuff here that used to live in
/usr/doc or /usr/lib or /usr/man.
/opt
This directory should contain add-on packages that contain static files.
I do see that on a couple of RedHat versions I checked (RH5.6 and RH6.0), nothing is in /opt, so it would appear that Linux is moving /opt to /usr/share per the LSB (Linux Standard Base) recommendation. This seems to match Solaris, but not AIX or HP-UX.
On the other hand, I’m not sure how much shareable content there is between the two OS’s. Other than the top level section headers, most of the individual categories are quite different, by name and/or the collection method. Maintaining Linux and HP-UX as separate products seems like a much simpler task, much like maintaining the Solaris and AIX versions in the past. I can see that HTML formatting and temp files might be shareable between HP-UX and Linux but with so little in common with plugins, I don't see any significant value to using a shared code environment.
Some background on Linux FHS
http://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard
I’m not sure how LSB and FHS fit together.
http://www.linuxfoundation.org/collaborate/workgroups/lsb
I would recommend that the two OS streams be split, and the HP-UX ver 6 for cfg2html be left in /opt with the primary script trimmed to HP-UX only (drop the Linux tests).
Bill Hassell (pooderbill)