Always assume architecture of the running system
authorMichael Prokop <mika@grml.org>
Mon, 9 Apr 2007 12:43:39 +0000 (14:43 +0200)
committerMichael Prokop <mika@grml.org>
Mon, 9 Apr 2007 12:43:39 +0000 (14:43 +0200)
config
debian/changelog
grml-debootstrap

diff --git a/config b/config
index 72ad3f6..7b275f6 100644 (file)
--- a/config
+++ b/config
@@ -3,7 +3,7 @@
 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2.
-# Latest change: Sam Nov 18 10:32:30 CET 2006 [mika]
+# Latest change: Mon Apr 09 14:42:58 CEST 2007 [mika]
 ################################################################################
 
 ################################################################################
@@ -62,8 +62,8 @@ CHROOTMIRROR='ftp://ftp.debian.de/debian'
 # supported values: sarge etch sid
 RELEASE='etch'
 
-# architecture (not yet officially supported by grml-debootstrap, work in progress)
-# if unset the default (i386) will be taken
+# architecture
+# if unset the default of the running system (see 'dpkg --print-architecture') will be taken
 # notice: installing an amd64 system requires a 64bit kernel
 #         do not forget to adjust $KERNEL for selected architecture as well
 # ARCH='amd64'
index b96f877..d371786 100644 (file)
@@ -4,6 +4,8 @@ grml-debootstrap (0.6) unstable; urgency=low
     the chroot when running grml-debootstrap. (Just a cosmetic
     change as there aren't any errors but warning messages from
     dpkg.)
+  * Always assume architecture of the running system (overwriting
+    via $ARCH is still supported of course).
 
  -- Michael Prokop <mika@grml.org>  Mon,  9 Apr 2007 14:35:21 +0200
 
index f316802..0f6bcb9 100644 (file)
@@ -4,9 +4,9 @@
 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2.
-# Latest change: Mon Apr 09 14:35:18 CEST 2007 [mika]
+# Latest change: Mon Apr 09 14:41:57 CEST 2007 [mika]
 ################################################################################
-# http://www.debian.org/releases/stable/i386/apcs04.html.en
+# http://www.debian.org/releases/stable/i386/index.html.en
 
 set -e # exit on any error
 
@@ -132,7 +132,12 @@ fi
 if [ -n "$ARCH" ] ; then
    ARCHCMD="--arch $ARCH"
    ARCHINFO=" (${ARCH})"
+else
+   ARCH="$(dpkg --print-architecture)"
+   ARCHCMD="--arch $ARCH"
+   ARCHINFO=" (${ARCH})"
 fi
+
 einfo "Running $DEBOOTSTRAP for release ${RELEASE}${ARCHINFO} using mirror $MIRROR"
 $DEBOOTSTRAP $ARCHCMD $RELEASE $MNTPOINT $MIRROR
 eend $?