detect architecture before checkconfiguration
[grml-debootstrap.git] / grml-debootstrap
index 1a71c16..89b5adc 100755 (executable)
@@ -774,6 +774,17 @@ if [ -z "$TARGET" -o -n "$INTERACTIVE" ] ; then
 fi
 # }}}
 
+# architecture setup {{{
+if [ -n "$ARCH" ] ; then
+   ARCHCMD="--arch $ARCH"
+   ARCHINFO=" (${ARCH})"
+else
+   ARCH="$(dpkg --print-architecture)"
+   ARCHCMD="--arch $ARCH"
+   ARCHINFO=" (${ARCH})"
+fi
+# }}}
+
 checkconfiguration
 
 # finally make sure at least $TARGET is set [the partition for the new system] {{{
@@ -825,17 +836,6 @@ else
 fi
 # }}}
 
-# architecture setup {{{
-if [ -n "$ARCH" ] ; then
-   ARCHCMD="--arch $ARCH"
-   ARCHINFO=" (${ARCH})"
-else
-   ARCH="$(dpkg --print-architecture)"
-   ARCHCMD="--arch $ARCH"
-   ARCHINFO=" (${ARCH})"
-fi
-# }}}
-
 # make sure we have the right syntax when using an iso image {{{
 if [ -n "$ISO" ] ; then
    case $ISO in