Yes, but in this case, squid is only for cache server and squid only for
filter content. The specific problem is install.sh dont find JVM. I copy the
install.sh of squid plugin.
Where this find the java run time?. I change the line 19 for:
JVMPATH=$/usr/local/jre-1.7.0/bin/
but not run.
#! /bin/sh
WS_VER="7.1"
TRUE=0
FALSE=1
REDO=2
# Change dir to install.sh location
homedir=${0%/*}
if [ "$dir" = "$0" ]; then
homedir="."
fi
cd "$homedir"
# get the OS type
OS_NAME=`uname`
OS_VER=`uname -r`
CURRENTPATH=`pwd`
JVMPATH=$CURRENTPATH/Setup/jvm
SYSTEM_LAF=true
LD_LIBRARY_PATH="$CURRENTPATH/Setup/Suite/disk1/native:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH
BIN_PATH="./Setup/Suite/disk1"
chmod 744 $BIN_PATH/*.bin
##################################################################
# verify the amount of space available in the tmp directory
# this is where the installer extracts its files to
##################################################################
verifyRuntimeDiskSpace()
{
space_needed=30
space_avail=`df -k $WSTEMPDIR | tail -1 | awk '{print int($4/1000)}'`
if [ $space_avail -le $space_needed ]; then
# "df" output result differently if LVM is installed. So check again
to see if it's
# really out of space
space_avail=`df -k $WSTEMPDIR | tail -1 | awk '{print int($3/1000)}'`
if [ $space_avail -le $space_needed ]; then
printf "\nERROR: Setup is unable to proceed with installation.\n"
printf "There is not enough disk space in the $WSTEMPDIR
directory.\n"
printf "Setup detected $space_avail MB in the $WSTEMPDIR
directory. $space_needed MB are required to start the installation.\n"
printf "To pick another temp folder, you can run install.sh with
the path of the temp folder as the last parameter.\n\n"
return $FALSE
fi
fi
return $TRUE
}
##################################################################
# Check the system locale
# If running English, return $TRUE
verifyLocale()
{
if [ "`locale | grep LANG | awk -F= ' { print $2 }' | sed -n -e
's/^C.*/C/p'`" = "C" ] ; then
return $TRUE
fi
if [ "`locale | grep LANG | awk -F= ' { print $2 }' | sed -n -e
's/^en.*/en/p'`" = "en" ] ; then
return $TRUE
fi
if [ "`locale | grep LANG | awk -F= ' { print $2 }'`" = "" ] ; then
return $TRUE
fi
printf "\nGUI mode not supported... Invoking installer in console
mode....\n\n\n"
return $FALSE
}
#################################################################
# make sure user gives valid yes/no answer
#################################################################
checkAnswer(){
if [ \( "$1" = "y" \) -o \( "$1" = "Y" \) ]; then
return $TRUE
elif [ \( "$1" = "n" \) -o \( "$1" = "N" \) ]; then
return $FALSE
elif [ "$1" = "" ]; then
InputError Return/Enter
return $REDO
else
InputError $1
return $REDO
fi
}
#################################################################
# ask user if they want to check for patches on solaris
#################################################################
askCheckPatchLevel(){
printf "The installer requires certain Solaris patches. First, install.sh
will verify the presence of the required patches. If any patches are missing,
inst
all.sh will report which ones, and then exit.\n\n"
printf "Do you want to check your patch level (y/n)?";
read answer
checkAnswer $answer
returnAnswer=$?
if [ $returnAnswer = "$TRUE" ]; then
checkPatch=$TRUE
elif [ $returnAnswer = "$FALSE" ];then
checkPatch=$FALSE
elif [ $returnAnswer = "$REDO" ]; then
askCheckPatchLevel
fi
}
#################################################################
# ask user if they want to check for patches on solaris
#################################################################
askContinueNoPatch(){
printf "\n\nIf your system does not have the required patches,
installation could fail. Do you want to attempt the installation anyway
(y/n)?"
read answer
checkAnswer $answer
returnAnswer=$?
if [ $returnAnswer = "$TRUE" ]; then
patchLevelOK=$TRUE
elif [ $returnAnswer = "$FALSE" ];then
patchLevelOK=$FALSE
elif [ $returnAnswer = "$REDO" ]; then
askContinueNoPatch
fi
}
#################################################################
# check to see if proper patch level was in the Operating System
# Currently only used for Solaris installs
#################################################################
checkPatchLevel(){
patchLevelOK=$TRUE
if [ $OS_VER = "5.8" ]; then
# check for required patches
for i in "112003" "108652" "108940" "108921" "108773" "108989"
"108528" "111310" "108993" "109147" "111308" "112438" "111111" "112396"
"110386" "1089
87" "111023"
do
if checkPatchExistance $i
then
printf "\nERROR: Patch $i is missing"
patchLevelOK=$FALSE
fi
done
fi
if [ $OS_VER = "5.9" ]; then
# check for required patches
for i in "113886" "113887" "113096" "112785"
do
if checkPatchExistance $i
then
printf "\nERROR: Patch $i is missing"
patchLevelOK=$FALSE
fi
done
fi
if [ $patchLevelOK = "$FALSE" ]; then
printf "\n\nTo get the required patches, please go to
http://sunsolve.sun.com/pub-cgi/show.pl?target=patches/J2SE\n\n";
fi
}
#############################################################################
###
# check a specific patch version
#############################################################################
###
checkPatchExistance(){
RESULT=`showrev -p | grep $1`
if [ "$RESULT" = "" ]; then
return $TRUE
else
return $FALSE
fi
}
#############################################################################
###
# run install in GUI mode
#############################################################################
###
runGUI(){
cd $BIN_PATH
if [ "$OS_NAME" = "Linux" ]; then
SYSTEM_LAF=false
fi
./setupMulti.bin -swing systemLAF=$SYSTEM_LAF -is:javahome "$JVMPATH"
-is:tempdir $WSTEMPDIR 2> /dev/null
if [ -f /etc/wsLaunchLangPack ]; then
chmod 744 *.bin
rm -f /etc/wsLaunchLangPack
./setupLangPack.bin -swing systemLAF=$SYSTEM_LAF -is:javahome
"$JVMPATH" -is:tempdir $WSTEMPDIR 2> /dev/null
fi
}
#############################################################################
###
# run install in console mode
#############################################################################
###
runConsole(){
cd $BIN_PATH
./setupMulti.bin -console -is:javaconsole -is:javahome "$JVMPATH"
-is:tempdir $WSTEMPDIR 2> /dev/null
if [ -f /etc/wsLaunchLangPack ]; then
chmod 744 *.bin
rm -f /etc/wsLaunchLangPack
./setupLangPack.bin -console -is:javahome "$JVMPATH" -is:tempdir
$WSTEMPDIR 2> /dev/null
fi
}
#############################################################################
###
#
# InputError()
# Display message if user selection is invalid
#
#############################################################################
###
InputError()
{
printf "\n-------------------------------------------\n"
printf "$1 is not a valid choice. Please try again.\n"
printf "\n-------------------------------------------\n"
}
#############################################################################
###
#############################################################################
###
#
# BEGIN INSTALLATION
#
#############################################################################
###
#############################################################################
###
# declare variables
checkPatch=$TRUE
patchLevelOK=$TRUE
printf "Welcome to the Websense Enterprise v$WS_VER installer.\n"
#############################################################################
##
#
# Possible Install.sh combinations
# 1) install.sh
# 2) install.sh <tmpdir>
# 3) install.sh -nopatch
# 4) install.sh -nopatch <tmpdir>
# 5) install.sh -g
# 6) install.sh -g <tmpdir>
# 7) install.sh -g -nopatch
# 8) install.sh -g -nopatch <tmpdir>
#
#############################################################################
##
# Figure out what parameters have been passed in
# no parameters
if [ "$1" = "" ]; then
WSTEMPDIR=/tmp
# install using GUI mode
elif [ "$1" = "-g" ]; then
if [ "$2" = "" ]; then
WSTEMPDIR=/tmp
else
WSTEMPDIR=$2
fi
# user inputs temp directory
else
WSTEMPDIR=$1
fi
# Make sure temp directory is there and create it if is not.
if [ -d $WSTEMPDIR ]; then
echo
else
mkdir $WSTEMPDIR
fi
# If enough disk space
if verifyRuntimeDiskSpace
then
# default to command line start but provide an
# option for starting installer in GUI mode
if [ "$1" = "-g" ]; then
if verifyLocale
then
runGUI
else
runConsole
fi
else
runConsole
fi
fi
# wait for install process to end
wait $!
printf "\n\nInstallation ends...\n"
Dimitri.-
http://deoxyt2.livejournal.com
OpenBSD - Free, Functional & Secure
--- El dom, 18/10/09, Steve Shockley <[email protected]> escribis:
> De: Steve Shockley <[email protected]>
> Asunto: Re: Websense squid interoperability on openbsd
> Para: [email protected]
> Fecha: domingo, 18 de octubre, 2009 11:08
> On 10/16/2009 2:26 PM, Dimitri
> wrote:
> > I need to install a plugin for squid to allow
> interoperability between squid
> > and Websense. the idea is that squid provide cache and
> Websense provides
> > content filtering.
>
> I haven't done it, but don't both Squid and Websense do
> ICAP?