mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-08 04:09:11 +00:00
tools: acrn-crashlog: update core_pattern content conditionally
This patch is to improve the way of updating the core_pattern content in the shell script, since the previous configuration in core_pattern will block coredumpctl. This patch adds an inspection before changing the content of core_pattern. Signed-off-by: CHEN Gang <gang.c.chen@intel.com> Reviewed-by: Zhi Jin <zhi.jin@intel.com> Reviewed-by: xiaojin2 <xiaojing.liu@intel.com> Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com> Acked-by: Zhang Di <di.zhang@intel.com>
This commit is contained in:
@@ -5,7 +5,12 @@
|
||||
#
|
||||
|
||||
# modify the core_pattern
|
||||
echo "|/usr/bin/usercrash_c %p %e %s" > /proc/sys/kernel/core_pattern
|
||||
core_pattern_conf="/proc/sys/kernel/core_pattern"
|
||||
|
||||
grep -q "coredump-wrapper" $core_pattern_conf
|
||||
if [ "$?" -ne "0" ] then
|
||||
echo "|/usr/bin/usercrash_c %p %e %s" > $core_pattern_conf
|
||||
fi
|
||||
|
||||
default_conf="/usr/share/defaults/telemetrics/telemetrics.conf"
|
||||
user_conf="/etc/telemetrics/telemetrics.conf"
|
||||
|
Reference in New Issue
Block a user