mirror of
				https://github.com/vdsm/virtual-dsm.git
				synced 2025-11-04 08:54:51 +08:00 
			
		
		
		
	feat: Print filesystem on error (#635)
This commit is contained in:
		
							parent
							
								
									a84878abfc
								
							
						
					
					
						commit
						a70338ec3c
					
				@ -151,14 +151,14 @@ fi
 | 
				
			|||||||
if [ -f "$RDC" ]; then
 | 
					if [ -f "$RDC" ]; then
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  { xz -dc <"$RDC" >"$TMP/rd" 2>/dev/null; rc=$?; } || :
 | 
					  { xz -dc <"$RDC" >"$TMP/rd" 2>/dev/null; rc=$?; } || :
 | 
				
			||||||
  (( rc != 1 )) && error "Failed to unxz $RDC, reason $rc" && exit 91
 | 
					  (( rc != 1 )) && error "Failed to unxz $RDC on $FS, reason $rc" && exit 91
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  { (cd "$TMP" && cpio -idm <"$TMP/rd" 2>/dev/null); rc=$?; } || :
 | 
					  { (cd "$TMP" && cpio -idm <"$TMP/rd" 2>/dev/null); rc=$?; } || :
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if (( rc != 0 )); then
 | 
					  if (( rc != 0 )); then
 | 
				
			||||||
    ROOT="N"
 | 
					    ROOT="N"
 | 
				
			||||||
    { (cd "$TMP" && fakeroot cpio -idmu <"$TMP/rd" 2>/dev/null); rc=$?; } || :
 | 
					    { (cd "$TMP" && fakeroot cpio -idmu <"$TMP/rd" 2>/dev/null); rc=$?; } || :
 | 
				
			||||||
    (( rc != 0 )) && error "Failed to extract $RDC, reason $rc" && exit 92
 | 
					    (( rc != 0 )) && error "Failed to extract $RDC on $FS, reason $rc" && exit 92
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  rm -rf /run/extract && mkdir -p /run/extract
 | 
					  rm -rf /run/extract && mkdir -p /run/extract
 | 
				
			||||||
@ -273,7 +273,7 @@ if [[ "${FS,,}" == "btrfs" ]]; then
 | 
				
			|||||||
  { chattr +C "$SYSTEM"; } || :
 | 
					  { chattr +C "$SYSTEM"; } || :
 | 
				
			||||||
  FA=$(lsattr "$SYSTEM")
 | 
					  FA=$(lsattr "$SYSTEM")
 | 
				
			||||||
  if [[ "$FA" != *"C"* ]]; then
 | 
					  if [[ "$FA" != *"C"* ]]; then
 | 
				
			||||||
    error "Failed to disable COW for system image $SYSTEM on ${FS^^} filesystem (returned $FA)"
 | 
					    error "Failed to disable COW for system image $SYSTEM on ${FS^^} filesystem."
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user