Install debian from OM 2008.12 (bash read -t/-n workarround)
Michael Tomschitz
michael.tomschitz at gmx.de
Sat Mar 6 21:07:36 CET 2010
Hi,
Michael Tomschitz schrieb:
> install.sh requires /bin/bash which is onboard in Om2008.12, but has a
> buggy read built-in, which only works the first time. Timeout ("-t 5")
> doesn't time out at all the second time, so typing anything stops
> install.sh in function five_seconds_to_quit().
The following doesn't trigger the second-read-bug in Om2008.12 /bin/bash:
root at om-gta02:~# diff -u old new
--- old/install.sh Tue Apr 6 20:55:11 2010
+++ new/install.sh Tue Apr 6 20:56:43 2010
@@ -228,7 +228,7 @@
# since dash doesn't support 'read' -t and -n options, this script
# should be executed only by /bin/bash. However, all official
# Openmoko images use busybox, which doesn't provide /bin/bash
- read -t 5 -n 1 intern_var || intern_var=continue
+ intern_var=`(read -t 5 -n 1 intern_var || intern_var=continue; echo $intern_var)`
if [ "$intern_var" != "continue" ]; then
echo "E: aborting on user request"
exit 1
Regards,
Michael
More information about the Smartphones-userland
mailing list