Fixes various issues, one in particular reported by Pascal de Bruijn on
IRC where bash won't timeout when using readline as in 'read -e -t 10',
which should escape back to shell when left alone for 10 seconds.
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>