-einfo "$0 - Please recheck configuration before execution:"
-echo "
- Target: $TARGET"
- case "$MNTPOINT" in "$TARGET") ;; *) echo " Mount-point: $MNTPOINT" ;; esac
- [ -n "$GRUB" ] && echo " Install grub to: $GROOT / $GRUB"
- case "$MNTPOINT" in "$TARGET") ;; *) echo " Important! Continuing will delete all data from ${TARGET}!" ;; esac
- echo
-einfon "Is this ok for you? [y/N] "
-
-read a
-if ! [ "$a" = 'y' -o "$a" = 'Y' ] ; then
- eerror "Exiting as requested." ; eend 1
- exit 1
+# support full automatic installation:
+checkforrun() {
+ dialog --timeout 10 --title "$0" \
+ --yesno "Do you want to stop at this stage?
+
+Notice: you are running grml-debootstrap in non-interactive mode.
+grml-debootstrap 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
+}
+
+if [ -n "$AUTOINSTALL" ] ; then
+ if checkforrun ; then
+ eerror "Exiting as requested" ; eend 0
+ exit 1
+ fi
+else # if not running automatic installation display configuration and prompt for execution:
+ einfo "$0 - Please recheck configuration before execution:"
+ echo "
+ Target: $TARGET"
+ case "$MNTPOINT" in "$TARGET") ;; *) echo " Mount-point: $MNTPOINT" ;; esac
+ [ -n "$GRUB" ] && echo " Install grub to: $GROOT / $GRUB"
+ [ -n "$MIRROR" ] && echo " Using mirror: $MIRROR"
+ case "$MNTPOINT" in "$TARGET") ;; *) echo " Important! Continuing will delete all data from ${TARGET}!" ;; esac
+ echo
+ einfon "Is this ok for you? [y/N] "
+ read a
+ if ! [ "$a" = 'y' -o "$a" = 'Y' ] ; then
+ eerror "Exiting as requested." ; eend 1
+ exit 1
+ fi