瀏覽代碼

mklive: check if pseudofs exists before umounting it

classabbyamp 1 年之前
父節點
當前提交
9708d22136
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      mklive.sh

+ 1 - 1
mklive.sh

@@ -52,7 +52,7 @@ mount_pseudofs() {
 }
 umount_pseudofs() {
 	for f in sys dev proc; do
-		if ! umount -R -f "$ROOTFS/$f"; then
+		if [ -d "$ROOTFS/$f" ] && ! umount -R -f "$ROOTFS/$f"; then
 			info_msg "ERROR: failed to unmount $ROOTFS/$f/"
 			return 1
 		fi