On Mon, Apr 06, 2015 at 09:01:51PM +0100, Robert Peichaer wrote: > On Mon, Apr 06, 2015 at 09:48:58PM +0800, Nathanael Rensen wrote: > > A couple of autoinstall(8) tweaks that I find useful. > > > > I find it convenient to be able to specify a path to the response file. > > I also prefer to use the DHCP supplied hostname rather than the MAC > > address. > > Actually, these ideas are quite interesting... > > Being able to use the hostname seems to be a good addition, easy enough > to implement and doesn't interfere with existing functionality. > > Using the filename DHCP option to carry over the path to the response > file on the webserver is possible, but that needs some extra setup. > > If the responsefile is in <documentroot>/path/to, like: > > /var/www/htdocs/path/to/install.conf > > The tftp setup would need to be setup like this: > > /tftpboot/etc/boot.conf > /tftpboot/pxeboot > /tftpboot/path/to/auto_install -> ../../pxeboot > /tftpboot/path/to/auto_upgrade -> ../../pxeboot > > > It's handy for the log to remain on the host as a reference. Sometimes the > > email gets lost (e.g. caught in a spam trap). > > Not sure about this yet. > > > I've attached a slighly modified diff for the hostname and path addition > leaving out the manpage parts for now.
Here's the manpage diff for that... Index: autoinstall.8 =================================================================== RCS file: /home/cvs/src/share/man/man8/autoinstall.8,v retrieving revision 1.11 diff -p -u -r1.11 autoinstall.8 --- autoinstall.8 23 Oct 2014 21:33:21 -0000 1.11 +++ autoinstall.8 7 Apr 2015 09:38:02 -0000 @@ -49,12 +49,16 @@ always fetches the response file via the .Nm uses HTTP to fetch one of the files .Pa install.conf -or +, .Ar MAC_address Ns - Ns Pa install.conf +or +.Ar hostname Ns - Ns Pa install.conf for install answers, or one of .Pa upgrade.conf -or +, .Ar MAC_address Ns - Ns Pa upgrade.conf +or +.Ar hostname Ns - Ns Pa upgrade.conf for upgrade answers. The URL used to fetch the file is constructed from information provided in the @@ -71,6 +75,7 @@ then the URLs tried are, in order: .Sm off .Bd -unfilled -offset indent .No http:// Ar next-server No / Ar MAC_address No -install.conf +.No http:// Ar next-server No / Ar hostname No -install.conf .No http:// Ar next-server No /install.conf .Ed .Sm on @@ -79,7 +84,10 @@ where .Ar MAC_address is a string of six hex octets separated by colons representing the MAC -address of the interface being used to fetch the files. +address of the interface being used to fetch the files, +and +.Ar hostname +is the hostname assigned to the system by DHCP. .Pp If the .Ar filename @@ -89,6 +97,7 @@ the URLs tried are, in order: .Sm off .Bd -unfilled -offset indent .No http:// Ar next-server No / Ar MAC_address No -upgrade.conf +.No http:// Ar next-server No / Ar hostname No -upgrade.conf .No http:// Ar next-server No /upgrade.conf .Ed .Sm on @@ -109,6 +118,10 @@ file to be .Cm auto_install or .Cm auto_upgrade . +.Pp +To use a subdirectory as response file location on the HTTP server, the same +directory structure has to exist in the tftproot directory containing the +auto_install or auto_upgrade symbolic links. .Pp Note that in these cases, the HTTP server and TFTP server must be on the same machine.