mirror of
https://github.com/speed47/spectre-meltdown-checker
synced 2024-11-07 06:33:38 +01:00
fix: bad exitcode with --update-fwdb due to trap exit
This commit is contained in:
parent
3c988cc73a
commit
48abeb5950
@ -18,6 +18,7 @@ trap 'exit_cleanup' EXIT
|
||||
trap '_warn "interrupted, cleaning up..."; exit_cleanup; exit 1' INT
|
||||
exit_cleanup()
|
||||
{
|
||||
saved_ret=$?
|
||||
# cleanup the temp decompressed config & kernel image
|
||||
[ -n "${dumped_config:-}" ] && [ -f "$dumped_config" ] && rm -f "$dumped_config"
|
||||
[ -n "${kerneltmp:-}" ] && [ -f "$kerneltmp" ] && rm -f "$kerneltmp"
|
||||
@ -30,6 +31,7 @@ exit_cleanup()
|
||||
[ "${insmod_msr:-}" = 1 ] && rmmod msr 2>/dev/null
|
||||
[ "${kldload_cpuctl:-}" = 1 ] && kldunload cpuctl 2>/dev/null
|
||||
[ "${kldload_vmm:-}" = 1 ] && kldunload vmm 2>/dev/null
|
||||
exit $saved_ret
|
||||
}
|
||||
|
||||
# if we were git clone'd, adjust VERSION
|
||||
|
Loading…
Reference in New Issue
Block a user