summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2011-08-09 13:05:29 +0200
committerDaniel Baumann <daniel@debian.org>2011-08-09 13:05:29 +0200
commit557e4c365b4f6742c7c95d458758a72a11331b89 (patch)
tree8c7c72e623585a673ba1e693e5b15f4f06056cf6
parent73d237a9bccf5c581d11efa4e3dbfeec1c571c41 (diff)
downloadvyos-live-build-557e4c365b4f6742c7c95d458758a72a11331b89.tar.gz
vyos-live-build-557e4c365b4f6742c7c95d458758a72a11331b89.zip
Also guarding key additions for local configured archives to not fail if no key is supplied.
-rwxr-xr-xscripts/build/lb_chroot_archives18
1 files changed, 12 insertions, 6 deletions
diff --git a/scripts/build/lb_chroot_archives b/scripts/build/lb_chroot_archives
index 7bbbba7f4..c4ff532fb 100755
--- a/scripts/build/lb_chroot_archives
+++ b/scripts/build/lb_chroot_archives
@@ -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