check4root || exit 1
# }}}
-# source configuration file {{{
+# source main configuration file {{{
if [ -r /etc/debootstrap/config ] ; then
- if [ -n "$CONFIGFILE" ] ; then
- einfo "Using config file $CONFIGFILE."
- if ! . "$CONFIGFILE" ; then
- eerror "Error reading config file $CONFIGFILE" ; eend 1 ; exit 1
- fi
- else
- . /etc/debootstrap/config
- fi
+ . /etc/debootstrap/config
fi
# }}}
}
# }}}
+# source specified configuration file {{{
+if [ -n "$CONFIGFILE" ] ; then
+ einfo "Reading specified config file $CONFIGFILE."
+ if ! . "$CONFIGFILE" ; then
+ eerror "Error reading config file $CONFIGFILE" ; eend 1 ; exit 1
+ fi
+fi
+# }}}
+
# backwards compability checks {{{
if [ -n "$GROOT" ] ; then
echo "Error: you seem to have \$GROOT configured." >&2
MIRROR="$(dialog --stdout --title "${PN}" --inputbox \
"Please enter Debian mirror you would like to use for installing packages." \
0 0 $MIRROR)"
- else # CHROOT_VARIABLES == local
+ else # CHOOSE_MIRROR == local
[ -n "$ISO" ] || ISO='/mnt/mirror'
ISO="$(dialog --stdout --title "${PN}" --inputbox \
"Please enter directory name you would like to use for installing packages." \
# make sure /dev/disk/by-uuid/... is up2date, otherwise grub
# will fail to detect the uuid in the chroot
- blockdev --rereadpt "${TARGET%%[0-9]*}"
+ if echo "$TARGET" | grep -q "/dev/md" ; then
+ blockdev --rereadpt "${TARGET}"
+ else
+ blockdev --rereadpt "${TARGET%%[0-9]*}"
+ fi
# give the system 2 seconds, otherwise we might run into
# race conditions :-/
sleep 2