/etc/environment, if it exists, should be a list of NAME=VALUE pairs, not a shell script. See the pam_env manpage.