# die() simply prints its arguments as a message to stderr and then
# calls exit(1). This is only used at bailout points when something
# seems badly wrong.
-die() { echo "$*" >&1 ; exit 1 ; }
+die() { echo "$*" >&2 ; exit 1 ; }
# deb_url_map() reduces a Packages file (argument $1) into a series of
# mappings of the form "package=filename".
[ "$QUIET" = yes ] || echo "DOWNLOAD $P" >&2
local URI="${DEBURL["$P"]}"
[ "$QUIET" = yes ] || echo "DOWNLOAD URI=$URI" >&2
- [ -z "$URI" ] && die "** Cannot find package $P in the sources!!"
+ [ -z "$URI" ] && die '** ' "Cannot find package $P in the sources!!"
local F="${DEBDIR["$1"]}/${URI##*/}"
[ "$QUIET" = yes ] || echo "DOWNLOAD F=$F" >&2
[ -f "$F" ] && continue # alread y downloaded
# to run (see inline comments)
# etc/debconf.conf -- telling where databases are
target_dpkg() {
- local HERE=$(pwd)
+ local HERE=$(pwd) X=( ${@##-*} )
+ [ -z "$X" ] && die "** Aborting"
cd $INITRD
if [ ! -f etc/debconf.conf ] ; then
cat /etc/debconf.conf | heredoc etc/debconf.conf