ip_addr[]="10.0.1.45"

Doing this might not be very useful on multi-homed hosts because the LAN interface at the lowest hardware address is given the IP address. To give the IP address to a specific LAN interface you must do the following:

ip_addr[0/0/0/0]="10.0.1.45"

This is applied to an LIF (created with make_medialif –m) with the instl_adm command. The LIF can then be placed on media.

Note:

Unless you are using unallocated IP addresses, a boot tape or CDDVD created in this way is specific to a system. You do not want to boot another system with it while the IP address is in use on a live system.

Part B (Installation file system custom network config)

This part of the example deals with providing a more generic (for example, can be used on multiple systems and has information unique to each) solution for IP address and network information that can be applied to an LIF (and therefore to the installation file system within the LIF).

The following section would be generic to all systems located on one LAN segment; they can all access the same gateway:

server="10.0.0.2"

netmask[]="255.255.255.0" route_gateway[0]="10.0.1.1" route_destination[0]="default" disable_dhcp=true

For the system-specific parts, each of the definitions of the IP address is protected by a test on the MAC address:

( lla[0/0/0/0] == "080009654321" ) { ip_addr[0/0/0/0]="10.0.1.45"

}

( lla[2/0/2] == "080009654123" ) { ip_addr[2/0/2]="10.0.1.46"

}

( lla[1/0/0/0] == "080009654213" ) { ip_addr[1/0/0/0]="10.0.1.47"

}

...

This enables the tape or CDDVD to be used on all systems within one subnet.

Example Five (handling user input)

In this example we’re going to look at creating a variable that behaves in different ways. In the first method we’re going to create an enum and force someone to only choose values that are allowed.

140