dracut-kdump.sh: Redirect kdump script stdout/stderr to /dev/console
Currently in kdump.sh, we redirect stdout to stderr, because dracut pre-pivot service (which kdump.sh is running within) only output stderr to console. That behavior is defined in dracut-pre-pivot.service: [Service] ... StandardInput=null StandardOutput=syslog StandardError=syslog+console ... But during testing, it has been observed that systemd will cache stderr buffer, and first record to syslog (and it's own journal), then copy the logs to /dev/console. And this practice is somehow unexpected in our kdump script. We may have suppressed stdout/stderr that hasn't been write to /dev/console before we run a force reboot. With this change of redirecting stdout/stderr to /dev/console, kdump.sh will output everything immediately to console, not cached/hidden by systemd. Signed-off-by: WANG Chao <chaowang@redhat.com> Acked-by: Vivek Goyal <vgoyal@redhat.com>
This commit is contained in:
		
							parent
							
								
									5de822d48d
								
							
						
					
					
						commit
						a88f0848dc
					
				| @ -1,6 +1,6 @@ | ||||
| #!/bin/sh | ||||
| 
 | ||||
| exec >&2 | ||||
| exec &> /dev/console | ||||
| . /lib/dracut-lib.sh | ||||
| 
 | ||||
| set -o pipefail | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user