guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Ludovic Courtès
Subject: 01/01: system: Source /etc/environment before $HOME/.guix-profile/etc/profile.
Date: Wed, 27 Jul 2016 21:08:45 +0000 (UTC)

civodul pushed a commit to branch master
in repository guix.

commit cad7e6abafc14de220265e09a0fc4bbd96664599
Author: Carlos Sánchez de La Lama <address@hidden>
Date:   Wed Jul 27 14:27:00 2016 +0200

    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 <address@hidden>
---
 gnu/system.scm |   21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/gnu/system.scm b/gnu/system.scm
index 476720b..04dd7a8 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -408,6 +408,17 @@ GUIX_PROFILE=/run/current-system/profile \\
 # Prepend setuid programs.
 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\" ]
 then
   # Load the user profile's settings.
@@ -419,16 +430,6 @@ else
   export PATH=\"$HOME/.guix-profile/bin:$PATH\"
 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'.
 # See <http://bugs.gnu.org/22650>.
 umask 022



reply via email to

[Prev in Thread] Current Thread [Next in Thread]