diff options
author | Martin Pitt <martin.pitt@ubuntu.com> | 2014-10-17 15:01:01 +0200 |
---|---|---|
committer | Martin Pitt <martin.pitt@ubuntu.com> | 2014-10-28 14:28:18 +0100 |
commit | 33488f19793dc0a86fdee27266c5319b5b78d695 (patch) | |
tree | bdadba036ac69b190d2ee2541c3f762da4698b66 /units | |
parent | 2f952a25772a690eb03b6af2ad5998086a03234c (diff) |
udev hwdb: Support shipping pre-compiled database in system images
In some cases it is preferable to ship system images with a pre-generated
binary hwdb database, to avoid having to build it at runtime, avoid shipping
the source hwdb files, or avoid storing large binary files in /etc.
So if hwdb.bin does not exist in /etc/udev/, fall back to looking for it in
UDEVLIBEXECDIR. This keeps the possibility to add files to /etc/udev/hwdb.d/
and re-generating the database which trumps the one in /usr/lib.
Add a new --usr flag to "udevadm hwdb --update" which puts the database
into UDEVLIBEXECDIR.
Adjust systemd-udev-hwdb-update.service to not generate the file in /etc if we
already have it in /usr.
Diffstat (limited to 'units')
-rw-r--r-- | units/systemd-udev-hwdb-update.service.in | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/units/systemd-udev-hwdb-update.service.in b/units/systemd-udev-hwdb-update.service.in index cdbcd837cd..5b1f75d250 100644 --- a/units/systemd-udev-hwdb-update.service.in +++ b/units/systemd-udev-hwdb-update.service.in @@ -13,6 +13,9 @@ Conflicts=shutdown.target 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 +ConditionDirectoryNotEmpty=|/etc/udev/hwdb.d/ [Service] Type=oneshot |