Merge branch 'master' into explicit-search-path-for-boost

This commit is contained in:
Simon Fels 2018-07-01 18:01:14 +02:00 • committed by GitHub
commit 945e6f1f7e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 370 additions and 170 deletions

View file

@ -10,6 +10,11 @@ DATA_PATH=$SNAP_COMMON/
ROOTFS_PATH=$DATA_PATH/rootfs
ANDROID_IMG=$SNAP/android.img
if [ "$(id -u)" != 0 ]; then
echo "ERROR: You need to run the container manager as root"
exit 1
fi
if [ ! -e $ANDROID_IMG ]; then
echo "ERROR: android image does not exist"
exit 1
@ -60,7 +65,19 @@ start() {
export ANBOX_LOG_LEVEL=debug
fi
EXTRA_ARGS=
enable_rootfs_overlay="$(snapctl get rootfs-overlay.enable)"
if [ "$enable_rootfs_overlay" = true ]; then
EXTRA_ARGS="$EXTRA_ARGS --use-rootfs-overlay"
fi
privileged_container="$(snapctl get container.privileged)"
if [ "$privileged_container" = true ]; then
EXTRA_ARGS="$EXTRA_ARGS --privileged"
fi
exec $AA_EXEC $SNAP/bin/anbox-wrapper.sh container-manager \
"$EXTRA_ARGS" \
--data-path=$DATA_PATH \
--android-image=$ANDROID_IMG \
--daemon