我可以安装驱动器和图像,但我不能卸载它们。我的弹壳级别太高了。我预计这种情况通常发生在脚本调用自己时。
有由umount运行的脚本吗?我搞不懂为什么会这样。
# alias umount
-bash: alias: umount: not found
# mount -o ro sda1.img /tmp/mm
# umount /tmp/mm
/bin/bash: warning: shell level (1000) too high, resetting to 1
/bin/bash: warning: shell level (1000) too high, resetting to 1
/bin/bash: warning: shell level (1000) too high, resetting to 1
/bin/bash: warning: shell level (1000) too high, resetting to 1
(repeat forever)编辑:修正了不正确的复制/粘贴。umount没有别名
结论:
我需要运行type umount,因为我不知道挂载正在运行包装脚本,而不是实际的可执行文件。
发布于 2021-07-31 12:51:29
我预计这种情况通常发生在脚本调用自己时。
是的,这就是发生的事。bash脚本不断地递归地调用自己(可能与其他程序一起使用,即它可以是一个循环,如脚本→其他程序1→其他程序2→脚本…)。。
umount程序本身不调用shell脚本。也许umount已经被一个错误的包装脚本取代了?检查
type umount
file /path/displayed/by/the/previous/command这种情况是发生在每种文件系统类型还是只发生在一种文件系统类型上?您要卸载的映像使用什么文件系统?如果它是一个熔断器文件系统,那么它上的所有操作,包括卸载,都涉及到用户的土地代码。该代码可以运行bash脚本,如果它愿意的话。也许这部分代码是错误的。
https://unix.stackexchange.com/questions/662746
复制相似问题