diff --git a/xCAT-genesis-scripts/bin/dodiscovery b/xCAT-genesis-scripts/bin/dodiscovery
index a92c19eb7..29e8ba559 100755
--- a/xCAT-genesis-scripts/bin/dodiscovery
+++ b/xCAT-genesis-scripts/bin/dodiscovery
@@ -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" >> /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" >> /tmp/discopacket
fi
if [ "$PLATFORM" != "unknown" ]; then
diff --git a/xCAT-server/lib/xcat/plugins/bmcdiscover.pm b/xCAT-server/lib/xcat/plugins/bmcdiscover.pm
index 270ab01a1..4264f519d 100644
--- a/xCAT-server/lib/xcat/plugins/bmcdiscover.pm
+++ b/xCAT-server/lib/xcat/plugins/bmcdiscover.pm
@@ -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+$/);