Disable module building and loading on non xenial systems
This commit is contained in:
parent
dfe913412e
commit
383511b397
1 changed files with 11 additions and 5 deletions
|
|
@ -81,13 +81,19 @@ start() {
|
||||||
# possible. See snapcraft.yaml for further details.
|
# possible. See snapcraft.yaml for further details.
|
||||||
$SNAP/bin/anbox-bridge.sh start
|
$SNAP/bin/anbox-bridge.sh start
|
||||||
|
|
||||||
kversion=`uname -r`
|
# Building and loading the necessary kernel modules is only possible
|
||||||
if [ ! -e $SNAP_COMMON/kernel-$kversion ]; then
|
# on Ubuntu 16.04 (xenial)
|
||||||
build_kernel_modules $kversion
|
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
|
fi
|
||||||
|
|
||||||
load_kernel_modules
|
|
||||||
|
|
||||||
# Ensure FUSE support for user namespaces is enabled
|
# Ensure FUSE support for user namespaces is enabled
|
||||||
echo Y > /sys/module/fuse/parameters/userns_mounts
|
echo Y > /sys/module/fuse/parameters/userns_mounts
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue