From a8ad4f68821ddbb4d7b68155856e2779ccf056a2 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Wed, 17 Oct 2007 10:00:41 +0200 Subject: [PATCH] New option "-a" for setting architecture --- debian/changelog | 7 +++++++ grml-live | 16 ++++++++++++---- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 4a9805e..b1f480e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +grml-live (0.0.6) unstable; urgency=low + + * New option "-a" for setting architecture. This allows building + grml(32) on amd64. + + -- Michael Prokop Wed, 17 Oct 2007 10:00:14 +0200 + grml-live (0.0.5) unstable; urgency=low * Add new scripts to /usr/share/grml-live/examples/buildd/: diff --git a/grml-live b/grml-live index 4fbed19..4356ef5 100755 --- a/grml-live +++ b/grml-live @@ -152,19 +152,20 @@ http://grml.org/bugs/ # command line parsing {{{ -while getopts "c:g:i:o:r:s:t:v:FhV" opt; do +while getopts "a:c:g:i:o:r:s:t:v:FhV" opt; do case "$opt" in + a) ARCH="$OPTARG" ;; c) CLASSES="$OPTARG" ;; g) GRML_NAME="$OPTARG" ;; i) ISO_NAME="$OPTARG" ;; - r) RELEASENAME="$OPTARG" ;; - s) SUITE="$OPTARG" ;; - t) TEMPLATE_DIRECTORY="$OPTARG";; o) OUTPUT="$OPTARG" CHROOT_OUTPUT="$OUTPUT/grml_chroot" BUILD_OUTPUT="$OUTPUT/grml_cd" ISO_OUTPUT="$OUTPUT/grml_isos" ;; + r) RELEASENAME="$OPTARG" ;; + s) SUITE="$OPTARG" ;; + t) TEMPLATE_DIRECTORY="$OPTARG";; v) VERSION="$OPTARG" ;; F) FORCE=1 ;; h) usage ; bailout 0 ;; @@ -198,6 +199,7 @@ if [ -z "$FORCE" ] ; then [ -n "$RELEASENAME" ] && echo " release name: $RELEASENAME" [ -n "$VERSION" ] && echo " grml version: $VERSION" [ -n "$SUITE" ] && echo " Debian suite: $SUITE" + [ -n "$ARCH" ] && echo " Architecture: $ARCH" [ -n "$BOOT_METHOD" ] && echo " Boot method: $BOOT_METHOD" [ -n "$TEMPLATE_DIRECTORY" ] && echo " Template files: $TEMPLATE_DIRECTORY" [ -n "$FAI_ARGS" ] && echo " additional arguments for FAI: $FAI_ARGS" @@ -246,6 +248,12 @@ if [ -n "$SUITE" ] ; then sed -i "s|FAI_DEBOOTSTRAP=\"[a-z]* |FAI_DEBOOTSTRAP=\"$SUITE |" $LIVE_CONF sed -i "s|FAI_DEBOOTSTRAP=\"[a-z]* |FAI_DEBOOTSTRAP=\"$SUITE |" /etc/grml/fai/make-fai-nfsroot.conf fi + +if [ "$(dpkg --print-architecture)" != "$ARCH" ] ; then + if ! grep -q -- 'FAI_DEBOOTSTRAP_OPTS.*--arch' /etc/grml/fai/make-fai-nfsroot.conf ; then + sed -i "s|FAI_DEBOOTSTRAP_OPTS=\"\(.*\)|FAI_DEBOOTSTRAP_OPTS=\"--arch $ARCH \1|" /etc/grml/fai/make-fai-nfsroot.conf + fi +fi # }}} # CHROOT_OUTPUT - execute FAI {{{ -- 2.1.4