Automatic startup script with user interaction
#1
Sun, 2017-12-03 22:50
Profia
-
- Offline
- 3 months 3 weeks ago
- 2017-12-03
Hi,
I have a script and I need this script to be run on startup.
The script must be run automatically in defaut console withou login prompt.
However during the run it displays some info and requires user input.
Could you please advise me how to configure the system to run the script in the way I described above ?
Thank you.
After some investigation I found a working solution.
in /etc/inittab
I modified the line
tty1::respawn:/sbin/getty 38400 tty1
to
tty1::once:/bin/sh /etc/scripts/myscript.sh
to keep the shell after the script finishes I put
/bin/sh
to the end of the script