Skip to content

dump header: Add default value to system serialNumber #82

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

Merged
merged 1 commit into from
Jun 11, 2025
Merged
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
11 changes: 8 additions & 3 deletions dump/tools/common/include/gendumpheader
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ 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
Expand Down Expand Up @@ -273,6 +271,13 @@ function get_bmc_model_serial_number() {
if [ -z "$bmcSerialNo" ]; then
bmcSerialNo="000000000000"
fi

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

if [ -z "$serialNo" ]; then
serialNo="0000000"
fi
}

#Function to add virtual file directory entry, consists of below entries
Expand Down