]> git.ipfire.org Git - ipfire-3.x.git/commitdiff
bash: Remove global startup files from this package.
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 10 Mar 2011 16:00:42 +0000 (17:00 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 10 Mar 2011 16:00:42 +0000 (17:00 +0100)
They are now in setup.

pkgs/bash/bash.nm
pkgs/bash/bashrc [deleted file]
pkgs/bash/profile [deleted file]
pkgs/bash/shells [deleted file]

index ee8ba6b1ddaae9603619e5d4cd3c271ef14fe88d..5a4fff237fe653d480470d61f3a79781193f2443 100644 (file)
@@ -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 (file)
index 5afd453..0000000
+++ /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 (file)
index d3a2bbc..0000000
+++ /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 (file)
index 1805018..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-# Begin /etc/shells
-
-/bin/sh
-/bin/bash
-/sbin/nologin
-
-# End /etc/shells