I've been looking around, and haven't yet seen an example of anyone using logic to determine packages/package group selections for options beneath %packages
. I'm trying to have kickstart install packages based on criteria discovered in %pre
, for instance:
%pre
if [ "$(/usr/sbin/dmidecode -s system-manufacturer)" = 'Dell Inc.' ]; then
echo 'srvadmin-all'
elif [ "$(/usr/sbin/dmidecode -s system-manufacturer)" = 'VMware, Inc.' ]; then
echo 'open-vm-tools'
fi
%end
I've never seen an example of conditional logic in the %packages
section, but I was thinking about printing all of the output into a file that is referenced with an %include
statement but I've had issues with %include
under %packages
since RHEL7.
I'm curious to know if there are any other methods anyone is using successfully along these lines.