summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2010-09-26 10:37:54 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 19:17:24 +0100
commitd143e606fb70013d8047f041ff1b6d439b163530 (patch)
tree143d60ea678d375b8f013284406c15a3c0242f26 /scripts
parent6e18050ec64772ca037866da806813f056cb3e44 (diff)
downloadvyos-live-build-d143e606fb70013d8047f041ff1b6d439b163530.tar.gz
vyos-live-build-d143e606fb70013d8047f041ff1b6d439b163530.zip
Not fail if /dev/random is not available in chroot, newer debootstrap seems not to create it anymore.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build/lb_chroot_sources12
1 files changed, 9 insertions, 3 deletions
diff --git a/scripts/build/lb_chroot_sources b/scripts/build/lb_chroot_sources
index 17cb3f516..60654dc4d 100755
--- a/scripts/build/lb_chroot_sources
+++ b/scripts/build/lb_chroot_sources
@@ -268,8 +268,11 @@ EOF
# Temporarily replace /dev/random with /dev/urandom so as not
# to block automated image builds; we don't care about the
# security of this key anyway.
- mv chroot/dev/random chroot/dev/random.orig
- cp -a chroot/dev/urandom chroot/dev/random
+ if [ -e chroot/dev/random ]
+ then
+ mv chroot/dev/random chroot/dev/random.orig
+ cp -a chroot/dev/urandom chroot/dev/random
+ fi
if Find_files cache/local-package-keyring.*
then
@@ -318,7 +321,10 @@ EOF
rm chroot/root/local-package-keyring.sec
# Revert /dev/random
- mv chroot/dev/random.orig chroot/dev/random
+ if [ -e chroot/dev/random.orig ]
+ then
+ mv chroot/dev/random.orig chroot/dev/random
+ fi
# Remove /root/.gnupg if we created it during the signing process
if [ "${_LB_DOTGNUPG_EXISTED}" -eq 0 ]