diff --git a/installer/resources/osid b/installer/resources/osid index 4b5630b57f9af1874784720a35b23eaad4d01efb..f5fc79a14640db88ac119be5e1f4dbe00cbd30cd 100644 --- a/installer/resources/osid +++ b/installer/resources/osid @@ -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` diff --git a/installer/resources/postinstall.sh b/installer/resources/postinstall.sh index 7910c5400ea380b3a7fc1e02eeea9fef29a74649..f13cf19b6b8a180719fedd6e5d101e7169614bc2 100644 --- a/installer/resources/postinstall.sh +++ b/installer/resources/postinstall.sh @@ -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 -