aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author宋文武 <iyzsong@gmail.com>2014-12-05 20:01:07 +0800
committer宋文武 <iyzsong@gmail.com>2014-12-09 18:51:01 +0800
commit4e2a21d3d2d72146059ad58b4832317990d37b24 (patch)
tree9c3066416260a72e6cca2dfb30fc4605c89c56d2
parentfecbf86eaad42b5856438e5c02d58fcf57582286 (diff)
downloadguix-4e2a21d3d2d72146059ad58b4832317990d37b24.tar
guix-4e2a21d3d2d72146059ad58b4832317990d37b24.tar.gz
system: Cleanup bash startup files.
* gnu/system.scm (etc-directory) (bashrc): Rename to 'profile'. * gnu/system/shadow.scm (default-skeletons): Rename '.bashrc' to '.bash_profile'. Don't source /etc/profile.
-rw-r--r--gnu/system.scm15
-rw-r--r--gnu/system/shadow.scm13
2 files changed, 14 insertions, 14 deletions
diff --git a/gnu/system.scm b/gnu/system.scm
index 899a16d6ee..5cb6c9e947 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -386,11 +386,10 @@ This is the GNU system. Welcome.\n")
(nsswitch (text-file "nsswitch.conf"
"hosts: files dns\n"))
- ;; TODO: Generate bashrc from packages' search-paths.
- (bashrc (text-file* "bashrc" "
-export PS1='\\u@\\h \\w\\$ '
-
-export LC_ALL=\"" locale "\"
+ ;; Startup file for POSIX-compliant login shells, which set system-wide
+ ;; environment variables.
+ (profile (text-file* "profile" "\
+export LANG=\"" locale "\"
export TZ=\"" timezone "\"
export TZDIR=\"" tzdata "/share/zoneinfo\"
@@ -399,11 +398,7 @@ export LINUX_MODULE_DIRECTORY=/run/booted-system/kernel/lib/modules
export PATH=$HOME/.guix-profile/bin:/run/current-system/profile/bin
export PATH=/run/setuid-programs:/run/current-system/profile/sbin:$PATH
-export CPATH=$HOME/.guix-profile/include:" profile "/include
-export LIBRARY_PATH=$HOME/.guix-profile/lib:" profile "/lib
export INFOPATH=$HOME/.guix-profile/share/info:/run/current-system/profile/share/info
-alias ls='ls -p --color'
-alias ll='ls -l'
"))
(skel (skeleton-directory skeletons)))
(file-union "etc"
@@ -416,7 +411,7 @@ alias ll='ls -l'
("nsswitch.conf" ,#~#$nsswitch)
("skel" ,#~#$skel)
("shells" ,#~#$shells)
- ("profile" ,#~#$bashrc)
+ ("profile" ,#~#$profile)
("hosts" ,#~#$hosts-file)
("localtime" ,#~(string-append #$tzdata "/share/zoneinfo/"
#$timezone))
diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm
index 6970021e1f..4a2322bf69 100644
--- a/gnu/system/shadow.scm
+++ b/gnu/system/shadow.scm
@@ -115,9 +115,13 @@
(copy-file (car (find-files #$guile-wm "wm-init-sample.scm"))
#$output)))
- (mlet %store-monad ((bashrc (text-file "bashrc" "\
-# Allow non-login shells such as an xterm to get things right.
-test -f /etc/profile && source /etc/profile\n"))
+ (mlet %store-monad ((profile (text-file "bash_profile" "\
+# Honor per-interactive-shell startup file
+if [ -f ~/.bashrc ]; then . ~/.bashrc; fi\n"))
+ (bashrc (text-file "bashrc" "\
+PS1='\\u@\\h \\w\\$ '
+alias ls='ls -p --color'
+alias ll='ls -l'\n"))
(guile-wm (gexp->derivation "guile-wm" copy-guile-wm
#:modules
'((guix build utils))))
@@ -127,7 +131,8 @@ XTerm*metaSendsEscape: true\n"))
(gdbinit (text-file "gdbinit" "\
# Tell GDB where to look for separate debugging files.
set debug-file-directory ~/.guix-profile/lib/debug\n")))
- (return `((".bashrc" ,bashrc)
+ (return `((".bash_profile" ,profile)
+ (".bashrc" ,bashrc)
(".Xdefaults" ,xdefaults)
(".guile-wm" ,guile-wm)
(".gdbinit" ,gdbinit)))))