diff options
author | tron <tron> | 2002-04-04 09:49:47 +0000 |
---|---|---|
committer | tron <tron> | 2002-04-04 09:49:47 +0000 |
commit | adb1a526977fe056e8e6dd7fcc119ae20e49edc7 (patch) | |
tree | c13aeb660017106b7fd448a88b419059aaaa11ce | |
parent | b71bc964eaf9c094cf0bf2ed6169e0a3901712c4 (diff) | |
download | pkgsrc-adb1a526977fe056e8e6dd7fcc119ae20e49edc7.tar.gz |
Don't enforce "Synchronous DNS" on a NetBSD-current kernel which provides
an uptodate Linux emulation.
-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 "$@" |