Bugfix: change order of checkconfiguration()
[grml-debootstrap.git] / grml-debootstrap
index a08262a..66e4398 100755 (executable)
@@ -425,6 +425,19 @@ fi
 }
 # }}}
 
+# user should recheck his configuration {{{
+# support full automatic installation:
+checkforrun() {
+   dialog --timeout 10 --title "$PN" \
+          --yesno "Do you want to stop at this stage?
+
+Notice: you are running ${PN} in non-interactive mode.
+${PN} will install Debian ${RELEASE} on ${TARGET}.
+Last chance to quit. Timeout of 10 seconds running....
+
+Do you want to stop now?" 0 0 2>/dev/null
+}
+
 # make sure the user is aware of the used configuration {{{
 checkconfiguration()
 {
@@ -510,8 +523,6 @@ interactive_mode()
   fi
 
   prompt_for_mirror
-
-  checkconfiguration
 }
 
 # run interactive mode if we didn't get the according configuration yet
@@ -522,6 +533,8 @@ if [ -z "$TARGET" -o -n "$INTERACTIVE" ] ; then
 fi
 # }}}
 
+checkconfiguration
+
 # finally make sure at least $TARGET is set [the partition for the new system] {{{
 if [ -n "$TARGET" ] ; then
    SHORT_TARGET="${TARGET##*/}"
@@ -643,19 +656,6 @@ stage() {
 }
 # }}}
 
-# user should recheck his configuration {{{
-# support full automatic installation:
-checkforrun() {
-   dialog --timeout 10 --title "$PN" \
-          --yesno "Do you want to stop at this stage?
-
-Notice: you are running ${PN} in non-interactive mode.
-${PN} will install Debian ${RELEASE} on ${TARGET}.
-Last chance to quit. Timeout of 10 seconds running....
-
-Do you want to stop now?" 0 0 2>/dev/null
-}
-
 # create filesystem {{{
 mkfs() {
   if [ -n "$MKFS" ] ; then