]> git.ipfire.org Git - ipfire-3.x.git/commitdiff
Updated bash login stuff.
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 2 Feb 2009 16:40:05 +0000 (17:40 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 2 Feb 2009 16:40:05 +0000 (17:40 +0100)
Added system-release file.

config/etc/bashrc
config/etc/profile
config/profile.d/i18n.sh
config/root/.bash_logout [new file with mode: 0644]
config/root/.bash_profile [new file with mode: 0644]
config/root/.bashrc [new file with mode: 0644]
lfs/stage2

index e35209f335ff37d689d61bd4156548a1183650bc..dce7184d927cb4d2c42a09bbb2b4bef28fcf8b5b 100644 (file)
@@ -1,13 +1,4 @@
 # Begin /etc/bashrc
-# Written for Beyond Linux From Scratch
-# by James Robertson <jameswrobertson@earthlink.net>
-# updated by Bruce Dubbs <bdubbs@linuxfromscratch.org>
-
-# Make sure that the terminal is set up properly for each shell
-
-if [ -f /etc/profile.d/tinker-term.sh ]; then
-  source /etc/profile.d/tinker-term.sh
-fi
 
 # System wide aliases and functions.
 
@@ -20,19 +11,6 @@ fi
 # /etc/profile.
 
 alias ls='ls --color=auto'
-alias ll='ls -la'
-alias which='alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde'
-
-# Make the shell a little bit more interactive 
-# to prevent the deletion of some files
-alias mv='mv -i'
-alias rm='rm -i'
-alias cp='cp -i'
-
-# Midnight Commander isn't compatible to UTF8.
-# So we use it in ACSII-Mode.
-
-alias mc='mc -a'
 
 # Provides prompt for non-login shells, specifically shells started
 # in the X environment. [Review the LFS archive thread titled
index 3c2921908ac65b4d25f326a4c23873513a639f43..70ff901bbce7ffc1ec38213a8baaf198fac06d45 100644 (file)
@@ -1,7 +1,4 @@
 # Begin /etc/profile
-# Written for Beyond Linux From Scratch
-# by James Robertson <jameswrobertson@earthlink.net>
-# modifications by Dagmar d'Surreal <rivyqntzne@pbzpnfg.arg>
 
 # System wide environment variables and startup programs.
 
@@ -49,6 +46,7 @@ fi
 # Setup some environment variables.
 export HISTSIZE=1000
 export HISTIGNORE="&:[bf]g:exit"
+
 export PS1="[\u@\h \w]\\$ "
 #export PS1='\u@\h:\w\$ '
 
index ac68d67820231e17ec94006fcb773a3375f237da..2f66e89c3b673a5fb7c1095caf4a7407e77ce9ca 100644 (file)
@@ -1,2 +1,10 @@
 # Set up i18n variables
-export LANG=en_US.utf8
+
+if [ -f "/etc/sysconfig/console" ]; then
+       . /etc/sysconfig/console
+else
+       LANG=en_US.UTF-8
+fi
+
+unset KEYMAP FONT UNICODE KEYMAP_CORRECTIONS LEGACY_CHARSET
+export LANG
diff --git a/config/root/.bash_logout b/config/root/.bash_logout
new file mode 100644 (file)
index 0000000..3762d94
--- /dev/null
@@ -0,0 +1,7 @@
+# Begin ~/.bash_logout
+
+# Personal items to perform on logout.
+
+echo "Bye bye."
+
+# End ~/.bash_logout
diff --git a/config/root/.bash_profile b/config/root/.bash_profile
new file mode 100644 (file)
index 0000000..8201233
--- /dev/null
@@ -0,0 +1,33 @@
+# Begin ~/.bash_profile
+
+# Personal environment variables and startup programs.
+
+# Personal aliases and functions should go in ~/.bashrc.  System wide
+# environment variables and startup programs are in /etc/profile.
+# System wide aliases and functions are in /etc/bashrc.
+
+append () {
+  # First remove the directory
+  local IFS=':'
+  local NEWPATH
+  for DIR in $PATH; do
+     if [ "$DIR" != "$1" ]; then
+       NEWPATH=${NEWPATH:+$NEWPATH:}$DIR
+     fi
+  done
+
+  # Then append the directory
+  export PATH=$NEWPATH:$1
+}
+
+if [ -f "$HOME/.bashrc" ] ; then
+  source $HOME/.bashrc
+fi
+
+if [ -d "$HOME/bin" ] ; then
+  append $HOME/bin
+fi
+
+unset append
+
+# End ~/.bash_profile
diff --git a/config/root/.bashrc b/config/root/.bashrc
new file mode 100644 (file)
index 0000000..d89eefd
--- /dev/null
@@ -0,0 +1,14 @@
+# Begin ~/.bashrc
+
+# Personal aliases and functions.
+
+# Personal environment variables and startup programs should go in
+# ~/.bash_profile.  System wide environment variables and startup
+# programs are in /etc/profile.  System wide aliases and functions are
+# in /etc/bashrc.
+
+if [ -f "/etc/bashrc" ] ; then
+  source /etc/bashrc
+fi
+
+# End ~/.bashrc
index 7a66e220e67af75c926e56ac40906b5a1b8fe432..3ae693b564add7110c15334879e5927f6fb53602 100644 (file)
@@ -80,7 +80,10 @@ $(OBJECT) :
 
        # Config files
        for i in $(DIR_SRC)/config/etc/*; do \
-               [ -f $$i ] && cp $$i /etc; \
+               cp -vf $$i /etc; \
+       done
+       for i in $(DIR_CONFIG)/root/*; do \
+               cp -vf $$i /root; \
        done
        -mkdir -pv /etc/modprobe.d
        cp -av $(DIR_CONF)/modprobe.d/* /etc/modprobe.d/
@@ -95,6 +98,7 @@ endif
        echo "\n running on \s \r \m"          >> /etc/issue
 
        echo "$(NAME) Release $(VERSION) ($(SLOGAN))" > /etc/$(SNAME)-release
+       ln -svf $(SNAME)-release /etc/system-release
 
        touch /var/run/utmp /var/log/{btmp,lastlog,wtmp}
        #chgrp -v utmp /var/run/utmp /var/log/lastlog