Bug#1834: [email@example.com.Uni-Mainz.de: /etc/profile on Debian Linux]
A little complicated, perhaps, but he does have good suggestions.
------- Start of forwarded message -------
Date: Fri, 3 Nov 1995 16:42:03 +0100
From: Dominik Kubla <firstname.lastname@example.org.Uni-Mainz.de>
Subject: /etc/profile on Debian Linux
I just started to recompile the bash package for my all ELF system.
That was when i discovered that the /etc/profile provided by Debian
is somewhat inappropriate: Novice users wil have no idea how to write
a proper profile for their system.
This never occured to me since our Debian systems at the Computing
Center share a common profile with our other Unix systems.
So i thought it to be a good idea to donate the /etc/profile from
my home system to the Debian project. I added some Debian specific
PATH options, that is all i needed to change.
As you can see from the copyright, this profile has been used quite
I hope you find it useful and incorporate it into the bash-package ...
PS. It seems that the effort of porting Debian to m68k-linux has stalled:
I haven't heard anything of the people interested in the port for a
while. And since our TT has broken down, i am left without a possibility
to do it on my own. As for the alpha-linux port: The AlphaPC's are
starting to arrive one-by-one. As soon as i can grab one, i will start
to work on this port. But for now i am to busy with my courses at
# /etc/profile - sh(1) initialization file for Linux-based systems.
# Copyright (C) 1993-1995 by Dominik Kubla, <Dominik Kubla@Uni-Mainz.DE>
# $Id: profile,v 1.3 1995/11/03 15:18:28 kubla Exp $
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
# Set the umask:
# umask 000 # -rwxrwxrwx Insane - "Calm down, the doctor's here."
# umask 002 # -rwxrwxr-x Innocent - "Gee, i hear Santa coming!"
umask 022 # -rwxr-xr-x Standard - "Just plain old number 22."
# umask 027 # -rwxr-x--- Cautious - "Who are you and can you prove it?"
# umask 077 # -rwx------ Paranoid - "The martians are after me ..."
# Set core file size to 0, if a user wants cores, he will have to enable them.
ulimit -c 0
# Some login programs export LOGNAME, some USER. Make that consistent.
if [ -z "$USER" ]; then
elif [ -z "$LOGNAME" ]; then
# Don't force root through the system profile, especially not in an NFS setup!
if [ "$USER" = "root" -o "$USER" = "toor" ] ; then
echo "User is root - no profile" # Using exit is a bad idea ...
ARCH=`/bin/arch` # /bin/arch is specified by the FSSTND.
if [ -f /etc/timezone ]; then
# Hostname and domain
if [ -z "$HOSTNAME" ]; then
if [ -z "$DOMAIN" ]; then
export HOSTNAME DOMAIN
if [ -f $HOME/$ARCH-linux ]; then
mkdir $HOME/bin 2>/dev/null
mkdir $HOME/scripts 2>/dev/null
if [ -d /usr/X11R6/bin ]; then
if [ -d /usr/local/X11R6/bin ]; then
if [ -d /usr/bin/mh ]; then
if [ -d /usr/bin/pbmplus ]; then
# Interactive session ?
if [ -z "`/usr/bin/tty 2>&1 | grep 'not '`" ]; then
# Shell prompt
PS1="\w \\$ "
# Standard editor
EDITOR=ex ; export EDITOR
VISUAL=vi ; export VISUAL
# NNTP server
if [ -f /etc/nntpserver ]; then
NNTPSERVER=`cat /etc/nntpserver`; export NNTPSERVER
WWW_HOME=http://www.uni-mainz.de/~$USER; export WWW_HOME
# NLS support
LANG=de ; export LANG
NLSPATH=/usr/lib/locale ; export NLSPATH
# Enable charset mapping if this is a vt.
#if [ ! `tty | grep not` ]; then
# setleds +num -caps
# setmetamode meta 2>&1 >/dev/null
# /bin/echo -n -e "\\033(K"
# Any news for our users ?
if [ -d /var/sysnews -a -x /usr/bin/news ] ; then
# Reminder service
if [ -f $HOME/calendar -a -x /usr/bin/calendar ]; then
# Gimme a cookie ...
if [ -x /usr/games/fortune ] ; then
------- End of forwarded message -------