* grub-core/net/bootp.c: Export net_* variables.

* grub-core/net/net.c: Likewise.
This commit is contained in:
Andrey Borzenkov 2013-07-14 22:59:00 +04:00
parent 795b3dc094
commit 7a87d69fcf
3 changed files with 16 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2013-07-14 Andrey Borzenkov <arvidjaar@gmail.com>
* grub-core/net/bootp.c: Export net_* variables.
* grub-core/net/net.c: Likewise.
2013-07-14 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/fs/zfs/zfs_lz4.c: Add missing packed attribute.

View file

@ -49,6 +49,7 @@ set_env_limn_ro (const char *intername, const char *suffix,
grub_env_set (varname, value);
value[len] = c;
grub_register_variable_hook (varname, 0, grub_env_write_readonly);
grub_env_export (varname);
}
static void
@ -212,7 +213,10 @@ grub_net_configure_by_dhcp_ack (const char *name,
}
if (is_def)
grub_env_set ("net_default_interface", name);
{
grub_env_set ("net_default_interface", name);
grub_env_export ("net_default_interface");
}
if (device && !*device && bp->server_ip)
{

View file

@ -891,6 +891,7 @@ grub_net_network_level_interface_register (struct grub_net_network_level_interfa
*ptr = '_';
grub_env_set (name, buf);
grub_register_variable_hook (name, 0, hwaddr_set_env);
grub_env_export (name);
}
{
@ -904,6 +905,7 @@ grub_net_network_level_interface_register (struct grub_net_network_level_interfa
*ptr = '_';
grub_env_set (name, buf);
grub_register_variable_hook (name, 0, addr_set_env);
grub_env_export (name);
}
inter->card->num_ifaces++;
@ -1643,12 +1645,16 @@ GRUB_MOD_INIT(net)
{
grub_register_variable_hook ("net_default_server", defserver_get_env,
defserver_set_env);
grub_env_export ("net_default_server");
grub_register_variable_hook ("pxe_default_server", defserver_get_env,
defserver_set_env);
grub_env_export ("pxe_default_server");
grub_register_variable_hook ("net_default_ip", defip_get_env,
defip_set_env);
grub_env_export ("net_default_ip");
grub_register_variable_hook ("net_default_mac", defmac_get_env,
defmac_set_env);
grub_env_export ("net_default_mac");
cmd_addaddr = grub_register_command ("net_add_addr", grub_cmd_addaddr,
/* TRANSLATORS: HWADDRESS stands for