Good evening everybody,
I'd like and create a file MyInstaller.bin, "containing" another installer Goofy.bin and files hosted in a folder Mickey, performing following operations:
1) show inside console a text message, token by a text file, to "package" inside MyInstaller.bin
2) "Press Enter to Continue": script stops, and wait for user input
3) launches Goofy.bin, which will produce folder Donald in output
4) move folder Donald inside another folder, whom name user will have and insert in input, using as default (on "Enter" key press) /opt. Also, I've to include code for error management, if user specifies a non-existing folder
5) extract folder Mickey (to package inside MyInstaller.bin) inside another folder, whom name user will have and insert in input, using as default (on "Enter" key press) /opt. Also, I've to include code for error management, if user specifies a non-existing folder
6) ask user for a machine account, using as default (on "Enter" key press) root. If user doesn't exist on the machine, script asks if user wants to create it. If so, requires username and password, and save them in /etc/passwd; if not, come back to cycle and requires an account name.
7) insert two text rows at the top of .profile file in folder /root, or /home/<username>, depending about what user choosed in step 6). Subproblem: the file automatically executed at login, is named ".profile" on each and every distroes? If not, is there a system variable to identify it?
8) if user specified at step 6) is not root, executes a set of chmod on a set of Mickey subfolders.
Not so simple a question, I agree, so any partial help, or URL to study, is welcome.... starting, how to create a .bin!
I'm a programmer and I have some experience of Linux administration, but definitely, too few knowledge of shell programming.
I opened any .bin and I noted, there's an initial serie of code instructions, followed by data in binary format; but, how to create a .bin installer, starting from data I want to install?