2023-08-24 09:53:35 +00:00
|
|
|
From dd8a6a2af24e2d24fcc5cb9b114f8da05a69bdd0 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Rudi Heitbaum <rudi@heitbaum.com>
|
|
|
|
Date: Fri, 7 Jul 2023 11:44:05 +0000
|
2022-02-05 14:23:32 +00:00
|
|
|
Subject: [PATCH] move hwdb.bin to /run
|
|
|
|
|
|
|
|
---
|
2023-08-24 09:53:35 +00:00
|
|
|
src/libsystemd/sd-hwdb/hwdb-internal.h | 2 +-
|
|
|
|
src/shared/hwdb-util.c | 2 +-
|
|
|
|
units/systemd-hwdb-update.service.in | 2 +-
|
2022-02-05 14:23:32 +00:00
|
|
|
3 files changed, 3 insertions(+), 3 deletions(-)
|
|
|
|
|
2022-02-28 21:31:20 +00:00
|
|
|
diff --git a/src/libsystemd/sd-hwdb/hwdb-internal.h b/src/libsystemd/sd-hwdb/hwdb-internal.h
|
2023-08-24 09:53:35 +00:00
|
|
|
index 5302679a62..4afdd6e306 100644
|
|
|
|
--- a/src/libsystemd/sd-hwdb/hwdb-internal.h
|
|
|
|
+++ b/src/libsystemd/sd-hwdb/hwdb-internal.h
|
|
|
|
@@ -84,7 +84,7 @@ struct trie_value_entry2_f {
|
2022-02-05 14:23:32 +00:00
|
|
|
|
2022-02-28 21:31:20 +00:00
|
|
|
#define hwdb_bin_paths \
|
|
|
|
"/etc/systemd/hwdb/hwdb.bin\0" \
|
|
|
|
- "/etc/udev/hwdb.bin\0" \
|
|
|
|
+ "/run/hwdb.bin\0" \
|
|
|
|
"/usr/lib/systemd/hwdb/hwdb.bin\0" \
|
|
|
|
_CONF_PATHS_SPLIT_USR_NULSTR("systemd/hwdb/hwdb.bin") \
|
|
|
|
UDEVLIBEXECDIR "/hwdb.bin\0"
|
2023-08-24 09:53:35 +00:00
|
|
|
diff --git a/src/shared/hwdb-util.c b/src/shared/hwdb-util.c
|
|
|
|
index 12621b7f89..552b1dc008 100644
|
|
|
|
--- a/src/shared/hwdb-util.c
|
|
|
|
+++ b/src/shared/hwdb-util.c
|
|
|
|
@@ -587,7 +587,7 @@ int hwdb_update(const char *root, const char *hwdb_bin_dir, bool strict, bool co
|
|
|
|
* source. If true, then hwdb.bin will be created without the information. systemd-hwdb command
|
|
|
|
* should set the argument false, and 'udevadm hwdb' command should set it true. */
|
|
|
|
|
|
|
|
- hwdb_bin = path_join(root, hwdb_bin_dir ?: "/etc/udev", "hwdb.bin");
|
|
|
|
+ hwdb_bin = path_join(root, hwdb_bin_dir ?: "/run", "hwdb.bin");
|
|
|
|
if (!hwdb_bin)
|
|
|
|
return -ENOMEM;
|
|
|
|
|
2022-02-05 14:23:32 +00:00
|
|
|
diff --git a/units/systemd-hwdb-update.service.in b/units/systemd-hwdb-update.service.in
|
2023-08-24 09:53:35 +00:00
|
|
|
index 4ba36d1fc6..4848ae9661 100644
|
2022-02-05 14:23:32 +00:00
|
|
|
--- a/units/systemd-hwdb-update.service.in
|
|
|
|
+++ b/units/systemd-hwdb-update.service.in
|
2023-08-24 09:53:35 +00:00
|
|
|
@@ -13,7 +13,7 @@ Documentation=man:hwdb(7) man:systemd-hwdb(8)
|
|
|
|
|
2022-02-05 14:23:32 +00:00
|
|
|
ConditionNeedsUpdate=/etc
|
2022-02-28 21:31:20 +00:00
|
|
|
ConditionPathExists=|!{{UDEVLIBEXECDIR}}/hwdb.bin
|
2022-02-05 14:23:32 +00:00
|
|
|
-ConditionPathExists=|/etc/udev/hwdb.bin
|
|
|
|
+ConditionPathExists=|/run/hwdb.bin
|
|
|
|
ConditionDirectoryNotEmpty=|/etc/udev/hwdb.d/
|
|
|
|
|
2023-08-24 09:53:35 +00:00
|
|
|
DefaultDependencies=no
|
2022-02-05 14:23:32 +00:00
|
|
|
--
|
2023-08-24 09:53:35 +00:00
|
|
|
2.34.1
|
2022-02-05 14:23:32 +00:00
|
|
|
|