I'm currently working on a set of scripts for collecting different types of system information from a very heterogeneous network (Linux, BSD, HPUX, AIX, SGI) and building a repository.
My current script is HUGE since it has to support the neuonces of all of the operating systems. What I was hoping to do was break it into separate "plug-ins" if you will that will only get loaded/run on specific platforms.
I though about putting them in separate packages/namespaces and then manually editing the scripts to include only the specific packages I needed, but in that case I might as well write individual scripts for each type of host. Also, some of the systems have certain aspects that I'd like to collect data on, and others that I don't.
Basically I'm looking for anyone that's had experience in writing "pluginable code" or knows of some sample code that I can look at. Any suggestions on a course of action to start working on?