处理部分用户用 su 切换成 root 导致环境变量没 sbin 目录

This commit is contained in:
bin456789 2024-05-29 21:30:22 +08:00
parent bbb7d0b119
commit 15614ce829
No known key found for this signature in database
GPG Key ID: EE301B386DE6C11B

View File

@ -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