From 3353a419500491e9200751a9dc76e64ae209a292 Mon Sep 17 00:00:00 2001 From: lelgenio Date: Thu, 24 Feb 2022 09:36:32 -0300 Subject: [PATCH] root: separate out udev rules and kernel modules --- root/config.yaml | 10 +++++++--- root/{zram/modules-load.d => kernel-modules}/zram.conf | 0 root/udev-rules/60-persistent-storage.rules | 7 +++++++ root/{zram/udev/rules.d => udev-rules}/99-zram.rules | 0 4 files changed, 14 insertions(+), 3 deletions(-) rename root/{zram/modules-load.d => kernel-modules}/zram.conf (100%) create mode 100644 root/udev-rules/60-persistent-storage.rules rename root/{zram/udev/rules.d => udev-rules}/99-zram.rules (100%) diff --git a/root/config.yaml b/root/config.yaml index badd951..e96ca74 100644 --- a/root/config.yaml +++ b/root/config.yaml @@ -129,9 +129,13 @@ dotfiles: actions: - sysctl_apply - zram: - src: zram - dst: /etc/ + kernel_modules: + src: kernel-modules + dst: /etc/modules-load.d/ + + udev_rules: + src: udev-rules + dst: /etc/udev/rules.d/ vconsole: src: vconsole.conf diff --git a/root/zram/modules-load.d/zram.conf b/root/kernel-modules/zram.conf similarity index 100% rename from root/zram/modules-load.d/zram.conf rename to root/kernel-modules/zram.conf diff --git a/root/udev-rules/60-persistent-storage.rules b/root/udev-rules/60-persistent-storage.rules new file mode 100644 index 0000000..b8360ca --- /dev/null +++ b/root/udev-rules/60-persistent-storage.rules @@ -0,0 +1,7 @@ +ACTION=="remove", GOTO="persistent_storage_end" +ENV{UDEV_DISABLE_PERSISTENT_STORAGE_RULES_FLAG}=="1", GOTO="persistent_storage_end" + +# by-label/by-uuid links (filesystem metadata) +ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}" + +LABEL="persistent_storage_end" diff --git a/root/zram/udev/rules.d/99-zram.rules b/root/udev-rules/99-zram.rules similarity index 100% rename from root/zram/udev/rules.d/99-zram.rules rename to root/udev-rules/99-zram.rules