[OpenWrt-Devel] polluted env-space after running OpenWrt-helper scripts

Bastian Bittorf bittorf at bluebottle.com
Tue Nov 3 07:23:14 EST 2015


* Jo-Philipp Wich <jow at openwrt.org> [03.11.2015 12:44]:
> > but i'am unsure how to unset all these vars:
> 
> Whenever a script calls uci_load(), the previous state vars are
> discarded, see the declaration of uci_load in /lib/config/uci.sh
> 
> You can force an unconditional unload with calling uci_load() on an
> invalid package name, e.g. "uci_load %" .

thanks for the hint.
i understand, but it does not solve the problem here.

i tuned the service_start() from
/lib/functions/service.sh like this:

service_start() {
        {
        echo
        echo "service_start: $@"
        echo "envsize: $( set | wc -c )"
        network_flush_cache
        echo "envsize_cleaned1: $( set | wc -c )"
        uci_load %
        echo "envsize_cleaned2: $( set | wc -c )"
        set
        } >>/tmp/FOO

        service -S "$@"
}

and still have ~8k vars after 'envsize_cleaned2:'
when starting up /etc/init.d/olsrd (there is no 
change after running 'uci_load %'.

bye, bastian
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list