]> git.pld-linux.org Git - projects/setup.git/commitdiff
- fix setting up sane defaults for rootshell/bash/ksh
authorJan Rękorajski <baggins@pld-linux.org>
Mon, 29 May 2000 19:25:57 +0000 (19:25 +0000)
committerJan Rękorajski <baggins@pld-linux.org>
Mon, 29 May 2000 19:25:57 +0000 (19:25 +0000)
Changed files:
    etc/profile -> 1.7

etc/profile

index 64f5c20e0d79cdc224305d69ad84e8a3b5827332..bf8faceb8141dd204b3df448dd5b0e2a0927695d 100644 (file)
@@ -16,6 +16,7 @@ LOGNAME=$USER
 MAIL="/var/mail/$USER"
 
 HOSTNAME=`/bin/hostname`
+HISTFILE="$HOME/.history"
 HISTSIZE=1000
 HISTFILESIZE=1000
 
@@ -27,7 +28,16 @@ if [ "$TERM" = "" -o "$TERM" = "unknown" ]; then
  TERM=linux
 fi
 
-case "${0#\-}" in
+SH="${0#\-}"
+if [ "`id -ur" = "0" ]; then
+       if [ ! -n KSH_VERSION ]; then
+               SH=ksh
+       elif [ ! -n BASH_VERSION ]; then
+               SH=bash
+       fi
+fi
+
+case "$SH" in
   ash)
        PS1="${HOSTNAME}\$ "
        ;;
@@ -64,7 +74,8 @@ case "${0#\-}" in
        ;;
 esac
 
-export PATH PS1 PS2 HOSTNAME HISTSIZE HISTFILESIZE USER LOGNAME MAIL
+unset SH
+export PATH PS1 PS2 HOSTNAME HISTFILE HISTSIZE HISTFILESIZE USER LOGNAME MAIL
 
 for i in /etc/profile.d/*.sh ; do
        if [ -x $i ]; then
This page took 0.039242 seconds and 4 git commands to generate.