keeleysam / munkireport

Automatically exported from code.google.com/p/munkireport
Other
0 stars 0 forks source link

Feature request: machines should be tracked by serial # instead of MAC address #25

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. On an machine w/ multiple interfaces, run munki on one interface
2. Run munki w/ another interface
3. In Munkireport there are now two reports for the same machine.

What is the expected output? What do you see instead?
There should be one report per machine. Since the machine has multiple network 
interfaces, a new db item is created for each network interface. If we create 
new db items based on a machine's serial number, we won't have this problem.

Which MunkiReport version are you using?
MunkiReport version 0.7.0 r175 

Which Munki version are you using?
0.8.0 Build 1290

Which operating system version are you running MunkiReport on?
10.6.8 Server

Please provide any additional information below.

Original issue reported on code.google.com by am2...@apps.cul.columbia.edu on 29 Sep 2011 at 2:10

GoogleCodeExporter commented 9 years ago
Would changing the preflight line 

     MAC=`ifconfig en0 | awk '/ether/ {print $2}'`

to

     MAC= `ioreg -l | grep IOPlatformSerialNumber | awk '{print $4}' | tr -d '"'`

Do what you want?  Granted, the MAC field is now mislabled (it's now the serial 
number, not the MAC address) and I've no clue if this will work with the 
munkireports database/server... if it doesn't do any type/field checking then 
you should be fine... if it insists on a specific length or limits to valid 
characters in a MAC address then it will fail.

Original comment by child...@gmail.com on 14 Oct 2011 at 2:46