On 3 November 2015 at 19:19, Bastian Bittorf <bitt...@bluebottle.com> wrote: > while debugging things, we saw that each > command invoked via rc.common->service or > /lib/functions/network.sh -> config_load > pollutes the env-space a *lot*. here it is > for each service ~20k. > > some things are easy for getting rid of: > one can call 'network_flush_cache()' from > /lib/functions/network.sh >
network_flush_cache only unsets last ubus call result. > but i'am unsure how to unset all these vars: Vars set from parsing uci config are exported with `-n` flag by default, so these should disappear once the current shell quits. If it really matters, - Scan the result of "set" command and "unset" them at your will. - Load and parse uci in a subshell Cheers, yousong > > CONFIG_APPEND='' > CONFIG_LIST_STATE='cfg064d76_interface cfg084d76_interface' > CONFIG_NUM_SECTIONS='10' > CONFIG_SECTION='cfg146b70' > CONFIG_SECTIONS='cfg02d149 cfg0491cc cfg064d76 cfg084d76 cfg0a4e54 > cfg0c4e54 cfg0e4e54 cfg104e54 cfg126b70 cfg146b70' > CONFIG_cfg02d149_AllowNoInt='yes' > CONFIG_cfg02d149_ClearScreen='no' > CONFIG_cfg02d149_DebugLevel='0' > CONFIG_cfg02d149_FIBMetric='flat' > CONFIG_cfg02d149_IpVersion='4' > CONFIG_cfg02d149_LinkQualityAlgorithm='etx_ff' > CONFIG_cfg02d149_LinkQualityFishEye='1' > CONFIG_cfg02d149_MainIp='10.63.2.33' > CONFIG_cfg02d149_MprCoverage='7' > CONFIG_cfg02d149_TYPE='olsrd' > CONFIG_cfg02d149_TcRedundancy='2' > CONFIG_cfg02d149_Willingness='7' > CONFIG_cfg02e48a_TYPE='system' > CONFIG_cfg02e48a_cronloglevel='9' > CONFIG_cfg02e48a_hostname='EG-labor-AP' > CONFIG_cfg02e48a_log_size='16' > CONFIG_cfg02e48a_timezone='CET-1CEST-2,M3.5.0/02:00:00,M10.5.0/03:00:00' > [...] > > is there a concept for it? > > also: what about calling 'network_flush_cache()' directly > before starting a service with 'service -S "$@"' in > /lib/functions/service.sh -> service_start() > > bye, bastian > _______________________________________________ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel