#!/bin/sh

case "$1" in
    configure|abort-deconfigure|abort-remove)
        # Check if existing profile is not already patched
        if ! grep -q "<bash>" /etc/profile; then
            echo '# <bash>

# Source all scripts in /etc/profile.d/
for i in /etc/profile.d/*.sh; do
    [ -r $i ] && source $i
done
unset i

# </bash>' >>/etc/profile
        fi
        ;;
    upgrade)
        ;;
esac

#DEBHELPER#
