Problem with busybox' read-command

Hi All,

i have a problem with the read-command in busybox (1.0 pre7). Normally my embedded system will run directly into a kiosk-mode X-Session, but I want to have an option for interrupting the startup-sequence for maintenance. For this i want to use the read-command, par example in this way:

#!/bin/bash echo "1: action 1" echo "2: action 2" read -t 25 YOURCHOICE if [ "$YOURCHOICE" = "1" ]; then echo "starting action 1" elif [ "$YOURCHOICE" = "2" ]; then echo "starting action 2" else echo "timeout reached" fi

If the timeout is reached, the standard startup sequence will go on, if someone pressed any key, another script should be started. This script is working fine in bash 2.0x at my workstation.

But it seems, that read has no switch "-t" for timeout in busybox, so it will be ignored and the systems is blocked in the line with the read-command. Some kind of "infinite waiting".

Is there any other possibility to have a non-blocking sequence like above?

thanks, Jens

--
Die obige Adresse ist OK, wird aber nicht gelesen.
Für Mails an mich bitte "usenet" gegen "jens.nixdorf" austauschen.
Reply to
Jens Nixdorf
Loading thread data ...

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.