From a3984321dd00a7df7265aba1736d2d7c1e8dfe1f Mon Sep 17 00:00:00 2001 From: "ljf (zamentur)" Date: Wed, 7 Jul 2021 00:29:40 +0200 Subject: [PATCH] [fix] PATH with no sbin dir --- buster | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/buster b/buster index 8e7fa44..4c84441 100755 --- a/buster +++ b/buster @@ -228,9 +228,13 @@ function check_assertions() fi fi + # Assert we're root [[ "$(id -u)" == "0" ]] || die "This script must be run as root. On most setups, the command 'sudo -i' can be run first to become root." + # Assert we're root + [[ "$PATH" == *"/sbin"* ]] || die "Your environment PATH variable must contains /sbin directory." + # Assert systemd is installed command -v systemctl > /dev/null || die "YunoHost requires systemd to be installed."