Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dumpheader: Add default serial number in the header #74

Open
wants to merge 1 commit into
base: 1110
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions dump/tools/common/include/gendumpheader
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,19 @@ declare -rx PEL_ID_PROP='PlatformLogID'
declare -x modelNo
modelNo=$(busctl get-property $INVENTORY_MANAGER $INVENTORY_PATH \
$INVENTORY_ASSET_INT Model | cut -d " " -f 2 | sed "s/^\(\"\)\(.*\)\1\$/\2/g")

#Variables
declare -x serialNo
serialNo=$(busctl get-property $INVENTORY_MANAGER $INVENTORY_PATH \
$INVENTORY_ASSET_INT SerialNumber | cut -d " " -f 2 | sed "s/^\(\"\)\(.*\)\1\$/\2/g")
declare -x serialNo="0000000"

declare -x dDay
dDay=$(date -d @"$EPOCHTIME" +'%Y%m%d%H%M%S')
declare -x bmcSerialNo
bmcSerialNo=$(busctl call $INVENTORY_MANAGER $INVENTORY_BMC_BOARD \
org.freedesktop.DBus.Properties Get ss $INVENTORY_ASSET_INT \
SerialNumber | cut -d " " -f 3 | sed "s/^\(\"\)\(.*\)\1\$/\2/g")

. $DREPORT_INCLUDE/opfunctions

#Function to add NULL
function add_null() {
local a=$1
Expand Down Expand Up @@ -555,6 +557,7 @@ function plat_dump_header() {

#main function
function gen_header_package() {
fetch_serial_number
dump_file_entry
dump_section_entry
if [ "$dump_type" = "$OP_DUMP" ]; then
Expand Down