Check existence of lxc-init before cp to init.lxc

master^2
Kevin Gallagher 8 years ago
parent bf390a7261
commit 543e0d5061

@ -192,12 +192,18 @@ if [ $LXC = "1" ]; then
sudo cp $OUT-bootstrap/usr/lib/lxc/lxc-init $OUT-bootstrap/usr/sbin/init.lxc
else
if [ $ARCH = "amd64" ]
then
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
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=10240
/sbin/mkfs.ext4 -F $OUT-lxc
t=`mktemp -d gitian.XXXXXXXX`

Loading…
Cancel
Save