misc/149335: shell script runs on Linux but not on freebsd

Oliver Fromme olli at lurza.secnetix.de
Sat Aug 7 20:42:20 UTC 2010

Sorry for the late reply, I don't have much time currently.

Maybe someone else from the -questions list can jump in,
because I don't have much experience with vmware (I prefer
qemu or virtual box).

Paul Lambert <eb30750 at gmail.com> wrote:
 > 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 FreeBSD.
 > 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 part
 > works.  But, the bash shell is reporting an 'od" error.
 > Finally, how much performance do you lose with the linux module emulator?

Not much, probably none at all.  Some people even say that
Linux binaries run faster on FreeBSD than they run on Linux,
because they benefit from the better network code and VM

Anyway, the "linuxulator" isn't really an emulator, it's
rather an ABI-level compatibility layer, very similar to
the i386 (32bit) compatibility layer on FreeBSD/amd64 (64bit).

 > 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?

I'm afraid you won't be able to install vmware this way.
I suggest you look at the emulator/vmware* ports in the
ports collection.

 > BRSINC-VM02# bash -vx VMware-Player-3.1.0-261024.x86_64.bundle
 > [...]
 >    # XXX: put extraction in its own function
 >    MAGIC_NUMBER=`od -An -t u4 -N 4 -aj 
 >    $MAGIC_OFFSET "$file" | tr -d ' '`

There's a bogus line break which is causing this particular
parsing error.  Either join the lines, or put a backslash
at the end of the first line (behind -aj).

But I'm afraid this is the smallest of the problems.
I suspect you won't be able to get this script to run
correctly on FreeBSD, because it seems to do too many
linux-specific things.

Best regards

Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606,  Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758,  Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart

FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd

"And believe me, as a C++ programmer, I don't hesitate to question
the decisions of language designers.  After a decent amount of C++
exposure, Python's flaws seem ridiculously small." -- Ville Vainio

More information about the freebsd-questions mailing list