From owner-freebsd-questions@FreeBSD.ORG Sat Aug 7 15:46:02 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 92DF0106566C for ; Sat, 7 Aug 2010 15:46:02 +0000 (UTC) (envelope-from eb30750@gmail.com) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id 47A2A8FC14 for ; Sat, 7 Aug 2010 15:46:02 +0000 (UTC) Received: by ywf9 with SMTP id 9so3887188ywf.13 for ; Sat, 07 Aug 2010 08:46:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=1ITDbNoN/ADapfKbRNaM2GbtKrb42TEei7Qm1cE2WdY=; b=riB+WvCYOTHXvaegTU3ABm8/PlDi7bFVKZ3jNlX5z0Aub/doUlsRDAOiLzCovAKLva 7IHZG/ISyuFzerILExluvt0me3fBkMdiLyHaeUjVTaG9bja+Km90Y9rCZE+94isEp/cu 67Ib6ul69+q8ll1H+0SKv6j/2geI0/wVSbsrQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=YK8J9FrdetdIgq9c+nhqo7ddp/VDiRqPb8KFtkAzyBd7yAHfhMDdEA3IRP6tJSDcEL kTgMmJh4WxFfKGLU677YxeW49ZvndLtnkVcPPtYhR22Os3LXkSAlzHiL++5MEVwmnTZu Qiy6ldCJqsf1PiA5EbYVujmTMRbRs1vV7a+kQ= MIME-Version: 1.0 Received: by 10.150.202.9 with SMTP id z9mr15295240ybf.211.1281195959655; Sat, 07 Aug 2010 08:45:59 -0700 (PDT) Received: by 10.151.115.10 with HTTP; Sat, 7 Aug 2010 08:45:59 -0700 (PDT) In-Reply-To: References: <201008061735.o76HZEal051334@lurza.secnetix.de> Date: Sat, 7 Aug 2010 11:45:59 -0400 Message-ID: From: Paul Lambert To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: misc/149335: shell script runs on Linux but not on freebsd X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Aug 2010 15:46:02 -0000 Oliver, One last observation I have made regarding this bundle installer. The reason for all the size calculations is that the installer and code are offset a specific bytes within the file. Even if I correct the shell calls the file size will change and the code will not be extracted correctly. However, I can open the file and find exactly where the code is located, extract it and place it in the location where the shell script would place and see if it will run from there. This is a longshot but the fact is shel= l scripts automate what can be manually performed. But, using vi will be tedious. Gedit will not open the file. Are there any other very forgiving editors that will make it easier to edit this file? Thanks again. Paul On Fri, Aug 6, 2010 at 5:27 PM, Paul Lambert wrote: > Oliver, > > Looks like the Linux emulator is only 32 bit. Here is the error I get > after installing the emulator and running the /usr/compat/linux/bin/bash > shell. > > This is a x64 bundle and does not match that of the current > architecture. Please download the x86 bundle. > > I would like to see if I can get the x64 to install but if not I think th= e > x86 will but it may have reduced performance since I am looking to run > virtual machines that in effect would be running on an emulator themselve= s. > > May be necessary to move to Virtual Box but I loose considerable > functionality there especially USB support. > > Paul > > > > On Fri, Aug 6, 2010 at 4:31 PM, Paul Lambert wrote: > >> Oliver, >> >> Thanks for the reply. I am attaching the bash output from the shell >> script. This script implements RPMs so I am sure that I need the linux >> module. I had previously found a guide on how to install RPMs on FreeBS= D. >> I have a printer that has an RPM that allows it to work on Linus. So I >> would think that I will need the Linux module in the future. >> >> I previously had made the "stat" change to the shell script and that par= t >> works. But, the bash shell is reporting an 'od" error. >> >> Finally, how much performance do you lose with the linux module emulator= ? >> Do you believe I only need the emulator to get VMware installed or will = it >> make other linux calls that are not part of FreeBSD? >> >> Thanks >> >> Paul >> >> >> On Fri, Aug 6, 2010 at 1:35 PM, Oliver Fromme wr= ote: >> >>> Redirected to the -questions. >>> >>> Paul wrote: >>> > What about matching the ' marks in this section? I get a command >>> error. >>> > >>> > > > # XXX: put extraction in its own function >>> > > > MAGIC_NUMBER=3D`od -An -t u4 -N 4 -j $MAGIC_OFFSET "$file" | t= r -d >>> ' '` >>> >>> That command works fine for me: >>> >>> $ MAGIC_OFFSET=3D42 >>> $ file=3D/etc/motd >>> $ MAGIC_NUMBER=3D`od -An -t u4 -N 4 -j $MAGIC_OFFSET "$file" | tr -d ' = '` >>> $ echo $MAGIC_NUMBER >>> 540684323 >>> >>> What's the exact error message that you get, and what are >>> the values of the variables involved? >>> >>> By the way, when debugging shell scripts it is very helpful >>> to run the shell with -vx. Then it prints the script as it >>> is being parsed, and additionally each command is printed >>> after expansion. >>> >>> Best regards >>> Oliver >>> >>> -- >>> Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. = M. >>> Handelsregister: Registergericht Muenchen, HRA 74606, Gesch=E4ftsfuehr= ung: >>> secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht M= =FCn- >>> chen, HRB 125758, Gesch=E4ftsf=FChrer: Maik Bachmann, Olaf Erb, Ralf G= ebhart >>> >>> FreeBSD-Dienstleistungen, -Produkte und mehr: >>> http://www.secnetix.de/bsd >>> >>> "I invented Ctrl-Alt-Delete, but Bill Gates made it famous." >>> -- David Bradley, original IBM PC design team >>> >> >> >