Sysinstall Scripting and Writing install.cfg

I am pxebooting and installing over the network. I've gotten this much to work. There are various items I would like to include in the install.cfg to be set when the host is built. Currently, in the mfsroot, I have a default install.cfg which sets variable values that would be the same across all systems.

The install.cfg runs a sh script that I injected into the mfsroot to ascertain chassis specific variables, such as netDev and disk, which work fine.

I would also like this sh script to configure the network interface and download a Sysinstall config file that will contain various host specific details, such as hostname. However, I am encountering difficulties in getting this to work.

The code that I have in the sh script to accomplish this is:

Code:
ifconfig "${iface}" "${ip}" netmask "${nm}" up
route add default 192.168.100.5
ftp -a 192.168.100.5:freebsd/sysinstall_host.cfg /a/sysinstall_host.cfg
route del default
ifconfig "${iface}" down

The interface is brought up and route added to allow network access to the pxeboot server where the file I want to download is located. Following the download, the route and netDev are returned to their previous state because Sysinstall complains if the interface is already configured. boot_crunch includes all the of the files necessary.

When pxebooting the client, it errors indicating that it could not load the sysinstall_host.cfg file. The debug screen shows that ftp failed to connect citing 'no route host' while there was no error produced when ifconfig and route ran. Also on the debug screen immediately following the section where the other config file is loaded, it shows the interface status changing to up, then down.

Am I missing something obvious here? I am unsure why the client cannot download the file.
 
Back
Top