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



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 the
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 themselves.

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 <eb30750@xxxxxxxxx> 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 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?
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 <olli@xxxxxxxxxxxxxxxxx>wrote:

Redirected to the -questions.

Paul <eb30750@xxxxxxxxx> wrote:
> What about matching the ' marks in this section? I get a command
error.
>
> > > # XXX: put extraction in its own function
> > > MAGIC_NUMBER=`od -An -t u4 -N 4 -j $MAGIC_OFFSET "$file" | tr -d
' '`

That command works fine for me:

$ MAGIC_OFFSET=42
$ file=/etc/motd
$ MAGIC_NUMBER=`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ä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

"I invented Ctrl-Alt-Delete, but Bill Gates made it famous."
-- David Bradley, original IBM PC design team



_______________________________________________
freebsd-questions@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: misc/149335: shell script runs on Linux but not on freebsd
    ... to develop a smarter install script. ... Even if I correct the shell calls ... Looks like the Linux emulator is only 32 bit. ... I would like to see if I can get the x64 to install but if not I think the ...
    (freebsd-questions)
  • Re: misc/149335: shell script runs on Linux but not on freebsd
    ... One last observation I have made regarding this bundle installer. ... Even if I correct the shell calls ... extract it and place it in the location where the shell script would place ... Looks like the Linux emulator is only 32 bit. ...
    (freebsd-questions)
  • Re: How to set /etc/fstab again after system has started
    ... switching directories and command history are superior to bash. ... on a Linux desktop somewhere. ... that shell prompt become somewhat more important. ... the current directory and run an unzip script on them. ...
    (comp.os.linux.misc)
  • Re: misc/149335: shell script runs on Linux but not on freebsd
    ... This script implements RPMs so I am sure that I need the linux ... I had previously found a guide on how to install RPMs on FreeBSD. ... how much performance do you lose with the linux module emulator? ...
    (freebsd-questions)
  • Re: Application starting from boot-up
    ... starting it up from the Shell port. ... port, which is the main serial port on the board. ... is started from /etc/init.d/rcS script, then this message does not appear. ... a system that has Linux pre-installed and where I do not want to make any ...
    (comp.os.linux.embedded)