/etc/zsh/zshrc: don't export $SHELL anymore
[grml-etc-core.git] / etc / zsh / zshenv
1 # Filename:      zshenv
2 # Purpose:       system-wide .zshenv file for zsh(1)
3 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
4 # Bug-Reports:   see http://grml.org/bugs/
5 # License:       This file is licensed under the GPL v2.
6 # Latest change: Don Okt 26 00:04:38 CEST 2006 [mika]
7 ################################################################################
8 # This file is sourced on all invocations of the shell.
9 # If the -f flag is present or if the NO_RCS option is
10 # set within this file, all other initialization files
11 # are skipped.
12 #
13 # This file should contain commands to set the command
14 # search path, plus other important environment variables.
15 # This file should not contain commands that produce
16 # output or assume the shell is attached to a tty.
17 #
18 # Global Order: zshenv, zprofile, zshrc, zlogin
19 ################################################################################
20
21 # language settings (read in /etc/environment before /etc/default/locale as
22 # the latter one is the default on Debian nowadays)
23   [ -r /etc/environment    ] && source /etc/environment
24   [ -r /etc/default/locale ] && source /etc/default/locale
25   [ -n "$LANG" ]          && export LANG        || export LANG="en_US.iso885915"
26   [ -n "$LC_ALL" ]        && export LC_ALL
27   [ -n "$LC_MESSAGES" ]   && export LC_MESSAGES
28
29   [ -r /etc/sysconfig/keyboard ] && source /etc/sysconfig/keyboard
30
31 # set environment variables (important for autologin on tty)
32   [ -z "$HOSTNAME" ]      && export HOSTNAME=`hostname`
33   [ -z "$USER" ]          && export USER=`id -un`
34   [[ $LOGNAME == LOGIN ]] && LOGNAME=$(id -un)
35
36 # workaround for live-cd mode as $HOME is not set via rungetty
37   if [ -f /etc/grml_cd ] ; then
38     if (( EUID == 0 )); then
39        export HOME=/root
40     else
41        export HOME=/home/$USER
42     fi
43   fi
44
45 # set $PATH
46 # gentoo users have to source /etc/profile.env
47   if [ -r /etc/gentoo-release ] ; then
48      [ -r /etc/profile.env ] && source /etc/profile.env
49        if (( EUID != 0 )); then
50           PATH="$HOME/bin:/bin:/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/games:/usr/NX/bin:$PATH"
51        else
52           PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/local/bin:/usr/NX/bin:$PATH"
53        fi
54   else
55     # support extra software in special directory outside of squashfs environment in live-cd mode
56     if [ -f /etc/grml_cd ] ; then
57        [ -d /cdrom/addons/ ] && ADDONS=':/cdrom/addons/'
58     fi
59     if (( EUID != 0 )); then
60       PATH="$HOME/bin:/bin:/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/games:/usr/NX/bin$ADDONS"
61     else
62       PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/local/bin:/usr/NX/bin$ADDONS"
63     fi
64 #  fi
65   fi
66
67 # less (:=pager) options:
68 #  export LESS=C
69   export LESSOPEN="|lesspipe.sh %s"
70   export READNULLCMD=${PAGER:-/usr/bin/pager}
71   export DISTCC_HOSTS="+zeroconf"
72 # MAKEDEV should be usable on udev as well by default:
73   export WRITE_ON_UDEV=yes
74
75 ## END OF FILE #################################################################