Okay, yep, that wasn't it at all.
It simply parses /var/local/system/locale & /var/local/system/tzVar to add LANG, LC_ALL & KINDLE_TZ to the env.
Simple testcase with env & environ:
Code:
[root@kindle root]# env -i ./environ
LANG=en_US.utf8
LC_ALL=en_US.utf8
KINDLE_TZ=GMT+01:38
EDIT: I guess I could have gone with Python, too. meh.
environ.c
Code:
#include <unistd.h>
#include <stdio.h>
extern char **environ;
main()
{
int i = 0;
while(environ[i]) {
printf("%s\n", environ[i++]);
}
}
env.py
Code:
#!/usr/bin/env python2
import os
for key in os.environ.keys():
print "%s=%s" % (key,os.environ[key])