I want to run an install script from an install DVD. The problem is that there are several DVD to install: I can't eject the disk since the install script is run from it.
I tried to split it in two: the first part install the content of the first DVD, and the second part is copied in /tmp
then executed in background with &
(for the first script to be able to exit, and being able to eject the disc).
The problem is that doing so the second script is not interactive anymore, and the user has to make several choices.
So here's my question: how can I detach a subscript from its parent, keeping it interactive. Or may be there is another (better) solution for multi-disk installs?
Use the exec
command:
exec program args...
This runs the given command in the current process, replacing the program that was running there (the main shell script) instead of running as a child. The new program can then eject the DVD.