Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 Aug 2001 10:31:45 +0800
From:      Trent Nelson <nelsont@wa.switch.aust.com>
To:        freebsd-questions@FreeBSD.org
Subject:   Re: Linux compatibility problem.
Message-ID:  <20010831103145.O1562@freebsd06.udt>
In-Reply-To: <NFBBJPHLGLNJEEECOCHAKEBICBAA.shurd@sk.sympatico.ca>; from shurd@sk.sympatico.ca on Thu, Aug 30, 2001 at 08:12:38PM -0600
References:  <20010831095244.N1562@freebsd06.udt> <NFBBJPHLGLNJEEECOCHAKEBICBAA.shurd@sk.sympatico.ca>

next in thread | previous in thread | raw e-mail | index | archive | help

This is a multi-part message in MIME format.

--------------InterScan_NT_MIME_Boundary
Content-Type: text/plain; charset=us-ascii

On Thu, Aug 30, 2001 at 08:12:38PM -0600, Stephen Hurd wrote:
> >    If I've invoked /compat/linux/bin/bash and attempt to run a shell
> >    script that has "#!/bin/sh" as its first line, the FreeBSD /bin/sh
> >    seems to get called as the interpreter - as opposed to
> >    /compat/linux/bin/sh.  Is this correct?
> 
> Heh, that's right, 'cause the script is not a linux binary.  :-)

    
    Well, yeah, of course.  But!
    
(nelsont@freebsd06:ttyq0) (Fri/10:27) ..                            (~)
% /compat/linux/bin/bash 
Setting Environment for RTPROTO project
There are times when truth is stranger than fiction and lunch time is
one of them.
[nelsont@freebsd06 /compat/linux/bin]$ ls
abe       chmod  date   false  ls     nice   rpm        stty   true
basename  chown  dd     fgrep  mkdir  pwd    setserial  sync   uname
bash      cp     echo   grep   mknod  rm     sh         tcsh
chgrp     csh    egrep  ln     mv     rmdir  sleep      touch
[nelsont@freebsd06 /compat/linux/bin]$ cd /bin
[nelsont@freebsd06 /bin]$ ls
abe       chmod  date   false  ls     nice   rpm        stty   true
basename  chown  dd     fgrep  mkdir  pwd    setserial  sync   uname
bash      cp     echo   grep   mknod  rm     sh         tcsh
chgrp     csh    egrep  ln     mv     rmdir  sleep      touch
[nelsont@freebsd06 /bin]$ exit
exit
(nelsont@freebsd06:ttyq0) (Fri/10:27) ..                            (~)
% ls /bin
[      cp    domainname  hostname  mkdir   pwd       rm     sleep  unlink
bash   csh   echo        kill      mv      rcp       rmail  stty   vim
cat    date  ed          link      old-sh  realpath  rmdir  sync   vimtutor
chio   dd    expr        ln        pax     red       rvim   tcsh   zsh
chmod  df    gvim        ls        ps      rgvim     sh     test


    See my point?  One would think that ``/bin/sh'' would translate to
    ``/compat/linux/bin/sh'' when in Linux compatibility mode executing
    a shell script.

        Trent.
-- 
Trent Nelson - Software Engineer - nelsont@switch.aust.com
       "A man with unlimited enthusiasm can achieve 
               almost anything." --unknown 

--------------InterScan_NT_MIME_Boundary
Content-Type: text/plain;
	name="InterScan_Disclaimer.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="InterScan_Disclaimer.txt"

The information transmitted is intended for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination, copying or other use of, or taking any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you have received this email and you are not the intended recipient, please contact the sender and delete the material from your system. The company is not responsible for any changes made to the material other than those made by the company or for the effect of the changes on the meaning of the material.

--------------InterScan_NT_MIME_Boundary--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010831103145.O1562>