Reputation: 467
I have example.run file (binary file) that will install a simple software in my linux environment. I want to automate the installation with chef but the problem is that during the installation the software is asking to accept the license( so I have to type yes ) I want to see is there a way to pass a parameter with the .run file or chef can type the yes for me or etc.
file Talend-Installer-20150508_1414-V5.6.2-linux64.run
Talend-Installer-20150508_1414-V5.6.2-linux64.run: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, stripped
Upvotes: 0
Views: 2172
Reputation: 1
It depends on the file (and there is no reason that every *.run
installer behave similarly). Try Talend-Installer-20150508_1414-V5.6.2-linux64-installer.run --help
or perhaps Talend-Installer-20150508_1414-V5.6.2-linux64-installer.run -h
and read its documentation... sometimes there is an option to accept the license. You might also consider using yes(1) in a pipe:
yes | yourfile.run
But be cautious. What if yourfile.run
asked politely:
can I remove every file in /home/ ? [yN]
(Of course, as for any script or executable, you'll need to enable executability and reading with chmod u+rx
and either change your PATH or use ./yourfile.run
or its absolute or relative file path, etc...)
You might also try to use strings(1) on that executable, to perhaps guess (thru some string messages inside), what is possible.
Argument passing is done thru execve(2) and your shell is in charge of globbing -before doing execve
- so there is nothing specific about running *.run
files.
I strongly suggest to take a few days to learn more about Linux. Perhaps read first Advanced Linux Programming & Advanced Bash Scripting Guide (and of course, documentation of Chef and of the Talend product you are installing); if you experiment sysadmin things without understanding, you might mess your system to the point of losing data and having to reinstall everything. Both echo(1) & strace(1) might also be useful.
Upvotes: 1