systemd: update hwdb.bin patch

This commit is contained in:
MilhouseVH 2019-04-11 20:00:37 +01:00
parent f308199746
commit bf92570214

View File

@ -1,53 +1,53 @@
From 73f401a5a33ad3e647791685a9af14e69c7a89f6 Mon Sep 17 00:00:00 2001
From: Stefan Saraev <stefan@saraev.ca>
Date: Fri, 7 Aug 2015 13:25:23 +0300
Subject: [PATCH 3/8] move hwdb.bin to /run
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/hwdb/hwdb.c | 2 +-
src/libsystemd/sd-hwdb/sd-hwdb.c | 2 +-
src/udev/udevadm-hwdb.c | 2 +-
src/libsystemd/sd-hwdb/hwdb-util.c | 2 +-
src/libsystemd/sd-hwdb/sd-hwdb.c | 2 +-
units/systemd-hwdb-update.service.in | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/hwdb/hwdb.c b/src/hwdb/hwdb.c
index 446de3a..be91bfe 100644
--- a/src/hwdb/hwdb.c
+++ b/src/hwdb/hwdb.c
@@ -38,7 +38,7 @@
* Uses a Patricia/radix trie to index all matches for efficient lookup.
*/
-static const char *arg_hwdb_bin_dir = "/etc/udev";
+static const char *arg_hwdb_bin_dir = "/run";
static const char *arg_root = "";
diff --git a/src/libsystemd/sd-hwdb/hwdb-util.c b/src/libsystemd/sd-hwdb/hwdb-util.c
index c83575c..6285f3d 100644
--- a/src/libsystemd/sd-hwdb/hwdb-util.c
+++ b/src/libsystemd/sd-hwdb/hwdb-util.c
@@ -20,7 +20,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/sd-hwdb.c b/src/libsystemd/sd-hwdb/sd-hwdb.c
index 61c7b44..6e1de7d 100644
index 79fe1a8..0acbf71 100644
--- a/src/libsystemd/sd-hwdb/sd-hwdb.c
+++ b/src/libsystemd/sd-hwdb/sd-hwdb.c
@@ -269,7 +269,7 @@
@@ -299,7 +299,7 @@ static int trie_search_f(sd_hwdb *hwdb, const char *search) {
static const char 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"
#ifdef HAVE_SPLIT_USR
#if HAVE_SPLIT_USR
"/lib/systemd/hwdb/hwdb.bin\0"
diff --git a/src/udev/udevadm-hwdb.c b/src/udev/udevadm-hwdb.c
index d65e40c..8889df7 100644
--- a/src/udev/udevadm-hwdb.c
+++ b/src/udev/udevadm-hwdb.c
@@ -562,7 +562,7 @@ static int adm_hwdb(struct udev *udev, int argc, char *argv[]) {
};
const char *test = NULL;
const char *root = "";
- const char *hwdb_bin_dir = "/etc/udev";
+ const char *hwdb_bin_dir = "/run";
bool update = false;
struct trie *trie = NULL;
int err, c;
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 @@ After=systemd-remount-fs.service
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]
--
1.7.10.4
2.14.1