소스 검색

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