-
-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Smarter hostname #453
Smarter hostname #453
Conversation
Do we want to use only a part of the https://www.freedesktop.org/software/systemd/man/machine-id.html |
I don't really like relying on dmidecode for this, is there any alternative available (I'm pretty sure that dmidecode don't work in some contexts like VMs) |
Dropped usage of Current schema for hostname creation:
Fallback: elementary-os- |
@cassidyjames Could you test if |
They likely won’t provide usable values since the pinebook pro doesn’t have DMI. But we’re also not using the installer there. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey thanks for working on this! I think since get_hostname
is the only method that is accessed outside of this class, it's probably the only method that should be public
. The others should be private
What do you think about the hostname creation scheme? I think the scheme of Ubiquity is built as follows:
|
So for me, this makes my hostname
I'm curious about what other folks are getting when they cat these files and if we can find something meaningful but relatively short |
The values in the table were queried on the hardware as follows: echo "vendor: `cat /sys/devices/virtual/dmi/id/sys_vendor`"
echo "model: `cat /sys/devices/virtual/dmi/id/product_name`"
echo "version: `cat /sys/devices/virtual/dmi/id/product_version`" The OEMs' implementation is a big mess 🙈 |
|
Maybe unhelpful given the last response:
|
So it seems like for the data we have here so far that Model is usually better for everything except when vender is |
Throwing my hat in the ring since I have a decent amount of hardware around.
@meisenzahl so to answer, no, Pinebook Pro does not have usable values here. 😄 It fails because the |
@meisenzahl @tintou @danrabbit the |
@tintou what is your opinion? Should I restore the ported logic from ubiquity without relying on |
…to smarter-hostname
@meisenzahl if you're using code derived from another work you need to update the copyright header in the file and make sure the license is compatible as well |
According to https://launchpad.net/ubiquity, ubiquity is licensed under GPLv2. There are references to GPLv2 and GPLv3 in the code. The references to GPLv2 look like this: "either version 2 of the License, or (at your option) any later version." This means to me that GPLv3 as a later version is compatible with it. However, I am not a lawyer, so I don't know if we are compatible by using GPLv3. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, lets give it a try
Closes #383