Don't prompt to move the wrapper on NetBSD or OpenBSD.

This commit is contained in:
kytv
2011-09-19 12:21:38 +00:00
parent 04785e25b9
commit d71b71f2b1
2 changed files with 44 additions and 18 deletions

View File

@@ -21,6 +21,8 @@
# redhat = Red Hat
# solaris = Solaris
# suse = SuSE
# openbsd = OpenBSD
# netbsd = NetBSD
# unknown = OS could not be determined
HOST_OS=`uname -a`
@@ -36,6 +38,8 @@ FREEBSD=`echo "$HOST_OS" | grep FreeBSD`
LINUX=`echo "$HOST_OS" | grep Linux`
SOLARIS=`echo "$HOST_OS" | grep Solaris`
SUNOS=`echo "$HOST_OS" | grep SunOS`
NETBSD=`echo "$HOST_OS" |grep NetBSD`
OPENBSD=`echo "$HOST_OS" |grep OpenBSD`
if [ ! "X$DARWIN" = "X" -o ! "X$MAC" = "X" ]; then
echo osx
@@ -47,6 +51,16 @@ if [ ! "X$FREEBSD" = "X" ]; then
exit 0
fi
if [ ! "X$NETBSD" = "X" ]; then
echo netbsd
exit 0
fi
if [ ! "X$OPENBSD" = "X" ]; then
echo openbsd
exit 0
fi
if [ ! "X$LINUX" = "X" ]; then
LINUX_DISTRO=`cat /proc/version`

View File

@@ -46,39 +46,49 @@ case $HOST_OS in
elif [ `echo $OS_ARCH |grep arm` ]; then
wrapperpath="./lib/wrapper/linux-armv5"
cp ${wrapperpath}/libwrapper.so ./lib/
elif [ `echo $OS_ARCH |grep ppc` ]; then
wrapperpath="./lib/wrapper/linux-ppc"
cp ${wrapperpath}/libwrapper.so ./lib/
elif [ `echo $OS_ARCH |grep ppc` ]; then
wrapperpath="./lib/wrapper/linux-ppc"
cp ${wrapperpath}/libwrapper.so ./lib/
elif [ "X$X86_64" = "X" ]; then
wrapperpath="./lib/wrapper/linux"
cp ${wrapperpath}/libwrapper.so ./lib/
else
wrapperpath="./lib/wrapper/linux64"
cp ${wrapperpath}/libwrapper.so ./lib
# the 32bit libwrapper.so will be needed if a 32 bit jvm is used
cp ./lib/wrapper/linux/libwrapper.so ./lib/libwrapper-linux-x86-32.so
# the 32bit libwrapper.so will be needed if a 32 bit jvm is used
cp ./lib/wrapper/linux/libwrapper.so ./lib/libwrapper-linux-x86-32.so
fi
;;
freebsd )
if [ ! `echo $OS_ARCH | grep amd64` ]; then
wrapperpath="./lib/wrapper/freebsd"
cp ${wrapperpath}/libwrapper.so ./lib/
else
wrapperpath="./lib/wrapper/freebsd64"
cp ${wrapperpath}/libwrapper.so ./lib/
# the 32bit libwrapper.so will be needed if a 32 bit jvm is used
cp ./lib/freebsd/libwrapper.so ./lib/libwrapper-freebsd-x86-32.so
fi
if [ ! `echo $OS_ARCH | grep amd64` ]; then
wrapperpath="./lib/wrapper/freebsd"
cp ${wrapperpath}/libwrapper.so ./lib/
else
wrapperpath="./lib/wrapper/freebsd64"
cp ${wrapperpath}/libwrapper.so ./lib/
# the 32bit libwrapper.so will be needed if a 32 bit jvm is used
cp ./lib/freebsd/libwrapper.so ./lib/libwrapper-freebsd-x86-32.so
fi
;;
osx )
wrapperpath="./lib/wrapper/macosx"
cp ${wrapperpath}/libwrapper.jnilib ./lib/
chmod 755 ./Start\ I2P\ Router.app/Contents/MacOS/i2prouter
chmod 755 ./Start\ I2P\ Router.app/Contents/MacOS/i2prouter
;;
solaris )
wrapperpath="./lib/wrapper/solaris"
cp ${wrapperpath}/libwrapper.so ./lib/
;;
netbsd|openbsd )
# FIXME
# This isn't displayed when installing, but if we fall back to the "*)"
# choice, no cleanup happens and users are advised to copy the wrapper
# in place...but there is no wrapper. Figuring how how to display this,
# such as when doing a headless installation would be good.
echo "The java wrapper is not supported on this platform."
echo "Please use `pwd`/runplain.sh to start I2P."
# But at least the cleanup below will happen.
;;
* )
echo "${ERROR_MSG}"
echo "Host OS is $HOST_OS" >> $LOGFILE
@@ -88,9 +98,12 @@ case $HOST_OS in
;;
esac
cp $wrapperpath/i2psvc .
if [ ! "X$wrapperpath" = "x" ]; then
cp $wrapperpath/i2psvc .
chmod 755 ./i2psvc
fi
chmod 755 ./eepget
chmod 755 ./i2psvc
rm -rf ./icons
rm -rf ./lib/wrapper
rm -f ./lib/*.dll
@@ -109,4 +122,3 @@ fi
rm -f ./osid
rm -f ./postinstall.sh
exit 0