tweak wrapper script; use larger default limits for FD and datasize
(you may still need to raise them if you open many tabs, but this should be enough to avoid problems in normal use), only warn if softlimits can't be raised, and adjust messages to mention login.conf (and login.conf.db if detected). ok espie@ "feel free to modify it if you don't like it" robert@
This commit is contained in:
parent
8422be1e92
commit
ed3d1a0a57
@ -1,10 +1,11 @@
|
||||
# $OpenBSD: Makefile,v 1.20 2011/02/08 09:43:02 espie Exp $
|
||||
# $OpenBSD: Makefile,v 1.21 2011/02/08 21:10:28 sthen Exp $
|
||||
|
||||
ONLY_FOR_ARCHS= i386 amd64
|
||||
|
||||
COMMENT= Chromium browser
|
||||
|
||||
V= 9.0.597.84
|
||||
REVISION= 0
|
||||
DISTNAME= chromium-${V}
|
||||
|
||||
CATEGORIES= www
|
||||
|
@ -1,29 +1,35 @@
|
||||
#!/bin/sh
|
||||
# $OpenBSD: chrome,v 1.2 2011/02/08 09:43:02 espie Exp $
|
||||
# $OpenBSD: chrome,v 1.3 2011/02/08 21:10:28 sthen Exp $
|
||||
|
||||
PROGDIR=TRUEPREFIX/chrome
|
||||
SHMALL=32768
|
||||
DATASIZ=71680
|
||||
FDS=256
|
||||
DATASIZ=716800
|
||||
FDS=400
|
||||
|
||||
if [ `/usr/sbin/sysctl -n kern.shminfo.shmall` -lt ${SHMALL} ]; then
|
||||
MSG="You should bump the kern.shminfo.shmall sysctl to at least ${SHMALL}."
|
||||
MSG="${MSG}\ne.g.: sysctl kern.shminfo.shmall=${SHMALL}\n"
|
||||
MSG="You should increase the kern.shminfo.shmall sysctl to at least ${SHMALL},"
|
||||
MSG="${MSG}\ne.g.: sysctl kern.shminfo.shmall=${SHMALL}. This can be added to /etc/sysctl.conf.\n"
|
||||
fi
|
||||
|
||||
[ `ulimit -Sd` -lt ${DATASIZ} ] || ulimit -Sd ${DATASIZ}
|
||||
if [ `ulimit -Sd` -lt ${DATASIZ} ]; then
|
||||
MSG="${MSG}\nYou should bump your datasize limit to at least ${DATASIZ}."
|
||||
MSG="${MSG}\ne.g.: ulimit -Sd ${DATASIZ}\n"
|
||||
LMSG="- increase datasize-max to at least ${DATASIZ}.\n"
|
||||
fi
|
||||
|
||||
[ `ulimit -Sn` -lt ${FDS} ] || ulimit -Sn ${FDS}
|
||||
if [ `ulimit -Sn` -lt ${FDS} ]; then
|
||||
MSG="${MSG}\nYou should bump your nofiles(descriptors) limit to at least ${FDS}."
|
||||
MSG="${MSG}\ne.g.: ulimit -Sn ${FDS}\n"
|
||||
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}\n\nDo you want to run Chromium anyways?"
|
||||
MSG="${MSG}\n(If you don't bump these limits, Chromium might fail to work properly.)"
|
||||
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 -`
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user