#!/bin/sh

SYSCTL=kern.ipc.shm_allow_removed
if [ "`/sbin/sysctl -n $SYSCTL`" = 0 ] ; then
	cat << EOMSG
For correct operation, shared memory support has to be enabled
in Chromium by performing the following command as root :

sysctl $SYSCTL=1

To preserve this setting across reboots, append the following
to /etc/sysctl.conf :

$SYSCTL=1
EOMSG
	exit 1
fi
ulimit -c 0

# source foreign-cdm environment
if [ -r %%PREFIX%%/share/foreign-cdm/fcdm-setup-env ] ; then
	. %%PREFIX%%/share/foreign-cdm/fcdm-setup-env
fi

exec %%PREFIX%%/share/chromium/chrome ${1+"$@"}
