I am trying to setup a bonded network from the %pre section of a CentOS 7 kickstart. I can prove the the following bonded network works:
network --device=mynetwork --bondslaves=eth0,eth1 --bootproto static --ip 192.168.0.1 --activate --onboot yes --noipv6 --netmask=255.255.0.0
network --hostname=testy
However, when I try to add that to /tmp/network.ks
and importing, it doesn't work. I am wondering what I am doing wrong.
I add the import in the same place that the above lines were, like so:
%include /tmp/network.ks
Then I have the same lines appended directly to the import:
%pre
echo "network --device=mynetwork --bondslaves=eth0,eth1 --bootproto static --ip 192.168.0.1 --activate --onboot yes --noipv6 --netmask=255.255.0.0" >/tmp/network.ks
echo "network --hostname=testy" >>/tmp/network.ks
%end
Are those not functional equivalents since the documentation says:
Use the %include /path/to/file command to include the contents of another file in the Kickstart file as though the contents were at the location of the %include command in the Kickstart file.