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

This commit is contained in:
Kevin Gallagher 2016-10-10 19:50:07 -07:00
parent bf390a7261
commit 543e0d5061

View File

@ -193,9 +193,15 @@ if [ $LXC = "1" ]; then
else else
if [ $ARCH = "amd64" ] if [ $ARCH = "amd64" ]
then 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 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
fi fi
dd if=/dev/zero of=$OUT-lxc bs=1M count=1 seek=10240 dd if=/dev/zero of=$OUT-lxc bs=1M count=1 seek=10240