Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#99 sh scripts created in wrong mode, making them fail upon execution

v3.56
open
uniCenta
1
2014-03-06
2014-02-28
Dilan Gilluly
No

.sh scripts are formatted in wrong mode for Linux version. They're formatted in Mac OS mode instead of Unix making them fail while being executed. Workaround is to copy and paste contents of script into a new .sh file. For instance making a new start.sh file, rename start.sh to start2.sh , and then create a new start.sh file with a text editor. Then using a text editor, copy entire contents of start2.sh into start.sh, then save and chmod 777 start.sh . After that it will work. Admins, please fix in next version so we don't have to apply this workaround every install.

Discussion

  • utoto
    utoto
    2014-03-06

    Hi. I'm running 3.56 on Mint16 Cinnamon.

    I can only start prog from the file /opt/unicenta-3.56/unicentaopos.jar.

    Using /opt/unicenta-3.56/start.sh is a no go for me as well. I did try as you stated above to no avail.

    Here is my start.sh file:
    [

    !/bin/sh# uniCenta oPOS Touch Friendly Point of Sale designed for Touch Screen# Copyright (C) 2009-2013 uniCenta# http://sourceforge.net/projects/unicentaopos## This file is part of uniCenta oPOS.## uniCenta oPOS is free software: you can redistribute it and/or modify# it under the terms of the GNU General Public License as published by# the Free Software Foundation, either version 3 of the License, or# (at your option) any later version.## uniCenta oPOS is distributed in the hope that it will be useful,# but WITHOUT ANY WARRANTY; without even the implied warranty of# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the# GNU General Public License for more details.## You should have received a copy of the GNU General Public License# along with uniCenta oPOS. If not, see http://www.gnu.org/licenses/.DIRNAME=dirname $0CP=$DIRNAME/unicentaopos.jarCP=$CP:$DIRNAME/lib/jasperreports-4.5.1.jarCP=$CP:$DIRNAME/lib/jcommon-1.0.15.jarCP=$CP:$DIRNAME/lib/jfreechart-1.0.12.jarCP=$CP:$DIRNAME/lib/jdt-compiler-3.1.1.jarCP=$CP:$DIRNAME/lib/commons-beanutils-1.8.3.jarCP=$CP:$DIRNAME/lib/commons-digester-2.1.jarCP=$CP:$DIRNAME/lib/iText-2.1.7.jarCP=$CP:$DIRNAME/lib/poi-3.8-20120326.jarCP=$CP:$DIRNAME/lib/barcode4j-2.0.jarCP=$CP:$DIRNAME/lib/commons-codec-1.4.jarCP=$CP:$DIRNAME/lib/velocity-1.7-dep.jarCP=$CP:$DIRNAME/lib/oro-2.0.8.jarCP=$CP:$DIRNAME/lib/commons-collections-3.2.1.jarCP=$CP:$DIRNAME/lib/commons-lang-2.4.jarCP=$CP:$DIRNAME/lib/bsh-core-2.0b4.jarCP=$CP:$DIRNAME/lib/RXTXcomm.jarCP=$CP:$DIRNAME/lib/jpos1121.jarCP=$CP:$DIRNAME/lib/swingx-all-1.6.4.jarCP=$CP:$DIRNAME/lib/substance.jarCP=$CP:$DIRNAME/lib/substance-swingx.jar# Apache Axis SOAP libraries.CP=$CP:$DIRNAME/lib/axis.jarCP=$CP:$DIRNAME/lib/jaxrpc.jarCP=$CP:$DIRNAME/lib/saaj.jarCP=$CP:$DIRNAME/lib/wsdl4j-1.5.1.jarCP=$CP:$DIRNAME/lib/commons-discovery-0.4.jarCP=$CP:$DIRNAME/lib/commons-logging-1.1.jarCP=$CP:$DIRNAME/locales/CP=$CP:$DIRNAME/reports/# Select the library foldercase "uname -s" in Linux) case "uname -m" in i686) LIBRARYPATH=/lib/Linux/i686-unknown-linux-gnu;; ia64) LIBRARYPATH=/lib/Linux/ia64-unknown-linux-gnu;; x86_64|amd64) LIBRARYPATH=/lib/Linux/x86_64-unknown-linux-gnu;; esac;; SunOS) case "uname -m" in sparc32) LIBRARYPATH=/Solaris/sparc-solaris/sparc32-sun-solaris2.8;; sparc64) LIBRARYPATH=/Solaris/sparc-solaris/sparc64-sun-solaris2.8;; esac;;Darwin) LIBRARYPATH=/lib/Mac_OS_X;;CYGWIN|MINGW32) LIBRARYPATH=/lib/Windows/i368-mingw32;;esac# start uniCenta oPOSjava -cp $CP -Dswing.defaultlaf=javax.swing.plaf.metal.MetalLookAndFeel -Djava.library.path=$DIRNAME$LIBRARYPATH -Ddirname.path=$DIRNAME/ com.openbravo.pos.forms.StartPOS "$@"

    ]

     
  • Dilan Gilluly
    Dilan Gilluly
    2014-03-06

    You have to do this for both start.sh and configure.sh. Rename the originals and create new ones using the contents of the originals. configure.sh has to be configured first. The setup is supposed to run it which sets Unicenta up to be able to run in its directory, but can't because of the error.

    Maybe it's a different issue. In this case mine was saying "child process not found." I'm not an expert on this, but I happened to poke around to find a workaround. You maybe able to pull .sh scripts from previous versions of Unicenta which may work. It's just that the devels screwed up on this version and decided to compile the Mac/Windows version as .run and name it the Linux version.