system: Source /etc/environment before $HOME/.guix-profile/etc/profile.

* gnu/system.scm (operating-system-etc-service) <profile>: Move sourcing
of /etc/environment before that of $HOME/.guix-profile/etc/profile.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Carlos Sánchez de La Lama 2016-07-27 14:27:00 +02:00 committed by Ludovic Courtès
parent 9712ef8d42
commit cad7e6abaf
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -408,6 +408,17 @@ (define* (operating-system-etc-service os)
# Prepend setuid programs. # Prepend setuid programs.
export PATH=/run/setuid-programs:$PATH export PATH=/run/setuid-programs:$PATH
# Since 'lshd' does not use pam_env, /etc/environment must be explicitly
# loaded when someone logs in via SSH. See <http://bugs.gnu.org/22175>.
# We need 'PATH' to be defined here, for 'cat' and 'cut'. Do this before
# reading the user's 'etc/profile' to allow variables to be overridden.
if [ -f /etc/environment -a -n \"$SSH_CLIENT\" \\
-a -z \"$LINUX_MODULE_DIRECTORY\" ]
then
. /etc/environment
export `cat /etc/environment | cut -d= -f1`
fi
if [ -f \"$HOME/.guix-profile/etc/profile\" ] if [ -f \"$HOME/.guix-profile/etc/profile\" ]
then then
# Load the user profile's settings. # Load the user profile's settings.
@ -419,16 +430,6 @@ (define* (operating-system-etc-service os)
export PATH=\"$HOME/.guix-profile/bin:$PATH\" export PATH=\"$HOME/.guix-profile/bin:$PATH\"
fi fi
# Since 'lshd' does not use pam_env, /etc/environment must be explicitly
# loaded when someone logs in via SSH. See <http://bugs.gnu.org/22175>.
# We need 'PATH' to be defined here, for 'cat' and 'cut'.
if [ -f /etc/environment -a -n \"$SSH_CLIENT\" \\
-a -z \"$LINUX_MODULE_DIRECTORY\" ]
then
. /etc/environment
export `cat /etc/environment | cut -d= -f1`
fi
# Set the umask, notably for users logging in via 'lsh'. # Set the umask, notably for users logging in via 'lsh'.
# See <http://bugs.gnu.org/22650>. # See <http://bugs.gnu.org/22650>.
umask 022 umask 022