Make grab_md5 more robust.
If $DI_CODENAME is ever set to a bad value, one would end up trying to use a non-existing debian-installer, resulting in non-bootable images way later. To detect that much earlier, make sure all locations (computed from $CODENAME and $DI_CODENAME) are directories.
This commit is contained in:
parent
ac9aca28db
commit
965b86c295
|
@ -8,6 +8,8 @@
|
|||
# Parse Packages and Sources files out of a mirror and pre-process
|
||||
# them into a single list ready for mkisofs to check later
|
||||
|
||||
set -e
|
||||
|
||||
MIRROR=$1
|
||||
ARCHES="$2"
|
||||
CODENAME=$3
|
||||
|
@ -19,6 +21,13 @@ do
|
|||
LOCATIONS="$MIRROR/dists/$CODENAME/ $MIRROR/dists/$DI_CODENAME/"
|
||||
echo "Looking in $LOCATIONS"
|
||||
|
||||
for LOCATION in $LOCATIONS; do
|
||||
if [ ! -d $LOCATION ]; then
|
||||
echo "Error: $LOCATION is not a directory"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
case $ARCH in
|
||||
source)
|
||||
FILES=`find $LOCATIONS -name Sources.gz`
|
||||
|
|
Loading…
Reference in New Issue