No dots in script filenames?

Bug #305837 reported by Radu Cristescu
2
Affects Status Importance Assigned to Milestone
initramfs-tools (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: initramfs-tools

Hi,

Files placed in the scripts directory can no longer have a dot in their names (i.e. no script.sh files in there). This worked in Hardy. Is there a reason for this?

A friend pasted me this patch, but I think it may need more than just the dot in the expression (spacing may be badly messed up):

--- /usr/sbin/mkinitramfs.orig 2008-07-16 12:09:55.000000000 +0200
+++ /usr/sbin/mkinitramfs 2008-11-29 23:09:09.000000000 +0100
 -232,7 +232,7 @@
                "${DESTDIR}/scripts/$(dirname "${b}")/"
 done
 for b in $(cd "${CONFDIR}/scripts" && find . \
- -regextype posix-extended -regex '.*/[[:alnum:]_]+$' -type f); do
+ -regextype posix-extended -regex '.*/[[:alnum:]_.]+$' -type f); do
        [ -d "${DESTDIR}/scripts/$(dirname "${b}")" ] \
                || mkdir -p "${DESTDIR}/scripts/$(dirname "${b}")"
        cp -p "${CONFDIR}/scripts/${b}" "${DESTDIR}/scripts/$(dirname "${b}")/"
--- /usr/share/initramfs-tools/scripts/functions.orig 2008-10-01 15:15:48.000000000 +0200
+++ /usr/share/initramfs-tools/scripts/functions 2008-11-29 23:50:52.000000000 +0100
 -110,7 +110,7 @@

                # only allow variable name chars
                case ${si_x#${initdir}/} in
- *[![:alnum:]_]*)
+ *[![:alnum:]_.]*)
                        [ "${verbose}" = "y" ] \
                        && echo "$si_x ignored: not alphanumeric or '_' file"
                        continue

Hardy didn't seem to use regular expressions at all.

I think a bug report like LP:78348 that prompted such a change, but I can't see anything specific to this change in the changelog.

Radu Cristescu (radu.c)
description: updated
Revision history for this message
Andy Whitcroft (apw) wrote :

I do not know exactly when this was resolved, but the regexps in question now include ".".

Changed in initramfs-tools (Ubuntu):
status: New → Fix Committed
Revision history for this message
Benjamin Drung (bdrung) wrote :

This change was applied in commit 97f26c6e0d61a4ff700b8f79c61a41320f317e2e and released in initramfs-tools 0.93.2.

Changed in initramfs-tools (Ubuntu):
status: Fix Committed → Fix Released
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.