Check for sbin in $PATH

This commit is contained in:
Nyr 2020-05-19 17:03:03 +02:00
parent 55bdb64030
commit 8b0b1a086b

View File

@ -60,6 +60,13 @@ This version of CentOS is too old and unsupported"
exit
fi
# Detect environments where $PATH does not include the sbin directories
if ! grep -q sbin <<< $PATH; then
echo '$PATH does not include sbin
Try using "su -" instead of "su"'
exit
fi
systemd-detect-virt -cq
is_container="$?"