[uClinux-dev] shell script hangs inittab

Fuller, Vernon Vernon.Fuller at avocent.com
Mon Aug 15 13:10:21 EDT 2005


If I put a delay of one second in my script it runs fine.
That is confusing to me because I can start up the dhcpcd application
from the same place in inittab with out a hitch.  
It may be there is a library that is not ready to be loaded when I run
dhcpcd (the app) from a bash environment instead of init. 
I will keep the delay in :-)

thanks
 
> I am trying to start a shell script from ininttab and it hangs init.
>
> The shell script simply starts up dhcpcd in while[ 1 ] loop.
>
> If dhcpcd ever returns without finding a dhcp server my script sets a
>
> usable default IPAddress.
>
>
>
> The default uclinux format for inittab is different than the man  
> page so I am posting this question here.
>
>
>
> Here is my script named dhcpcd,  the real application dhcpcd is  
> renamed to dhcpcd.app
>
> Both are executable
>
> #!/usr/sbin/bash
>
> # make sure we get an IP address
>
>
>
> while [ 1 ]
>
> do
>
>         if ! dhcpcd.app  $1 $2 $3 $4
>
>         then
>
>                 echo "Could not find a DHCP server, reverting to  
> static IPAddress 169.254.0.121"
>
>                 ifconfig eth0 169.254.0.121
>
>         fi
>
> done
>
>
>
> Here is my inittab,
>
>
>
> ...
>
> console:unknown:/usr/sbin/dhcpcd
>
>
>
>
>
> _______________________________________________
> uClinux-dev mailing list
> uClinux-dev at uclinux.org
> http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
> This message was resent by uclinux-dev at uclinux.org

_______________________________________________
uClinux-dev mailing list
uClinux-dev at uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev at uclinux.org



More information about the uClinux-dev mailing list