From: Iustin Pop Date: Wed, 3 Mar 2010 08:50:12 +0000 (+0100) Subject: Change the customization directory X-Git-Tag: v0.9~5 X-Git-Url: http://git.equinoxoli.org/?p=ext%2Finstance-debootstrap.git;a=commitdiff_plain;h=f79e471d4a48a914a74497f2806d7cc54f6cd4b0 Change the customization directory The current customization directory is “$sysconfdir/ganeti/instance-debootstrap.d”. Recently, the variants support has added the variants configuration as “$sysconfdir/ganeti/instance-debootstrap/variants/default.conf”. This means we have two, very similar (instance-debootstrap.d vs. instance-debootstrap) directories under ganeti. This patch changes the customize directory to $sysconfdir/ganeti/instance-debootstrap/hooks. It is more in line with Ganeti's own hooks naming, and removes the old “.d” directory, for a more sane layout. People upgrading, with the default (commented-out) CUSTOMIZE_DIR will need to rename their on-disk directory. Signed-off-by: Iustin Pop Reviewed-by: René Nussbaumer --- diff --git a/README b/README index 6c656ab..893804f 100644 --- a/README +++ b/README @@ -58,9 +58,9 @@ named 'defaults' in the source distribution for more details): - EXTRAPKGS: most OSes will need some extra packages installed to make them work nicely under Xen; the example file containts a few suggestions -- CUSTOMIZE_DIR: a directory containing customization script for the instance. - (by default $sysconfdir/ganeti/instance-debootstrap.d) See "Customization of - the instance" below. +- CUSTOMIZE_DIR: a directory containing customization script for the + instance. (by default $sysconfdir/ganeti/instance-debootstrap/hooks) + See "Customization of the instance" below. - GENERATE_CACHE: if 'yes' (the default), the installation process will save and reuse a cache file to speed reinstalls (located under $localstatedir/cache/ganeti-instance-debootstrap) @@ -82,14 +82,15 @@ limiting. Customization of the instance ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -If run-parts is in the os create script, and the CUSTOMIZE_DIR (by default -$sysconfdir/ganeti/instance-debootstrap.d, /etc/ganeti/instance-debootstrap.d -if you configured the os with --sysconfdir=/etc) directory exists any -executable whose name matches the run-parts execution rules (quoting -run-parts(8): the names must consist entirely of upper and lower case -letters, digits, underscores, and hyphens) is executed to allow further -personalization of the installation. The following environment variables are -passed, in addition to the ones ganeti passes to the OS scripts: +If run-parts is in the os create script, and the CUSTOMIZE_DIR (by +default $sysconfdir/ganeti/instance-debootstrap/hooks, +/etc/ganeti/instance-debootstrap/hooks if you configured the os with +--sysconfdir=/etc) directory exists any executable whose name matches +the run-parts execution rules (quoting run-parts(8): the names must +consist entirely of upper and lower case letters, digits, underscores, +and hyphens) is executed to allow further personalization of the +installation. The following environment variables are passed, in +addition to the ones ganeti passes to the OS scripts: TARGET: directory in which the filesystem is mounted SUITE: suite installed by debootstrap (eg: lenny) @@ -137,3 +138,9 @@ The instance is a minimal install: definitions to /etc/network/interfaces - after configuring the network, it is recommended to run ``apt-get update`` so that signatures for the release files are picked up + +.. vim: set textwidth=72 : +.. Local Variables: +.. mode: rst +.. fill-column: 72 +.. End: diff --git a/common.sh.in b/common.sh.in index 6c6c3b9..a72fc9f 100644 --- a/common.sh.in +++ b/common.sh.in @@ -145,7 +145,7 @@ fi : ${SUITE:="lenny"} : ${ARCH:=""} : ${EXTRA_PKGS:=""} -: ${CUSTOMIZE_DIR:="@sysconfdir@/ganeti/instance-debootstrap.d"} +: ${CUSTOMIZE_DIR:="@sysconfdir@/ganeti/instance-debootstrap/hooks"} : ${VARIANTS_DIR:="@sysconfdir@/ganeti/instance-debootstrap/variants"} : ${GENERATE_CACHE:="yes"} : ${CLEAN_CACHE:="14"} # number of days to keep a cache file diff --git a/defaults b/defaults index 467e46e..72d41ac 100644 --- a/defaults +++ b/defaults @@ -39,8 +39,8 @@ # CUSTOMIZE_DIR: a directory containing scripts to customize the installation. # The scripts are executed using run-parts -# By default /etc/ganeti/instance-debootstrap.d -# CUSTOMIZE_DIR="/etc/ganeti/instance-debootstrap.d" +# By default /etc/ganeti/instance-debootstrap/hooks +# CUSTOMIZE_DIR="/etc/ganeti/instance-debootstrap/hooks" # GENERATE_CACHE: if set to yes (the default), create new cache files; # any other value will disable the generation of cache files (but they diff --git a/example/instance-debootstrap.d/grub b/example/hooks/grub similarity index 100% rename from example/instance-debootstrap.d/grub rename to example/hooks/grub diff --git a/example/instance-debootstrap.d/interfaces b/example/hooks/interfaces similarity index 100% rename from example/instance-debootstrap.d/interfaces rename to example/hooks/interfaces