2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-22 03:32:04 +00:00

Delete all '.' in mtm and serial string for OpenBMC

This commit is contained in:
XuWei 2017-09-21 22:46:20 -04:00
parent 35f6ba7ad0
commit 01a4a49405
2 changed files with 4 additions and 2 deletions

View File

@ -159,10 +159,12 @@ fi
flag_mtm=`echo '$MTM' | sed 's/0//g'`
if [ $flag_mtm ] && [ "$MTM" != "unknown" ]; then
MTM=`echo $MTM | sed 's/\.//g'`
echo "<mtm>$MTM</mtm>" >> /tmp/discopacket
fi
flag_serial=`echo '$SERIAL' | sed 's/0//g'`
if [ $flag_serial ] && [ "$SERIAL" != "unknown" ]; then
SERIAL=`echo $SERIAL | sed 's/\.//g'`
echo "<serial>$SERIAL</serial>" >> /tmp/discopacket
fi
if [ "$PLATFORM" != "unknown" ]; then

View File

@ -1155,8 +1155,8 @@ sub bmcdiscovery_openbmc{
}
# delete space before and after
$mtm =~ s/^\s+|\s+$//g;
$serial =~ s/^\s+|\s+$//g;
$mtm =~ s/^\s+|\s+$|\.+//g;
$serial =~ s/^\s+|\s+$|\.+//g;
$mtm = '' if ($mtm =~ /^0+$/);
$serial = '' if ($serial =~ /^0+$/);