Skip to content
This repository has been archived by the owner on Oct 1, 2021. It is now read-only.

Commit

Permalink
do not modprobe if the modules are already loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
Fuseteam committed May 12, 2021
1 parent c7720b3 commit 68452b5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/anbox-container-manager-pre.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ if [ $(id -u) != 0 ]; then
fi

# ashmem
grep -q ashmem /proc/misc ||
/sbin/modprobe ashmem_linux
if [ ! -e /dev/ashmem ]; then
mknod /dev/ashmem c 10 55
fi

# binder (newer kernel uses /dev/binderfs directory; older kernel uses /dev/binder file)
grep -q binder /proc/devices || grep -q binder /proc/misc ||
/sbin/modprobe binder_linux
if grep binder /proc/filesystems; then
if [ ! -e /dev/binderfs/binder-control ]; then
Expand Down

0 comments on commit 68452b5

Please sign in to comment.