eprefix-activate: chech if user is on a prefix profile

This commit is contained in:
XGQT 2020-03-08 13:31:02 +01:00
parent 1b045cd46f
commit 988186b19d
No known key found for this signature in database
GPG Key ID: 2089DEC77862433A
1 changed files with 17 additions and 0 deletions

View File

@ -142,6 +142,23 @@ export PAGER
FEATURES="${FEATURES} -usersandbox -sandbox"
export FEATURES
# Check if we are on a prefix profile
if command_exists eselect
then
eprofile="$(eselect profile show)"
if [[ "${eprofile}" == *prefix* ]]
then
echo "${eprefix_good} ${eprofile}"
else
echo "${eprefix_bad} You are not on a prefix profile"
fi
unset eprofile
else
echo "${eprefix_bad} Could not determine running profile"
fi
# >>> Finish