更新Mount

This commit is contained in:
2023-02-26 21:43:41 +08:00
parent 74c94cc58f
commit fb5dae05f8
2 changed files with 14 additions and 6 deletions

View File

@@ -43,5 +43,12 @@ else
fi
# 挂载此内容以可以跨架构运行程序
mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc
# 判断是否有 Root 权限
cat etc/sudoers | grep "$2"
if [[ $? != 0 ]]; then
echo "$2 ALL=(ALL:ALL) ALL" >> etc/sudoers
fi
# 写入 DNS
cat /etc/resolv.conf > etc/resolv.conf
# 如果参数 3 存在
"$programPath/pardus-chroot" "--userspec=$2:$2" . env "HOME=/home/$2" ${@:3}