When I used Ubuntu I believe it used lele-laptop
.
There's a debian package called laptop-detect
. It's yes/no test which is then used for extra setup for laptops. Ubuntu would have used this for the '-laptop' suffix.
The manpage for laptop-detect references dmidecode
. dmidecode
reports naming information for the machine like "Thinkpad X230" (and presumably enough information to decide whether it's a laptop). It doesn't require a massive hardware database, it just relies on the vendor providing helpful information in the firmware (heh).
Putting the name of the hardware into the hostname could be a logical extension.
I think I've seen some Windows version setting it similarly but just using the vendor (e.g. Lenovo)... though AFAIK it could have been a vendor modification to the OS.
A DHCP mechanism is possible - if what you're seeing exactly matched a previous hostname of the laptop. However it seems unlikely, and Ubuntu would have to implement it explicitly - I can't see why they would do it.