From 15614ce829cd65b50e7988a7e5c564b9a0d6db33 Mon Sep 17 00:00:00 2001 From: bin456789 Date: Wed, 29 May 2024 21:30:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E9=83=A8=E5=88=86=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E7=94=A8=20su=20=E5=88=87=E6=8D=A2=E6=88=90=20root=20?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E7=8E=AF=E5=A2=83=E5=8F=98=E9=87=8F=E6=B2=A1?= =?UTF-8?q?=20sbin=20=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- reinstall.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/reinstall.sh b/reinstall.sh index 7f6801a..543c694 100644 --- a/reinstall.sh +++ b/reinstall.sh @@ -8,6 +8,9 @@ github_proxy=https://mirror.ghproxy.com/https://raw.githubusercontent.com # https://www.gnu.org/software/gettext/manual/html_node/The-LANGUAGE-variable.html export LC_ALL=C +# 处理部分用户用 su 切换成 root 导致环境变量没 sbin 目录 +export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$PATH + this_script=$(realpath "$0") trap 'trap_err $LINENO $?' ERR