From 5a4f2ca631b3d96c5951630b005a5d9af6884f06 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Fri, 16 Sep 2011 19:16:20 +0000 Subject: [PATCH] Add UUID and capitalize mac addresses to match old format git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10538 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-nbroot2/dodiscovery | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xCAT-nbroot2/dodiscovery b/xCAT-nbroot2/dodiscovery index 537d402e0..f6f6c9486 100755 --- a/xCAT-nbroot2/dodiscovery +++ b/xCAT-nbroot2/dodiscovery @@ -76,6 +76,7 @@ elif [ -r /proc/device-tree/model ]; then #POWER fi CPUCOUNT=`cat /proc/cpuinfo |grep "model name"|wc -l` MEMORY=`cat /proc/meminfo |grep MemTotal|awk '{print $2}'` +UUID=`cat /sys/devices/virtual/dmi/id/product_uuid` grep "model name" /proc/cpuinfo | while read line; do #to avoid pulling in tail, we do a goofy thing echo $line > /tmp/cpumod done @@ -89,6 +90,7 @@ fi echo "$CPUCOUNT" >> /tmp/discopacket echo "$CPUTYPE" >> /tmp/discopacket echo "$MEMORY" >> /tmp/discopacket +echo "$UUID" >> /tmp/discopacket if [ "$MTM" != "unknown" ]; then echo "$MTM" >> /tmp/discopacket fi @@ -98,7 +100,7 @@ fi for dev in `ip link|grep -B1 ether|grep UP|awk '{print $2}'|sed -e s/://`; do DRIVER=`grep DRIVER /sys/class/net/$dev/device/uevent|awk -F= '{print $2}'` ADDRESS=`ip address show dev $dev|grep "inet "|grep global|awk '{print $2}'` - MAC=`ip link show dev $dev|grep ether|awk '{print $2}'` + MAC=`ip link show dev $dev|grep ether|awk '{print $2}'| tr /a-f/ /A-F/` echo "$DRIVER|$dev|$MAC|$ADDRESS" >> /tmp/discopacket done echo "$PUBKEY" >> /tmp/discopacket #this is not secure to use by itself, switch sourced pubkey for security