But I would like to provide the information via DHCP thus giving autoyast the information dynamically. Thus I would have a generic installation environment.
Any ideas ?
If you can make your data appear in /var/lib/dhcpcd/dhcpcd-eth0.info, you can run a script to extract the data and feed the result to linuxrc. For example, put this into your info file:
exec: /myscript info: /tmp/new_data
'/myscript' can then create '/tmp/new_data' which adds the required parameters.
The dhcpcd v3 does not support all option as I am being told from the developer. Version v5 will do.
Thus I am misusing the option 47 (NETBIOS SCOPE ) which is supported by the v3 of the dhcpcd to pass the node type to the installation system.
This way:
- The pxe environment does not need any changes. One menu is valid for all installation ( of a certain OS ) like:
/tftpboot/pxelinux.cfg/sles11-x86.graphic.auto
- The node type is provided by the DHCP configuration. - Simple change
Example:
client 1 0x00123456789 10.1.2.3 # pc123
{
option 12 "pc123"
option sa 10.1.2.1
option bf "/tftpboot/pxelinux.0"
---->>>> option 47 "DEV.STD"
}
- The rules file has to be enhanced
Example:
<rule>
<custom2>
<script>
## Software install selection - based on scope with is provided by DHCP
eval scope=$( cat /var/lib/dhcpcd/dhcpcd-*info | grep NETBIOSSCOPE | tail -1 | cut -f2 -d"=" | tr [A-Z] [a-z] )
echo -n $scope
# Result is like dev.std , dev.enh , ....
</script>
<match>*</match>