20-root_bash_env 318 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#!/bin/sh

set -e

echo "Setting the root's bash environment"

# ... so we have the expected environment in the Root Terminal

echo '
for dir in /usr/local/sbin /usr/local/bin; do
    if ! echo "${PATH}" | grep -q --extended-regexp "(^|:)${dir}($|:)"; then
        PATH="${dir}:${PATH}"
    fi
done
' >> /root/.bashrc