Question: MacBook name changes depending on network
I've run into an interesting situation that I do not understand.
I have some custom multi-user software that I've created for a client that has some item checkin/checkout functionality within the system that depends on the machine name (it doesn't allow someone to lock the item on more than one device at a time, to prevent data loss due to it's ability to make edits offline).
What I've run into is a users MacBook Pro who's network name changes depending on what they are connected to. Now, I've seen various users MacBook names change from something like Garys-MacBook-Pro to Garys-MacBook-Pro.local to Garys-MacBook-Pro.att.net depending on whether they're at the office or at home or whatever. This I can handle and makes total sense. I just strip the name down to the actual machine name "Garys-MacBook-Pro" and only base my comparison on that.
Where I've come into a real issue, is I've seen this users MacBook network name change almost completely when he jumped onto a hotel network vs. his own MiFi hotspot. When he was on his MiFi hotspot his machine name changed to "Garys-MBP.local", but when he's on the hotel internet it stayed "Garys-MacBook-Pro.local".
Why would the actual name of the device change like this depending on the connection? I understand the network suffix changing based on network... but not the actual device name itself. He named his machine "Garys-MacBook-Pro", but why the switch to "Garys-MBP" when on the hotspot? Is there some location based feature of OS X that I am unaware of that may be at play here?
MacBook Pro, iOS 11.2.6, null