Reputation: 1609
I have a vendor-provided RPM that normally asks the user to accept an EULA agreement as part of package installation. Basically the preinstall script (as displayed by rpm -qa --scripts) looks like this:
rm -f /tmp/mypackage_EULA.txt
echo "Lots and lots of lines of EULA stuff" >> /tmp/mypackage_EULA.txt
echo "Press 'q' to continue" >> /tmp/mypackage_EULA.txt
less -X /tmp/mypackage_EULA.txt
echo "By installing this package you are agreeing to the license, &c."
echo "Press 'a' to agree"
ans=""
while [ "$ans" == "" ]
do
read -n 1 ans
done
if [ "$ans" != "a" ]; then
echo ""
echo "aborting ..."
exit 1
else
echo ""
echo "installing ..."
fi
The vendor's notes suggest using --noscripts if you don't want to have to manually accept the EULA.
However, what I'd like to do is to install it as part of Kickstart, either by adding it to the %packages list or having it installed automatically as a prereq for other packages I'm installing.
Upvotes: 1
Views: 824
Reputation: 80931
I strongly dislike vendors who do things like that which break automated installation of their RPMs. (--noscripts
is not safe to use on arbitrary packages and can greatly break things if used incorrectly.)
I don't believe (though I haven't specifically looked) that you can set up options like that for packages listed in the %packages
section of a kickstart script.
There are two things I think you can do to work around this problem.
You can manually install just that RPM in a %post
script and thus pass --noscripts
as instructed (though be aware that CentOS 7
's version of yum
is likely to "yell" at you a bit for making changes to the rpmdb outside of its control though it should recover just fine).
Alternatively you could see if you can feed whatever they are using to request that information what it wants from standard input and do something like
echo a | yum install <package>
Upvotes: 1