summaryrefslogtreecommitdiff
path: root/rules.d
diff options
context:
space:
mode:
Diffstat (limited to 'rules.d')
-rw-r--r--rules.d/90-iocost.rules20
-rw-r--r--rules.d/meson.build1
2 files changed, 21 insertions, 0 deletions
diff --git a/rules.d/90-iocost.rules b/rules.d/90-iocost.rules
new file mode 100644
index 0000000000..50f778a0ae
--- /dev/null
+++ b/rules.d/90-iocost.rules
@@ -0,0 +1,20 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+#
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+SUBSYSTEM!="block", GOTO="iocost_end"
+
+ENV{DEVTYPE}=="partition", GOTO="iocost_end"
+
+ACTION=="remove", GOTO="iocost_end"
+
+ENV{ID_MODEL}!="", IMPORT{builtin}="hwdb 'block::name:$env{ID_MODEL}:fwrev:$env{ID_REVISION}:'"
+
+ENV{IOCOST_SOLUTIONS}!="", RUN+="iocost apply $env{DEVNAME}"
+
+LABEL="iocost_end"
diff --git a/rules.d/meson.build b/rules.d/meson.build
index 09edd58da2..7280f5b995 100644
--- a/rules.d/meson.build
+++ b/rules.d/meson.build
@@ -28,6 +28,7 @@ rules = [
'78-sound-card.rules',
'80-net-setup-link.rules',
'81-net-dhcp.rules',
+ '90-iocost.rules',
)],
[files('80-drivers.rules'),