Add `--with-configfile' into the commands "bootp" and "dhcp".
This commit is contained in:
parent
00a436ee38
commit
030d695853
3 changed files with 34 additions and 2 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2001-06-22 OKUJI Yoshinori <okuji@gnu.org>
|
||||||
|
|
||||||
|
From Thierry Laronde <thierry@cri74.org>:
|
||||||
|
* stage2/builtins.c (configfile_func): Added a prototype.
|
||||||
|
(bootp_func): If `--with-configfile' is given, set
|
||||||
|
WITH_CONFIGFILE to one, and call configfile_func with
|
||||||
|
CONFIG_FILE.
|
||||||
|
|
||||||
2001-06-21 OKUJI Yoshinori <okuji@gnu.org>
|
2001-06-21 OKUJI Yoshinori <okuji@gnu.org>
|
||||||
|
|
||||||
* docs/grub.texi: Update the location of the CVS repository
|
* docs/grub.texi: Update the location of the CVS repository
|
||||||
|
|
3
NEWS
3
NEWS
|
@ -32,6 +32,9 @@ New in 1.0 - XXXX-XX-XX:
|
||||||
* Jump to the physical entry address of a Multiboot kernel when booting
|
* Jump to the physical entry address of a Multiboot kernel when booting
|
||||||
it up. The old behavior was to use the virtual one, regardless of the
|
it up. The old behavior was to use the virtual one, regardless of the
|
||||||
setting of the physical address.
|
setting of the physical address.
|
||||||
|
* The commands "bootp" and "dhcp" accepts a new option
|
||||||
|
`--with-configfile', so that you can load a remotely specified
|
||||||
|
configuration file automatically, like the network boot images.
|
||||||
|
|
||||||
New in 0.5.96 - 2000-10-04:
|
New in 0.5.96 - 2000-10-04:
|
||||||
* New commands, "reboot" and "halt".
|
* New commands, "reboot" and "halt".
|
||||||
|
|
|
@ -80,6 +80,10 @@ int show_menu = 1;
|
||||||
/* The BIOS drive map. */
|
/* The BIOS drive map. */
|
||||||
static unsigned short bios_drive_map[DRIVE_MAP_SIZE + 1];
|
static unsigned short bios_drive_map[DRIVE_MAP_SIZE + 1];
|
||||||
|
|
||||||
|
/* Prototypes for allowing straightfoward calling of builtins functions
|
||||||
|
inside other functions. */
|
||||||
|
static int configfile_func (char *arg, int flags);
|
||||||
|
|
||||||
/* Initialize the data for builtins. */
|
/* Initialize the data for builtins. */
|
||||||
void
|
void
|
||||||
init_builtins (void)
|
init_builtins (void)
|
||||||
|
@ -349,6 +353,15 @@ static struct builtin builtin_boot =
|
||||||
static int
|
static int
|
||||||
bootp_func (char *arg, int flags)
|
bootp_func (char *arg, int flags)
|
||||||
{
|
{
|
||||||
|
int with_configfile = 0;
|
||||||
|
|
||||||
|
if (grub_memcmp (arg, "--with-configfile", sizeof ("--with-configfile") - 1)
|
||||||
|
== 0)
|
||||||
|
{
|
||||||
|
with_configfile = 1;
|
||||||
|
arg = skip_to (0, arg);
|
||||||
|
}
|
||||||
|
|
||||||
if (! bootp ())
|
if (! bootp ())
|
||||||
{
|
{
|
||||||
if (errnum == ERR_NONE)
|
if (errnum == ERR_NONE)
|
||||||
|
@ -359,6 +372,12 @@ bootp_func (char *arg, int flags)
|
||||||
|
|
||||||
/* Notify the configuration. */
|
/* Notify the configuration. */
|
||||||
print_network_configuration ();
|
print_network_configuration ();
|
||||||
|
|
||||||
|
/* XXX: this can cause an endless loop, but there is no easy way to
|
||||||
|
detect such a loop unfortunately. */
|
||||||
|
if (with_configfile)
|
||||||
|
configfile_func (config_file, flags);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -367,8 +386,10 @@ static struct builtin builtin_bootp =
|
||||||
"bootp",
|
"bootp",
|
||||||
bootp_func,
|
bootp_func,
|
||||||
BUILTIN_CMDLINE | BUILTIN_MENU,
|
BUILTIN_CMDLINE | BUILTIN_MENU,
|
||||||
"bootp",
|
"bootp [--with-configfile]",
|
||||||
"Initialize a network device via BOOTP."
|
"Initialize a network device via BOOTP. If the option `--with-configfile'"
|
||||||
|
" is given, try to load a configuration file specified by the 150 vendor"
|
||||||
|
" tag."
|
||||||
};
|
};
|
||||||
#endif /* SUPPORT_NETBOOT */
|
#endif /* SUPPORT_NETBOOT */
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue