From 7a87d69fcfb98f8d912c9d1fa1181755cf9d0ebd Mon Sep 17 00:00:00 2001 From: Andrey Borzenkov Date: Sun, 14 Jul 2013 22:59:00 +0400 Subject: [PATCH] * grub-core/net/bootp.c: Export net_* variables. * grub-core/net/net.c: Likewise. --- ChangeLog | 5 +++++ grub-core/net/bootp.c | 6 +++++- grub-core/net/net.c | 6 ++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 9058cd7f2..8184ded98 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-07-14 Andrey Borzenkov + + * grub-core/net/bootp.c: Export net_* variables. + * grub-core/net/net.c: Likewise. + 2013-07-14 Vladimir Serbinenko * grub-core/fs/zfs/zfs_lz4.c: Add missing packed attribute. diff --git a/grub-core/net/bootp.c b/grub-core/net/bootp.c index e0ab47e12..72edc2124 100644 --- a/grub-core/net/bootp.c +++ b/grub-core/net/bootp.c @@ -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) { diff --git a/grub-core/net/net.c b/grub-core/net/net.c index 5d2c2f0dd..481031990 100644 --- a/grub-core/net/net.c +++ b/grub-core/net/net.c @@ -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