Added check for the membarrier system call. Also added documentation about the new requirement.

This commit is contained in:
Jocelyn Le Sage 2020-07-19 10:18:06 -04:00
parent 80b4261fd3
commit 0c4a4ddcca
9 changed files with 126 additions and 14 deletions

View file

@ -25,6 +25,12 @@ else
echo 'PASS' > /tmp/.firefox_shm_check
fi
if /usr/bin/membarrier_check 2>/dev/null; then
echo 'MEMBARRIER_CHECK_PASS' > /tmp/.firefox_membarrier_check
else
echo 'MEMBARRIER_CHECK_FAIL' > /tmp/.firefox_membarrier_check
fi
# Clean/optimize Firefox databases.
#if [ -d /config/.mozilla/firefox ] && [ -d /config/profile ]; then
# [ -f /config/.mozilla/firefox/profiles.ini ] || cp /defaults/profiles.ini /config/.mozilla/firefox/

View file

@ -0,0 +1,2 @@
#!/usr/bin/with-contenv sh
echo "$APP_NAME is likely to crash because it requires the membarrier system call. See the documentation of this Docker container to find out how this system call can be allowed."

View file

@ -0,0 +1,16 @@
#!/bin/sh
set -e # Exit immediately if a command exits with a non-zero status.
set -u # Treat unset variables as an error.
LINE="$1"
if [ "$LINE" = "MEMBARRIER_CHECK_FAIL" ]; then
echo 'MEMBARRIER_CHECK_ACK' > /tmp/.firefox_membarrier_check
exit 0
fi
# No match found.
exit 1
# vim: set ft=sh :

View file

@ -0,0 +1 @@
WARNING

View file

@ -0,0 +1,2 @@
#!/usr/bin/with-contenv sh
echo "$APP_NAME requires the membarrier system call."