[xen-tools-discuss] Another xen-tools change I have in mind: Clean up the hooks directory

Steve Kemp steve at steve.org.uk
Sat Apr 10 18:34:16 CEST 2010


On Sat Apr 10, 2010 at 15:23:17 +0200, Axel Beckert wrote:

> Currently we have one directory for Ubuntu and Fedora named after the
> first supported release which is then duplicated for each subsequent
> release.

  Ack.

> I'm sure this won't scale forever. So to minimise code duplication I'd
> like to have one common directory per distribution (e.g. called
> ubuntu-common, fedora-common, etc.) with generic hooks valid for all
> or most of the releases of one distribution and then one hook
> directory per release (e.g. called ubuntu-10.04 or ubuntu-lucid or so)
> which has symbolic links to everything which can be used unchanged
> from the common directory and new files for everything which has to be
> different or only there.

> Any comments?

  This is a great idea, and I think you can even go further by having
 "common" be a hook of its own.  So rather than running hooks soley
 based upon the distro you'd run:

    run-parts common/
    run-parts $distro/

  For example.  There isn't too much that would go in common, but
 off the top of my head trivial steps such as copying resolv.conf,
 updating /etc/hostname, and /etc/hosts are universal regardless of
 distribution.  So avoiding having those scripts in karmic/ debian/
 centos4/ etc would be a nice thing.

Steve
--



More information about the xen-tools-discuss mailing list