From: Michael Tremer Date: Thu, 10 Mar 2011 16:00:42 +0000 (+0100) Subject: bash: Remove global startup files from this package. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=96efb1f9eb954262efa47cbf15ae8ba4d04eda5b;p=ipfire-3.x.git bash: Remove global startup files from this package. They are now in setup. --- diff --git a/pkgs/bash/bash.nm b/pkgs/bash/bash.nm index ee8ba6b1d..5a4fff237 100644 --- a/pkgs/bash/bash.nm +++ b/pkgs/bash/bash.nm @@ -26,7 +26,7 @@ include $(PKGROOT)/Include PKG_NAME = bash PKG_VER = 4.2 -PKG_REL = 1 +PKG_REL = 2 PKG_MAINTAINER = PKG_GROUP = System/Tools @@ -42,6 +42,7 @@ define PKG_DESCRIPTION endef PKG_BUILD_DEPS+= autoconf automake bison ncurses-devel readline-devel +PKG_DEPS += /etc/bashrc /etc/profile PKG_TARBALL = $(THISAPP).tar.gz @@ -71,7 +72,6 @@ define STAGE_INSTALL_CMDS -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 diff --git a/pkgs/bash/bashrc b/pkgs/bash/bashrc deleted file mode 100644 index 5afd45302..000000000 --- a/pkgs/bash/bashrc +++ /dev/null @@ -1,85 +0,0 @@ -# /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 diff --git a/pkgs/bash/profile b/pkgs/bash/profile deleted file mode 100644 index d3a2bbc20..000000000 --- a/pkgs/bash/profile +++ /dev/null @@ -1,68 +0,0 @@ -# /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 diff --git a/pkgs/bash/shells b/pkgs/bash/shells deleted file mode 100644 index 1805018a2..000000000 --- a/pkgs/bash/shells +++ /dev/null @@ -1,7 +0,0 @@ -# Begin /etc/shells - -/bin/sh -/bin/bash -/sbin/nologin - -# End /etc/shells