utilities/tools/collector/debian-scripts/collect_patching.sh
Al Bailey 0592342156 Debian: Update collect tool to gather ostree info
- Removed unused variables from collect_dc.sh
 - Removed references to dpkg from collect_sysinv.sh
   as well as the rpm.info file.
 - Added collect_dpkg.sh to gather debian package info for
   all node types to dpkg.info.
 - Added collect_ostree.sh to gather ostree log info for
   sysroot and any feed directories to ostree.info.

Cleaned up the width of some collect -v formatting.

Test Plan:
  Build / Install / Bootstrap / Unlock Debian AIO-SX
  Run collect on AIO-SX and verify the two new files
ostree.info and dpkg.info are present, and rpm.info is not.

Story: 2009969
Task: 45325
Signed-off-by: Al Bailey <al.bailey@windriver.com>
Change-Id: I48ffd39a945a82252c43786aa7d2c6e3ddc7d7ae
2022-05-11 20:00:12 +00:00

44 lines
1.4 KiB
Bash
Executable File

#! /bin/bash
#
# Copyright (c) 2013-2022 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="patching"
LOGFILE="${extradir}/${SERVICE}.info"
echo "${hostname}: Patching Info .....: ${LOGFILE}"
###############################################################################
# All nodes
###############################################################################
###############################################################################
# Only Controller
###############################################################################
if [ "$nodetype" = "controller" ] ; then
delimiter ${LOGFILE} "sw-patch query"
sw-patch query 2>>${COLLECT_ERROR_LOG} >> ${LOGFILE}
delimiter ${LOGFILE} "sw-patch query-hosts"
sw-patch query-hosts 2>>${COLLECT_ERROR_LOG} >> ${LOGFILE}
delimiter ${LOGFILE} "sw-patch query-hosts --debug"
sw-patch query-hosts --debug 2>>${COLLECT_ERROR_LOG} >> ${LOGFILE}
delimiter ${LOGFILE} "find /opt/patching"
find /opt/patching 2>>${COLLECT_ERROR_LOG} >> ${LOGFILE}
# todo(abailey): Verify that we can remove the next 2 lines
delimiter ${LOGFILE} "find /var/www/pages/updates"
find /var/www/pages/updates 2>>${COLLECT_ERROR_LOG} >> ${LOGFILE}
fi
exit 0