some $prefix issues
|[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]|
Another thing is, that inst*() family of functions have no notion of $prefix at all, so - especially subsequent - calls to those functions will not really care. This could in certain cases lead to frictions, for example:
Suppose we have (on host): /bin -> usr/bin We run dracut with: --prefix=/run/intiramfs In part of the code preparing basic directory layout: ... $initdir/usr -> run/initramfs/usr ... will be pre-created (and dangling at this point)As bin is a symlink on the host (and dracut tries to mimic host's layout (?), we will have):
inst() /bin $prefix/bin which will call inst_symlink() with same arguments, effectively leading to: src: /bin realsrc: /usr/bin target: $initdir$prefix/binThere will be attempt to create $initdir/usr/bin, but there's already (dangling) symlink and mkdir attempt (after readlink) will fail.
This can be easily verified by making on the host: /binn -> usr/binnAnd adding binn to the relevant layout-creating loops, which will lead to something like:
mkdir: cannot create directory `/var/tmp/initramfs.C2ifhw/usr': File existsLast thing - /run remains mounted inside intramfs after mount --bind currently. With simple /run symlink to movable mount and without being forced to care if it suddenly loses binaries - it could be cleanly moved to real root almost atomically.
It's all fixable in one or the other way, but is --prefix functionality actually needed for something specific ? after pivot peeking/extracting is just a matter of cat/cpio or lsinitrd, or anything similar.
-- To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html