The file /etc/environment is more of a configuration file than a script. Just tell it the variables you want to be set without the export keyword:
I recently had an issue with this. I was unable to get user authentication to work while the DIGEST-MD5 and CRAM-MD5 mechanisms were being presented as options from the server. I wanted to make the change on the LDAP server rather than modify each client with plist settings.
The following two methods worked to fix user authentication by blocking the server ...