Skip reset_crashkernel_after_update during package install
Currently, kexec-tools tries to reset crashkernel when using anaconda to
install the system. But grubby isn't ready and complains that,
  10:34:17,014 INF packaging: Configuring (running scriptlet for): kexec-tools-2.0.23-9.el9.x86_64 1646034766 53ff7158f8808774f4e3c3c87e504aa7a6d677b537754dac86c87925c8f0a397
  10:34:17,205 INF dnf.rpm: grep: /boot/grub2/grubenv: No such file or directory
  grep: /boot/grub2/grubenv: No such file or directory
  grep: /boot/grub2/grubenv: No such file or directory
kexec-tools is supposed to update the kernel crashkernel parameter after
package upgrade. Unfortunately, the posttrans RPM scriptlet doesn't
distinguish between package install and upgrade. This patch skips
reset_crashkernel_after_update as similar to e218128e ("Only try to
reset crashkernel for osbuild during package install").
Reported-by: Jan Stodola <jstodola@redhat.com>
Signed-off-by: Coiby Xu <coxu@redhat.com>
			
			
This commit is contained in:
		
							parent
							
								
									3ae8cf8876
								
							
						
					
					
						commit
						a3da46d6c4
					
				
							
								
								
									
										4
									
								
								kdumpctl
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								kdumpctl
									
									
									
									
									
								
							| @ -1657,6 +1657,10 @@ reset_crashkernel_after_update() | |||||||
| 	local _kernel _crashkernel _dump_mode _fadump_val _old_default_crashkernel _new_default_crashkernel | 	local _kernel _crashkernel _dump_mode _fadump_val _old_default_crashkernel _new_default_crashkernel | ||||||
| 	declare -A _crashkernel_vals | 	declare -A _crashkernel_vals | ||||||
| 
 | 
 | ||||||
|  | 	if _is_package_install; then | ||||||
|  | 		return | ||||||
|  | 	fi | ||||||
|  | 
 | ||||||
| 	_crashkernel_vals[old_kdump]=$(cat /tmp/old_default_crashkernel 2> /dev/null) | 	_crashkernel_vals[old_kdump]=$(cat /tmp/old_default_crashkernel 2> /dev/null) | ||||||
| 	_crashkernel_vals[old_fadump]=$(cat /tmp/old_default_crashkernel_fadump 2> /dev/null) | 	_crashkernel_vals[old_fadump]=$(cat /tmp/old_default_crashkernel_fadump 2> /dev/null) | ||||||
| 	_crashkernel_vals[new_kdump]=$(get_default_crashkernel kdump) | 	_crashkernel_vals[new_kdump]=$(get_default_crashkernel kdump) | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user