kmod: Beef up firmware symlink chasing
- It turns out we need to handle absolutely symlinks after all as
/usr/lib/firmware/regulatory.db is a symlink to /etc/alternatives
in Debian and derivatives.
- Our previous implementation didn't handle cases where a symlink target
consisted out of two parts e.g. if C -> A/B then we wouldn't try to resolve
A.
Fix both issues by switching to a minimal implementation of the chase()
function in systemd.
To avoid having to include /etc stuff in the kernel modules initrd, we resolve
get rid of any intermediate symlinks to /etc/alternatives that we encounter.
Follow up for
221293e33defe30b111bc13957a0d52d2ea1c45b