|
Shell Script to Automate Package Installation
Hi,
I have been asked to automate the package installation through shell script.
I have 10 packages to be installed and in that 4 packages requires additional DB information(Host Name, Credentials etc) to be passed and for remaining 6 packages i need to provide the "Yes" - "No" .
I have tried with expect , admin file but as per my understanding both requires standard input/steps to defined. Can i use expect with If loop after spawning the command
say f or ex : Spawn pkgadd "Test.pkg"
if (expect [Host Name])
then
send "HOST NAME"
Is it possible to validate the outcome of the command and input the option through shell script? Please Clarify. or Do we have any other approach to perform this?
Thanks,
Muhil
|