Also guarding key additions for local configured archives to not fail if no key is supplied.

This commit is contained in:
Daniel Baumann 2011-08-09 13:05:29 +02:00
parent 73d237a9bc
commit 557e4c365b
1 changed files with 12 additions and 6 deletions

View File

@ -477,9 +477,12 @@ EOF
for FILE in config/archives/*.key \
config/archives/*.key.chroot
do
cp ${FILE} chroot/root
Chroot chroot "apt-key add /root/$(basename ${FILE})"
rm -f chroot/root/$(basename ${FILE})
if [ -e "${FILE}" ]
then
cp ${FILE} chroot/root
Chroot chroot "apt-key add /root/$(basename ${FILE})"
rm -f chroot/root/$(basename ${FILE})
fi
done
fi
@ -806,9 +809,12 @@ EOF
for FILE in config/archives/*.key \
config/archives/*.key.binary
do
cp ${FILE} chroot/root
Chroot chroot "apt-key add /root/$(basename ${FILE})"
rm -f chroot/root/$(basename ${FILE})
if [ -e "${FILE}" ]
then
cp ${FILE} chroot/root
Chroot chroot "apt-key add /root/$(basename ${FILE})"
rm -f chroot/root/$(basename ${FILE})
fi
done
fi