[fix] PATH with no sbin dir

This commit is contained in:
ljf (zamentur) 2021-07-07 00:29:40 +02:00 committed by GitHub
parent 691e7e54ca
commit cc152b0c95
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -228,9 +228,13 @@ function check_assertions()
fi fi
fi fi
# Assert we're root # Assert we're root
[[ "$(id -u)" == "0" ]] || die "This script must be run as root. On most setups, typing 'sudo -i' can be used to become root." [[ "$(id -u)" == "0" ]] || die "This script must be run as root. On most setups, typing 'sudo -i' can be used to become root."
# Assert we're root
[[ "$PATH" == *"/sbin"* ]] || die "Your environment PATH variable must contains /sbin directory."
# Assert systemd is installed # Assert systemd is installed
command -v systemctl > /dev/null || die "YunoHost requires systemd to be installed." command -v systemctl > /dev/null || die "YunoHost requires systemd to be installed."