Merge pull request #28 from morphis/feature/disable-kmod-build-and-load
Disable module building and loading on non xenial systems
This commit is contained in:
commit
436c0fdb8f
1 changed files with 11 additions and 5 deletions
|
|
@ -81,13 +81,19 @@ start() {
|
|||
# possible. See snapcraft.yaml for further details.
|
||||
$SNAP/bin/anbox-bridge.sh start
|
||||
|
||||
kversion=`uname -r`
|
||||
if [ ! -e $SNAP_COMMON/kernel-$kversion ]; then
|
||||
build_kernel_modules $kversion
|
||||
# Building and loading the necessary kernel modules is only possible
|
||||
# on Ubuntu 16.04 (xenial)
|
||||
if [ -e /var/lib/snapd/hostfs/etc/os-release ]; then
|
||||
. /var/lib/snapd/hostfs/etc/os-release
|
||||
if [ $UBUNTU_CODENAME = xenial ]; then
|
||||
kversion=`uname -r`
|
||||
if [ ! -e $SNAP_COMMON/kernel-$kversion ]; then
|
||||
build_kernel_modules $kversion
|
||||
fi
|
||||
load_kernel_modules
|
||||
fi
|
||||
fi
|
||||
|
||||
load_kernel_modules
|
||||
|
||||
# Ensure FUSE support for user namespaces is enabled
|
||||
echo Y > /sys/module/fuse/parameters/userns_mounts
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue