openbsd-ports/www/chromium/files/chrome

30 lines
884 B
Plaintext
Raw Normal View History

#!/bin/sh
# $OpenBSD: chrome,v 1.6 2011/06/17 04:25:06 canacar Exp $
PROGDIR=TRUEPREFIX/chrome
FDS=400
[ `ulimit -Sn` -lt ${FDS} ] && ulimit -n ${FDS}
if [ `ulimit -Sn` -lt ${FDS} ]; then
LMSG="${LMSG}- increase openfiles-max to at least ${FDS}.\n"
fi
if [ ! -z "${LMSG}" ]; then
[ -f /etc/login.conf.db ] && LOGINDB=" and rebuild login.conf.db"
MSG="${MSG}\nYou should make the following changes for your login class in /etc/login.conf${LOGINDB}\n"
MSG="${MSG}(you will need to logout and login for these to take effect).\n${LMSG}"
fi
if [ ! -z "${MSG}" ]; then
MSG="${MSG}\nDo you want to run Chromium anyway?"
MSG="${MSG}\n(If you don't increase these limits, Chromium might fail to work properly.)"
answer=`echo ${MSG} | /usr/X11R6/bin/xmessage -center -buttons yes,no -print -file -`
if [ X"${answer}" = X"no" ]; then
exit 0
fi
fi
exec "${PROGDIR}/chrome" "$@"