distribution/packages/sysutils/systemd/patches/systemd-0002-move-hwdb.bin-to-run.patch
2022-02-28 16:31:20 -05:00

53 lines
2 KiB
Diff

From bf2776b7f9403057cb82c2697e4fca8b554db4bd Mon Sep 17 00:00:00 2001
From: MilhouseVH <milhouseVH.github@nmacleod.com>
Date: Thu, 11 Apr 2019 20:00:05 +0100
Subject: [PATCH] move hwdb.bin to /run
---
src/shared/hwdb-util.c | 2 +-
src/libsystemd/sd-hwdb/hwdb-internal.h | 2 +-
units/systemd-hwdb-update.service.in | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/shared/hwdb-util.c b/src/shared/hwdb-util.c
index c83575c..6285f3d 100644
--- a/src/shared/hwdb-util.c
+++ b/src/shared/hwdb-util.c
@@ -21,7 +21,7 @@
#include "strv.h"
#include "tmpfile-util.h"
-static const char *default_hwdb_bin_dir = "/etc/udev";
+static const char *default_hwdb_bin_dir = "/run";
static const char * const conf_file_dirs[] = {
"/etc/udev/hwdb.d",
UDEVLIBEXECDIR "/hwdb.d",
diff --git a/src/libsystemd/sd-hwdb/hwdb-internal.h b/src/libsystemd/sd-hwdb/hwdb-internal.h
index 79fe1a8..0acbf71 100644
--- a/src/libsystemd/sd-hwdb/hwdb-internal.h 2021-07-07 17:41:29.000000000 +0000
+++ b/src/libsystemd/sd-hwdb/hwdb-internal.h 2021-07-08 10:59:13.723718762 +0000
@@ -83,7 +83,7 @@
#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"
diff --git a/units/systemd-hwdb-update.service.in b/units/systemd-hwdb-update.service.in
index 259fe0d..18d617f 100644
--- a/units/systemd-hwdb-update.service.in
+++ b/units/systemd-hwdb-update.service.in
@@ -16,7 +16,7 @@
Before=sysinit.target shutdown.target systemd-update-done.service
ConditionNeedsUpdate=/etc
ConditionPathExists=|!{{UDEVLIBEXECDIR}}/hwdb.bin
-ConditionPathExists=|/etc/udev/hwdb.bin
+ConditionPathExists=|/run/hwdb.bin
ConditionDirectoryNotEmpty=|/etc/udev/hwdb.d/
[Service]
--
2.14.1