dracut-functions.sh: support for alternative udev dirs - udevaltdirs
PATCH 1/2 dracut-functions.sh: support for alternative udev dirs - udevaltdirs
It is required for Gentoo which moves udev from / to /usr and supports both /lib/udev and /usr/lib/udev for compatibility with other packages.
Credits go to Alexander Tsoy <alexander-EP/[email protected]>.
--- dracut-functions.sh | 9 +++++++++ 1 file changed, 9 insertions(+)
dracut-functions.sh +9 -0
@@ -901,6 +901,15 @@ inst_rules() { inst_dir "$_target" for _rule in "$@"; do if [ "${_rule#/}" = "$_rule" ]; then + for r in ${udevaltdirs}; do + [[ "$r" = "${udevdir}" ]] && continue + if [[ -f $r/rules.d/$_rule ]]; then + _found="$r/rules.d/$_rule" + inst_rule_programs "$_found" + inst_rule_group_owner "$_found" + inst_simple "$_found" "${udevdir}/rules.d/${_found##*/}" + fi + done for r in ${udevdir}/rules.d /etc/udev/rules.d; do if [[ -f $r/$_rule ]]; then _found="$r/$_rule"
Signature · 1 line
1.8.1
A message that is not in the archive (sent off-list or not yet received): 1358020128-20693-1-git-send-email-aidecoe-2qtfh70TtYba5EbDDlwbIw@public.gmane.org
PATCH 2/2 gentoo.conf: let udevdir= be handled by pkg-config and use udevaltdirs
To avoid need of rebuild after udev update/downgrade let udevdir= be set dynamically with pkg-config. Use udevaltdirs to search for rules both in old and new locations.
--- dracut.conf.d/gentoo.conf.example | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
dracut.conf.d/gentoo.conf.example +2 -1
@@ -1,7 +1,8 @@ # /etc/dracut.conf.d/gentoo.conf # dracut config file customized for Gentoo Base System release 2 -udevdir=/lib/udev +udevdir= +udevaltdirs="/lib/udev /usr/lib/udev" ro_mnt=yes #
Signature · 1 line
1.8.1