From c7d2385f04213427ea87e4b4dff3469a3b6a8991 Mon Sep 17 00:00:00 2001 From: Iustin Pop Date: Wed, 3 Mar 2010 09:58:24 +0100 Subject: [PATCH] Distribute examples in the archive MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The examples were not shipped at all, which makes it hard to package them. This patch renames the directory holding them (example → examples), adds the executable bit on the interfaces hook, and distributes them in the dist archive. Signed-off-by: Iustin Pop Reviewed-by: René Nussbaumer --- Makefile.am | 4 ++- example/hooks/grub | 59 --------------------------------------------- example/hooks/interfaces | 53 ---------------------------------------- examples/hooks/grub | 59 +++++++++++++++++++++++++++++++++++++++++++++ examples/hooks/interfaces | 53 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 115 insertions(+), 113 deletions(-) delete mode 100755 example/hooks/grub delete mode 100644 example/hooks/interfaces create mode 100755 examples/hooks/grub create mode 100755 examples/hooks/interfaces diff --git a/Makefile.am b/Makefile.am index 868d1a6..744de08 100644 --- a/Makefile.am +++ b/Makefile.am @@ -9,7 +9,9 @@ os_DATA = common.sh dist_doc_DATA = COPYING NEWS README -EXTRA_DIST = common.sh.in defaults +EXTRA_DIST = common.sh.in defaults \ + examples/hooks/grub \ + examples/hooks/interfaces do_subst = sed \ -e 's,[@]sysconfdir[@],$(sysconfdir),g' \ diff --git a/example/hooks/grub b/example/hooks/grub deleted file mode 100755 index c93dcf5..0000000 --- a/example/hooks/grub +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/bash -# -# This is an example script that install and configure grub after installation. -# To use it put it in your CUSTOMIZE_DIR, make it executable, and edit EXTRAPKGS -# of your $sysconfdir/default/ganeti-instance-debootstrap. -# -# Xen, for etch/lenny i386: -# EXTRA_PKGS="linux-image-xen-686,libc6-xen" -# Xen, for etch/lenny amd64: -# EXTRA_PKGS="linux-image-xen-amd64" -# KVM: -# no extra packages needed besides the normal suggested ones -# -# Do not include grub in EXTRA_PKGS because it will cause error of debootstrap. - -set -e - -. common.sh - -CLEANUP=( ) - -trap cleanup EXIT - -if [ -z "$TARGET" -o ! -d "$TARGET" ]; then - echo "Missing target directory" - exit 1 -fi - -# install grub -LANG=C -chroot "$TARGET" apt-get -y --force-yes install grub grub-common - -# make /dev/sda -mknod $TARGET/dev/sda b $(stat -L -c "0x%t 0x%T" $BLOCKDEV) -CLEANUP+=("rm -f $TARGET/dev/sda") - -# make /dev/sda1 -mknod $TARGET/dev/sda1 b $(stat -L -c "0x%t 0x%T" $FSYSDEV) -CLEANUP+=("rm -f $TARGET/dev/sda1") - -# create grub directory -mkdir -p "$TARGET/boot/grub" - -# create device.map -cat > "$TARGET/boot/grub/device.map" < $TARGET/etc/network/interfaces < "$TARGET/boot/grub/device.map" < $TARGET/etc/network/interfaces <