[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#440694: initramfs-tools: hook-functions:dep_add_modules() breaks with /dev/md/x device names



Package: initramfs-tools
Version: 0.90a

Hello,

using a device name like /dev/md/0 or /dev/md/root as root device breaks
the creation of the intramfs-image because of an syntax error in the awk
script in dep_add_modules():
		block=$(awk "/^${root}/{print substr(\$5, 1, 3); exit}" \
			/proc/mdstat)
which then gets expanded to something like awk /^md/x/, which is, of
course, syntactically incorrect. A possible solution would be to escape
/-es in $root before... `root=${root//\//\\/}' should do the trick.


regards
   Mario
-- 
I've never been certain whether the moral of the Icarus story should
only be, as is generally accepted, "Don't try to fly too high," or
whether it might also be thought of as, "Forget the wax and feathers
and do a better job on the wings."            -- Stanley Kubrick

Attachment: signature.asc
Description: Digital signature


Reply to: