Problem running hush shell script from within a script
adam at alcorn.com
Fri Aug 6 17:11:15 UTC 2010
Thank you for this information. I am modifying the way I am writing
the scripts to work around this problem. Here are more details on
exactly what is happening:
1. I run a script called traxxOS.sh
2. traxxOS.sh runs a script called traxxIO.sh and passes 1 parameter
"start" to it
3. traxxIO.sh loads a kernel module that is a custom made character
device I use for interfacing with various inputs and leds on my custom
Blackfin BF537 based board
4. traxxOS.sh runs traxxIO.sh and passes 1 parameter
"start_cf_autodetect" to it
5. traxxIO.sh uses the echo command to write a string to the
previously created character device at /dev/traxx_io
At step 5 is where I run into the problem. the system behaves as
though the device is not there. I get no indication from the kernel
module that it received the string sent by the echo command. If I run
traxxIO.sh and pass the same "start_cf_autodetect" parameter from the
command line (instead of from within the traxxOS.sh script) it works
I am sorry I do not have time to track down what is causing this, but
my workaround is to use the "." command to load a configuration script
into the traxxOS.sh script so that I can do everything from within the
one traxxOS.sh script.
On Fri, Aug 6, 2010 at 1:00 PM, Denys Vlasenko <vda.linux at googlemail.com> wrote:
> On Fri, Aug 6, 2010 at 5:35 PM, Adam Rosenberg <adam at alcorn.com> wrote:
>> I am seeing some strange behavior when I try to run a script from
>> within a script. For example, I am able to run a few scripts from
>> within my main script but it seems like some of the character drivers
>> I load from the second script that create entries using mdev in /dev
>> do not work properly from within the main script.
> Please provide more detailed information.
>> Is this expected?
>> When can I find information on hush script limitations as compared to
>> bash scripting?
> There is no such information. I prefer to fix bugs instead
> of documenting them.
> Some information on missing features can be found in hush.c source
More information about the busybox