trynd / wren

Linux boot platform that provides a portable, multi-system, run-in-memory Linux environment.
GNU General Public License v3.0
0 stars 1 forks source link

Add conf file variable defaults to loadRunEnvConf() #13

Open codewithmichael opened 9 years ago

codewithmichael commented 9 years ago

Most scripts currently use the loadRunEnvConf() method (from platform-env) to load the environment variables from device.conf, boot.conf, and platform.conf. However, if any of the required variables aren't present, the system can fail to boot or fail to perform expected functionality.

It makes sense to provide defaults for all of these values inside the loadRunEnvConf() method in case a file or value can't be loaded (along with a warning message that the value wasn't found) so as to still allow some level of functionality in case a conf file is missing or in some way corrupted.

This would, for example, allow someone to boot their system after a distribution upgrade if they had forgotten to replace a necessary conf file.

codewithmichael commented 9 years ago

Pull request #14 begins to address the issue, but is not yet ready for integration. Additional analysis of the issue is required, particularly in the case where a conf file with errors is encountered.