Subject: Re: shell scripts in emulation
To: None <tech-kern@netbsd.org>
From: Christos Zoulas <christos@zoulas.com>
List: tech-kern
Date: 10/06/2002 16:05:12
In article <1fjn941.14n3vmf1urxx57M%manu@netbsd.org>,
Emmanuel Dreyfus <manu@netbsd.org> wrote:
>
>I tried to fix this in sys/kern/exec_script.c:
>Index: exec_script.c
>===================================================================
>RCS file: /cvsroot/syssrc/sys/kern/exec_script.c,v
>retrieving revision 1.30
>diff -r1.30 exec_script.c
>55a56,57
>> #include <compat/common/compat_util.h>
>> 
>202a205,211
>> 
>>       /* If we are running a non native emulation, check alternate path */
>>       if (epp->ep_esch->es_emul && epp->ep_esch->es_emul->e_path)
>>               if ((emul_find(p, NULL, epp->ep_esch->es_emul->e_path, 
>>                   shellname, &epp->ep_ndp->ni_dirp, 
>>                   CHECK_ALT_FL_EXISTS)) != 0)
>>                       epp->ep_ndp->ni_dirp = shellname;
>
>But this does not work, because the exec package has a NULL es_emul at
>that time. 
>
>Anyone has a better idea?

Look at the parent's emul structure.

christos