I need to start a Bash script containing calls to dialog at Debian boot time. This is how I've been able to do it:
- Unset default root password
- Set --autologin option to tty1 in initrd (1:2345:respawn:/sbin/getty --autologin root tty1)
- Write the full path of my script in /etc/rc.local
However, dialog has an unusual behaviour: the box appears, but then stdin seems to be overflowing stdout. When I press the arrow keys, no button is selected, but instead, corresponding ASCII chars are displayed on top of the dialog box, starting from the default choice position:
Note that if I then press enter, the keys are sent to dialog and corresponding option is selected as intended. The script has been testing working when executed normally.
I suppose something is missing in the shell initialization: if I put /bin/bash
in rc.local
, I get no job control in this shell
message, and can't send signal to processes nor get pids (I get question marks instead of pids in top
).
Why is this behaviour and how can I overcome it?