summaryrefslogtreecommitdiffstats
path: root/src/hostname
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2022-03-24 17:50:53 +0100
committerLennart Poettering <lennart@poettering.net>2022-03-24 21:29:13 +0100
commit38639aa28f2173c8a46abdf22f90b34f60b085ba (patch)
treeca7da4579b40d2ed070c6e34149a9c481ddf2fb7 /src/hostname
parentmachine-info: rename VENDOR=/MODEL= → HARDWARE_VENDOR=/HARDWARE_MODEL= (diff)
downloadsystemd-38639aa28f2173c8a46abdf22f90b34f60b085ba.tar.xz
systemd-38639aa28f2173c8a46abdf22f90b34f60b085ba.zip
hostnamed: properly reset hw model/vendor props before re-reading them
Follow-up for 4fc7e4f374bf4401330e90e267227267abf1dcac
Diffstat (limited to 'src/hostname')
-rw-r--r--src/hostname/hostnamed.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c
index 01ac5bb805..5d381e157b 100644
--- a/src/hostname/hostnamed.c
+++ b/src/hostname/hostnamed.c
@@ -128,7 +128,9 @@ static void context_read_machine_info(Context *c) {
(UINT64_C(1) << PROP_ICON_NAME) |
(UINT64_C(1) << PROP_CHASSIS) |
(UINT64_C(1) << PROP_DEPLOYMENT) |
- (UINT64_C(1) << PROP_LOCATION));
+ (UINT64_C(1) << PROP_LOCATION) |
+ (UINT64_C(1) << PROP_HARDWARE_VENDOR) |
+ (UINT64_C(1) << PROP_HARDWARE_MODEL));
r = parse_env_file(NULL, "/etc/machine-info",
"PRETTY_HOSTNAME", &c->data[PROP_PRETTY_HOSTNAME],