FAI working like RIS?
Dominik Kasprzyk
dk at star.sr.bham.ac.uk
Wed Oct 12 20:12:14 CEST 2005
Apologies for the long reply time, but I've had holiday+illness and I've been systematically going through my email (of which there is a lot...:( )
Anyway, I've had fun with this hostname issue because I didn't know enough to set the hostname via DHCP at the time.
As far as I could tell, once the machine is up and running in the install, there is no way to get the hostname changed and a little asking around generally got me the view that it's actually impossible once the machine restarts.
The way I got around it was to create a separate file with the variables for the new host name in the /tmp/fai directory and read those in for each script executing later that needs it. This file gets created using a scipt in the classes directory which also adds the classes in the file /classes/$(HOSTNAME) in the directory (as Thomas showed previously). in fact, a better way of declaring the hostname is to have a script at the end that reads the hostname from the file and declares it as the last script run in classes, mimiking FAI's default and intelligent behaviour that the host class overides all previous other classes. I found no way of changing the HOSTNAME variable for the main overall FAI script as any scripts seemed to be run within a derived execution environment, so changes of Bash variables do not make their present felt to the parent, only to children scripts of their own. Otherwise, it's possible to just work around FAI's use of a bad hostname.
It's a cludge, but it worked. Wish you better luck
Dominik.
On Fri, 30 Sep 2005 10:10:15 +0100
Ben Willcox <ben.willcox at british-gymnastics.org> wrote:
<snip>
>
> I do have one more little problem that maybe you can help with - I
> posted previously about a menu prompt for the hostname so I can type in
> the hostname at build time, but I can't manage to get FAI to recognise
> the new hostname when it applies the settings to the target machine:
>
> My menu script prompts for the hostname, and feeds that to the
> 'hostname' command, and sets the HOSTNAME variable. However, even
> running these commands manually from the console during install, FAI
> doesn't pick up this new hostname and still configures the target
> machine with the first octect of the IP address. Do you know how I can
> change the hostname in this way?
>
> Thanks,
> Ben
>
More information about the linux-fai
mailing list