diff options
author | tron <tron@pkgsrc.org> | 2002-04-04 09:49:47 +0000 |
---|---|---|
committer | tron <tron@pkgsrc.org> | 2002-04-04 09:49:47 +0000 |
commit | 6e94b118ea9a510913457a0306c151fbfe9059a9 (patch) | |
tree | c13aeb660017106b7fd448a88b419059aaaa11ce /www | |
parent | 5b8f7bf0ac8f2a38d790e91d05b84aa38cbc1ad2 (diff) | |
download | pkgsrc-6e94b118ea9a510913457a0306c151fbfe9059a9.tar.gz |
Don't enforce "Synchronous DNS" on a NetBSD-current kernel which provides
an uptodate Linux emulation.
Diffstat (limited to 'www')
-rw-r--r-- | www/opera6/files/opera.sh | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/www/opera6/files/opera.sh b/www/opera6/files/opera.sh index b5e8625834d..a2dc3afd3da 100644 --- a/www/opera6/files/opera.sh +++ b/www/opera6/files/opera.sh @@ -1,21 +1,24 @@ #!/bin/sh -OPERADIR=$HOME/.opera - -mkdir -p $OPERADIR || exit 1 -for FILE in $OPERADIR/opera6.ini $OPERADIR/opera5.ini $OPERADIR/opera.ini -do - if [ -e ${FILE} ] - then - if grep -q '^Synchronous DNS Lookup=0$' ${FILE} +LINUX_KERN_OSREL=`sysctl -n emul.linux.kern.osrelease 2>/dev/null` +if [ -z "$LINUX_KERN_OSREL" -o "$LINUX_KERN_OSREL" = "2.0.38" ] +then + OPERADIR=$HOME/.opera + mkdir -p $OPERADIR || exit 1 + for FILE in $OPERADIR/opera6.ini $OPERADIR/opera.ini + do + if [ -e ${FILE} ] then - cp -p ${FILE} ${FILE}.patch - sed -e 's#^\(Synchronous DNS Lookup\)=0$#\1=1#' ${FILE}.patch >${FILE} - rm -f ${FILE}.patch + if grep -q '^Synchronous DNS Lookup=0$' ${FILE} + then + cp -p ${FILE} ${FILE}.patch + sed -e 's#^\(Synchronous DNS Lookup\)=0$#\1=1#' ${FILE}.patch >${FILE} + rm -f ${FILE}.patch + fi + else + echo >${FILE} "[Performance]" + echo >>${FILE} "Synchronous DNS Lookup=1" fi - else - echo >${FILE} "[Performance]" - echo >>${FILE} "Synchronous DNS Lookup=1" - fi -done + done +fi exec @EMULDIR@/bin/bash /usr/bin/opera "$@" |