update-initramfs ignores custom scripts in /etc/initramfs-tools/scripts

Bug #725144 reported by Igor
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
initramfs-tools
New
Undecided
Unassigned

Bug Description

I am attempting to customize my initrd. I have added a script to /etc/initramfs-tools/scripts/init-top as instructed in the initramfs-tools man page. I then rebuild my initrd using `update-initramfs`.

When I verify the contents of the resulting initrd image (using the gzip/cpio command given in the man page), I do not see my custom script in the /scripts folder. I have tried both the '-c' and the '-u' flags to `update-initramfs`.

I am experimenting on an up-to-date 10.04.2

Revision history for this message
Igor (igor47) wrote :

i figured out the problem. i strace'ed update-initramfs and noticed it was cd'ing into /etc/initramfs-tools/scripts and then looking for scripts using the following `find` command:

find . -regextype posix-extended -regex '.*/[[:alnum:]_]+$' -type f

i had named my script network-order.sh, and so it was not being matched by the regexp. i think the solution is to either update the documentation to indicate that custom scripts must only contain alphanumeric characters or update the regular expression to include additional characters. one likely regexp is '.*/[^/]+$' but i don't speak posix-extended so i'll leave this for someone else to translate

Revision history for this message
Kristian Lyngstøl (kristianlyng) wrote :

Ok, so this is fixed already:

http://git.debian.org/?p=kernel/initramfs-tools.git;a=commit;h=97f26c6e0d61a4ff700b8f79c61a41320f317e2e

https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/305837

However, the bigger issue is lack of feedback. Oh, and the dot isn't added to the documentation, even though it's allowed. There is documentation for this, though, but when there's no feedback on what's happening, it's impossible to know where to look or what to look for.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.