X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=blobdiff_plain;f=grml-debootstrap;h=653f16cf91c19e06ae31eb9fc3de7632d74b8f02;hp=30e9c795abe0932787a7340291c400623178faad;hb=4fae346b2e816b3d7f97ea9e42455f104db5adb6;hpb=ed4b1a72c781d07e86ae653f2fc6b2c916138f45 diff --git a/grml-debootstrap b/grml-debootstrap index 30e9c79..653f16c 100755 --- a/grml-debootstrap +++ b/grml-debootstrap @@ -93,16 +93,9 @@ check4progs debootstrap dialog || exit 1 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 # }}} @@ -172,6 +165,15 @@ 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 @@ -352,7 +354,7 @@ prompt_for_mirror() 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." \