
Debian and Centos use the same tools but they are installed in different places. In order for collect to work on Debian, make sure that we are trying not use to RPMs on Debian. This is done in the collect-patching script so that the "smart" program is not run. Also kdump uses the /var/lib/kdump path on Debian rather than /var/crash on Centos. Also checked for 'rpm -qa' usage and changed them to 'dpkg -l'. Test Plan PASS Build package PASS Build and install ISO PASS Run the collect -v -all Story: 2009101 Task: 43732 Depends-On: https://review.opendev.org/c/starlingx/tools/+/838327 Signed-off-by: Charles Short <charles.short@windriver.com> Change-Id: I66cf0615f8cab7fe877b6cb09d605557c9258c43
39 lines
891 B
Bash
39 lines
891 B
Bash
#! /bin/bash
|
|
#
|
|
# Copyright (c) 2016-2020 Wind River Systems, Inc.
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
|
|
# Loads Up Utilities and Commands Variables
|
|
|
|
source /usr/local/sbin/collect_parms
|
|
source /usr/local/sbin/collect_utils
|
|
|
|
SERVICE="crash"
|
|
LOGFILE="${extradir}/${SERVICE}.info"
|
|
|
|
|
|
CRASHDIR="/var/lib/kdump"
|
|
|
|
echo "${hostname}: Kernel Crash Info .: ${LOGFILE}"
|
|
|
|
COMMAND="find ${CRASHDIR}"
|
|
delimiter ${LOGFILE} "${COMMAND}"
|
|
${COMMAND} >> ${LOGFILE} 2>>${COLLECT_ERROR_LOG}
|
|
|
|
COMMAND="rsync -a --include=*.txt --include=*/ --exclude=* ${CRASHDIR} ${basedir}/var/"
|
|
delimiter ${LOGFILE} "${COMMAND}"
|
|
${COMMAND} >> ${LOGFILE} 2>>${COLLECT_ERROR_LOG}
|
|
|
|
COMMAND="ls -lrtd ${CRASHDIR}/*"
|
|
delimiter ${LOGFILE} "${COMMAND}"
|
|
${COMMAND} >> ${LOGFILE} 2>>${COLLECT_ERROR_LOG}
|
|
|
|
COMMAND="md5sum ${CRASHDIR}/*"
|
|
delimiter ${LOGFILE} "${COMMAND}"
|
|
${COMMAND} >> ${LOGFILE} 2>>${COLLECT_ERROR_LOG}
|
|
|
|
exit 0
|