mirror of
https://github.com/woodchen-ink/docker-firefox.git
synced 2025-07-18 13:52:02 +08:00
The membarrier check is no longer done by the logmonitor.
This commit is contained in:
parent
071fb903b0
commit
e4c8628bf9
@ -101,11 +101,6 @@ RUN \
|
||||
# del-pkg build-dependencies && \
|
||||
# rm -rf /tmp/* /tmp/.[!.]*
|
||||
|
||||
# Enable log monitoring.
|
||||
RUN \
|
||||
sed-patch 's|LOG_FILES=|LOG_FILES=/config/log/firefox/error.log|' /etc/logmonitor/logmonitor.conf && \
|
||||
sed-patch 's|STATUS_FILES=|STATUS_FILES=/tmp/.firefox_shm_check,/tmp/.firefox_membarrier_check|' /etc/logmonitor/logmonitor.conf
|
||||
|
||||
# Generate and install favicons.
|
||||
RUN \
|
||||
APP_ICON_URL=https://github.com/jlesage/docker-templates/raw/master/jlesage/images/firefox-icon.png && \
|
||||
|
@ -17,13 +17,6 @@ fi
|
||||
# Copy default preferences.
|
||||
[ -f /config/profile/prefs.js ] || cp /defaults/prefs.js /config/profile/prefs.js
|
||||
|
||||
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
|
||||
chown $USER_ID:$GROUP_ID /tmp/.firefox_membarrier_check
|
||||
|
||||
# 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/
|
||||
|
@ -1,2 +0,0 @@
|
||||
#!/bin/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."
|
@ -1,16 +0,0 @@
|
||||
#!/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 :
|
@ -1 +0,0 @@
|
||||
WARNING
|
@ -1,2 +0,0 @@
|
||||
#!/bin/sh
|
||||
echo "$APP_NAME requires the membarrier system call."
|
@ -5,5 +5,27 @@ set -u # Treat unset variables as an error.
|
||||
|
||||
export HOME=/config
|
||||
|
||||
PIDS=
|
||||
|
||||
notify() {
|
||||
for N in $(ls /etc/logmonitor/targets.d/*/send)
|
||||
do
|
||||
"$N" "$1" "$2" "$3" &
|
||||
PIDS="$PIDS $!"
|
||||
done
|
||||
}
|
||||
|
||||
# Verify support for membarrier.
|
||||
if ! /usr/bin/membarrier_check 2>/dev/null; then
|
||||
notify "$APP_NAME requires the membarrier system call." "$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." "WARNING"
|
||||
fi
|
||||
|
||||
# Wait for all PIDs to terminate.
|
||||
set +e
|
||||
for PID in "$PIDS"; do
|
||||
wait $PID
|
||||
done
|
||||
set -e
|
||||
|
||||
/usr/bin/firefox --version
|
||||
exec /usr/bin/firefox "$@" >> /config/log/firefox/output.log 2>> /config/log/firefox/error.log
|
||||
|
Loading…
x
Reference in New Issue
Block a user