PKG_NAME = bash
PKG_VER = 4.2
-PKG_REL = 1
+PKG_REL = 2
PKG_MAINTAINER =
PKG_GROUP = System/Tools
endef
PKG_BUILD_DEPS+= autoconf automake bison ncurses-devel readline-devel
+PKG_DEPS += /etc/bashrc /etc/profile
PKG_TARBALL = $(THISAPP).tar.gz
-mkdir -pv $(BUILDROOT)/{bin,etc/profile.d,root}
# Bash startup files
- cp -avf $(DIR_SOURCE)/{bashrc,profile,shells} $(BUILDROOT)/etc
cp -vf $(DIR_SOURCE)/dot_bash_logout $(BUILDROOT)/root/.bash_logout
cp -vf $(DIR_SOURCE)/dot_bash_profile $(BUILDROOT)/root/.bash_profile
cp -vf $(DIR_SOURCE)/dot_bashrc $(BUILDROOT)/root/.bashrc
+++ /dev/null
-# /etc/bashrc
-
-# System wide functions and aliases
-# Environment stuff goes in /etc/profile
-
-# It's NOT good idea to change this file unless you know what you
-# are doing. Much better way is to create custom.sh shell script in
-# /etc/profile.d/ to make custom changes to environment. This will
-# prevent need for merging in future updates.
-
-# By default, we want this to get set.
-# Even for non-interactive, non-login shells.
-# Current threshold for system reserved uid/gids is 200
-# You could check uidgid reservation validity in
-# /usr/share/doc/setup-*/uidgid file
-if [ $UID -gt 199 ] && [ "`id -gn`" = "`id -un`" ]; then
- umask 002
-else
- umask 022
-fi
-
-# are we an interactive shell?
-if [ "$PS1" ]; then
- case $TERM in
- xterm*)
- if [ -e /etc/sysconfig/bash-prompt-xterm ]; then
- PROMPT_COMMAND=/etc/sysconfig/bash-prompt-xterm
- else
- PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}"; echo -ne "\007"'
- fi
- ;;
- screen)
- if [ -e /etc/sysconfig/bash-prompt-screen ]; then
- PROMPT_COMMAND=/etc/sysconfig/bash-prompt-screen
- else
- PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}"; echo -ne "\033\\"'
- fi
- ;;
- *)
- [ -e /etc/sysconfig/bash-prompt-default ] && PROMPT_COMMAND=/etc/sysconfig/bash-prompt-default
- ;;
- esac
- # Turn on checkwinsize
- shopt -s checkwinsize
- [ "$PS1" = "\\s-\\v\\\$ " ] && PS1="[\u@\h \W]\\$ "
- # You might want to have e.g. tty in prompt (e.g. more virtual machines)
- # and console windows
- # If you want to do so, just add e.g.
- # if [ "$PS1" ]; then
- # PS1="[\u@\h:\l \W]\\$ "
- # fi
- # to your custom modification shell script in /etc/profile.d/ directory
-fi
-
-if ! shopt -q login_shell ; then # We're not a login shell
- # Need to redefine pathmunge, it get's undefined at the end of /etc/profile
- pathmunge () {
- case ":${PATH}:" in
- *:"$1":*)
- ;;
- *)
- if [ "$2" = "after" ] ; then
- PATH=$PATH:$1
- else
- PATH=$1:$PATH
- fi
- esac
- }
-
- # Only display echos from profile.d scripts if we are no login shell
- # and interactive - otherwise just process them to set envvars
- for i in /etc/profile.d/*.sh; do
- if [ -r "$i" ]; then
- if [ "$PS1" ]; then
- . $i
- else
- . $i >/dev/null 2>&1
- fi
- fi
- done
-
- unset i
- unset pathmunge
-fi
-# vim:ts=4:sw=4
+++ /dev/null
-# /etc/profile
-
-# System wide environment and startup programs, for login setup
-# Functions and aliases go in /etc/bashrc
-
-# It's NOT good idea to change this file unless you know what you
-# are doing. Much better way is to create custom.sh shell script in
-# /etc/profile.d/ to make custom changes to environment. This will
-# prevent need for merging in future updates.
-
-pathmunge () {
- case ":${PATH}:" in
- *:"$1":*)
- ;;
- *)
- if [ "$2" = "after" ] ; then
- PATH=$PATH:$1
- else
- PATH=$1:$PATH
- fi
- esac
-}
-
-
-if [ -x /usr/bin/id ]; then
- if [ -z "$EUID" ]; then
- # ksh workaround
- EUID=`id -u`
- UID=`id -ru`
- fi
- USER="`id -un`"
- LOGNAME=$USER
- MAIL="/var/spool/mail/$USER"
-fi
-
-# Path manipulation
-if [ "$EUID" = "0" ]; then
- pathmunge /sbin
- pathmunge /usr/sbin
- pathmunge /usr/local/sbin
-else
- pathmunge /usr/local/sbin after
- pathmunge /usr/sbin after
- pathmunge /sbin after
-fi
-
-HOSTNAME=`/bin/hostname 2>/dev/null`
-HISTSIZE=1000
-if [ "$HISTCONTROL" = "ignorespace" ] ; then
- export HISTCONTROL=ignoreboth
-else
- export HISTCONTROL=ignoredups
-fi
-
-export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROL
-
-for i in /etc/profile.d/*.sh ; do
- if [ -r "$i" ]; then
- if [ "$PS1" ]; then
- . $i
- else
- . $i >/dev/null 2>&1
- fi
- fi
-done
-
-unset i
-unset pathmunge