[tbb-commits] [gitian-builder/tor-browser-builder-4] Check existence of lxc-init before cp to init.lxc
gk at torproject.org
gk at torproject.org
Mon Jul 17 06:23:31 UTC 2017
commit 5fbfab171782985bc3ae8ab4464b326aa34054b7
Author: Kevin Gallagher <kevingallagher at gmail.com>
Date: Mon Oct 10 19:50:07 2016 -0700
Check existence of lxc-init before cp to init.lxc
---
bin/make-base-vm | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/bin/make-base-vm b/bin/make-base-vm
index 4ada11f..51eb89a 100755
--- a/bin/make-base-vm
+++ b/bin/make-base-vm
@@ -167,9 +167,15 @@ if [ $LXC = "1" ]; then
else
if [ $ARCH = "amd64" ]
then
- sudo cp $OUT-bootstrap/usr/lib/x86_64-linux-gnu/lxc/lxc-init $OUT-bootstrap/usr/sbin/init.lxc
+ if [ -f $OUT-bootstrap/usr/lib/x86_64-linux-gnu/lxc/lxc-init ]
+ then
+ sudo cp $OUT-bootstrap/usr/lib/x86_64-linux-gnu/lxc/lxc-init $OUT-bootstrap/usr/sbin/init.lxc
+ fi
else
- sudo cp $OUT-bootstrap/usr/lib/i386-linux-gnu/lxc/lxc-init $OUT-bootstrap/usr/sbin/init.lxc
+ if [ -f $OUT-bootstrap/usr/lib/i386-linux-gnu/lxc/lxc-init ]
+ then
+ sudo cp $OUT-bootstrap/usr/lib/i386-linux-gnu/lxc/lxc-init $OUT-bootstrap/usr/sbin/init.lxc
+ fi
fi
fi
dd if=/dev/zero of=$OUT-lxc bs=1M count=1 seek=20480
More information about the tbb-commits
mailing list