With my initramfs-tools maintainer hat on, I suggest/support following solution:
Modify /usr/share/initramfs-tools/hooks/udev (shipped by udev, source: systemd) to not copy the udev rules generated by chzdev. So changing:
```
for rules in /etc/udev/rules.d/*.rules; do
if [ -e "$rules" ] && [ ! -e "/lib/${rules#/etc/}" ]; then
cp -p "$rules" "$DESTDIR/lib/udev/rules.d/"
fi
done
```
to something like:
```
for rules in /etc/udev/rules.d/*.rules; do
if [ -e /sbin/chzdev ] && /sbin/chzdev --is-author-of-udev-rule "$rules"; then
continue
fi
if [ -e "$rules" ] && [ ! -e "/lib/${rules#/etc/}" ]; then
cp -p "$rules" "$DESTDIR/lib/udev/rules.d/"
fi
done
```
Then `/sbin/chzdev --is-author-of-udev-rule "$rules"` should produce the correct exit code. The tool that generates the udev rules should be queried (is that chzdev or something else?) or a separate helper should be used.
With my initramfs-tools maintainer hat on, I suggest/support following solution:
Modify /usr/share/ initramfs- tools/hooks/ udev (shipped by udev, source: systemd) to not copy the udev rules generated by chzdev. So changing:
``` rules.d/ *.rules; do {rules# /etc/}" ]; then lib/udev/ rules.d/ "
for rules in /etc/udev/
if [ -e "$rules" ] && [ ! -e "/lib/$
cp -p "$rules" "$DESTDIR/
fi
done
```
to something like:
``` rules.d/ *.rules; do of-udev- rule "$rules"; then {rules# /etc/}" ]; then lib/udev/ rules.d/ "
for rules in /etc/udev/
if [ -e /sbin/chzdev ] && /sbin/chzdev --is-author-
continue
fi
if [ -e "$rules" ] && [ ! -e "/lib/$
cp -p "$rules" "$DESTDIR/
fi
done
```
Then `/sbin/chzdev --is-author- of-udev- rule "$rules"` should produce the correct exit code. The tool that generates the udev rules should be queried (is that chzdev or something else?) or a separate helper should be used.