hi, all.
i've make a small patch to grub to allow it to use a config files based
on ip address when booting. if vendor tag 150 contains the name of a
directory (ie the last character is '/') then it will append the
machine's ip address.
for example if tag 150 is "/tftpboot/byip/" and the machines ip address
is 12.34.56 then grub will load "/tftpboot/byip/12.34.56".
--
J.F.Carter http://www.jfc.org.uk/
Only in grub/docs: grub.info
Only in grub/docs: grub.info-1
Only in grub/docs: grub.info-2
Only in grub/docs: grub.info-3
Only in grub/docs: multiboot.info
diff -ru grub-orig/netboot/main.c grub/netboot/main.c
--- grub-orig/netboot/main.c Wed Jan 2 21:56:40 2002
+++ grub/netboot/main.c Thu May 2 11:45:34 2002
@@ -1064,7 +1064,12 @@
of CONFIG_FILE. This kind of robustness will be a goal
in GRUB 1.0. */
grub_memmove (config_file, p + 2, l);
- config_file[l] = 0;
+ /* JFC: if configfile ends in a slash append IP address */
+ if (l && config_file[l-1]=='/') {
+ etherboot_sprintf(&config_file[l],"%@",
+ arptable[ARP_CLIENT].ipaddr.s_addr);
+ }
+ /*config_file[l] = 0;*/
}
p += TAG_LEN (p) + 2;