mirror of
https://gitee.com/gfdgd-xi/deep-wine-runner
synced 2025-01-12 17:48:27 +08:00
更新Mount
This commit is contained in:
parent
74c94cc58f
commit
fb5dae05f8
7
Mount.sh
7
Mount.sh
@ -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}
|
||||
|
@ -27,10 +27,11 @@ fi
|
||||
#cat /etc/resolv.conf > $DESTDIR/etc/resolv.conf
|
||||
SHELL=/bin/bash unshare --fork --pid chroot "$DESTDIR" "$@"
|
||||
exit
|
||||
if [[ -d /sys/firmware/efi/ ]] ; then
|
||||
while umount "$DESTDIR/sys/firmware/efi/efivars" 2>/dev/null ; do : ;done
|
||||
fi
|
||||
for dir in dev/pts dev/shm dev sys proc run media ; do
|
||||
while umount "$DESTDIR/$dir" 2>/dev/null; do : ;done
|
||||
done
|
||||
# 下面的因为有问题,不使用
|
||||
#if [[ -d /sys/firmware/efi/ ]] ; then
|
||||
# while umount "$DESTDIR/sys/firmware/efi/efivars" 2>/dev/null ; do : ;done
|
||||
#fi
|
||||
#for dir in dev/pts dev/shm dev sys proc run media ; do
|
||||
# while umount "$DESTDIR/$dir" 2>/dev/null; do : ;done
|
||||
#done
|
||||
#umount -lf "$DESTDIR" 2>/dev/null
|
||||
|
Loading…
Reference in New Issue
Block a user