View Single Post
Posts: 268 | Thanked: 1,053 times | Joined on May 2010 @ The Netherlands
#187
There's a special build of busybox-power 1.19.3power3 up at our garage page. It installs /etc/environment and parses it prior to applet launch. This file contains simple key-value entries to set environment variables.

Environment variables are only loaded if they're not already set; user/system set variables take precedence over the configuration file (launching "foo" with "TMPDIR=/bar foo" makes TMPDIR not get loaded from the configuration file).

Lastly, /bin/busybox is setuid again in this build, which made eglibc drop e.g. TMPDIR in the first place .

Please test this build and report back any issues you encounter. The build can be found here: https://garage.maemo.org/frs/shownot...elease_id=4754. The parser will be included in busybox-power 1.19.3power4 if no bugs are found.

I've attached the created patch to this post. The introduced load_env_vars() function is based on the already existing parse_config_file() function, so I'm not expecting too much issues. However, as always, feedback is highly appreciated.
 

The Following 2 Users Say Thank You to iDont For This Useful Post: