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> <match_type>exact</match_type> </custom2> <result> <profile>classes/@custom2@.autoinst.xml</profile> <continue config:type="boolean">true</continue> </result> </rule>
Additional note: A preinstall script will copy the /var/lib/dhcpcd/dhcpcd-*info information to the target system so this information is not lost and can be used from the pre/post autoyast scripts.
On the long run I will provide all information via DHCP because the base installation system is then a generic one thus the installation system could be applied everywhere without any changes required. All required information for autoyast will be provided by the DHCP system.
thx Hajo