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

Merge pull request #4781 from stanford-rc/dodiscovery_syntax

dodiscovery: fix syntax error in case flag_serial is not defined
This commit is contained in:
zet809 2018-02-02 14:05:37 +08:00 committed by GitHub
commit 4af7ba619b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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