Commit ce2a2220 authored by anonym's avatar anonym

Ensure that root's bash has an appropriate PATH.

We want at least the Root Terminal to have our /usr/local/{bin,sbin}
scripts *and* overrides in its PATH. Before #12738, when the Root
Terminal was started with gksu instead of pkexec, it inherited
amnesia's PATH, but that is not the case any more.

In particular, now our /usr/local/sbin/nautilus override will be
active in the Root Terminal, which was the point of that override.

Refs: #12034, #12738
parent 165c3ac1
#!/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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment