I included my custom udev rules into initramfs. /etc/dracut.conf.d/my-udev-battery.conf install_items+="/etc/udev/rules.d/62-adjust-battery-capacity.rules” its there - "dracut -vf" logs succesful inclusion. /etc/udev/rules.d/62-adjust-battery-capacity.rules ### Rule start ### ACTION=="add|change", KERNEL=="BAT*", SUBSYSTEM=="power_supply", ATTR{energy_full_design}="*", MODE="0664" ACTION=="add|change", KERNEL=="BAT*", SUBSYSTEM=="power_supply", ATTR{energy_full_design}="68000000" ### Rule end ### Unfortunately cat /sys/class/power_supply/BAT1/energy_full still displays old value. Even tried to add grub boot parameter, no luck. power_supply. energy_full_design=68000000
On 15 Sep 2018, at 18:35, Andrei Borzenkov <arvidjaar@gmail.com> wrote:
15.09.2018 18:20, Andrei Verovski пишет:
On 9/15/18 3:17 PM, Andrei Borzenkov wrote:
Thanks for feedback, Andrei.
This depends on whether your rule is needed only in dracut or also in running system and where you want to place this rule. In general, rules under /usr/lib/udev/rules.d should always work, under /etc/udev/rules.d - be skipped in non-hostonly mode. You should then see corresponding message during dracut run.
Or you can always use install_items or install_optional_items in configuration that simply unconditionally add corresponding file without any rules magic. My udev rules must be copied to initrams in order to be invoked at boot time.
From what I found here: https://wiki.voidlinux.eu/Manual_Install_with_encrypted_boot
Dracut has an "install_items" option to inject custom files. We can set it by creating a configuration file /etc/dracut.conf.d/10-crypt.conf with the following content: install_items+="/crypto_keyfile.bin /etc/crypttab"
So, is it enough to create /etc/dracut.conf.d/20-my-udev-rules.conf with that option: install_items+="~/myscripts/add-my-udev.conf /usr/lib/udev/rules.d"
install_items is a list of absolute filenames. Each file is installed under the same name in initrd; there is no way to relocate file using this dracut parameter. And it must have spaces as delimiters between items in another configuration snippets.
And ~ will not work in dracut configuration.
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org