From 2b382bf18e47765e9f3bb1963008f8ee1a46cf97 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 16 Apr 2007 20:33:52 +0200 Subject: fix regexes to always use posix char classes and release 0.87 needs the -regextype posix-extended switch for find, also it seems 0.86 disgarded uselessly uppercase scripts (they might be distasteful ;) --- debian/changelog | 7 +++++-- mkinitramfs | 8 +++++--- scripts/functions | 4 ++-- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/debian/changelog b/debian/changelog index c5a5e01..0d77ff9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -initramfs-tools (0.87) UNRELEASED; urgency=low +initramfs-tools (0.87) unstable; urgency=low [ maximilian attems ] * scripts/functions: reduce_satisfied() needs to ignore the same set as @@ -6,6 +6,9 @@ initramfs-tools (0.87) UNRELEASED; urgency=low boot script may cause circular panic. (closes: 418509) * Add blacklist boot param, disabling the load of specific modules inside the initramfs. Still needs to be passed via tmpfs to the rootfs. + * mkinitramfs, scripts/functions: Fix regexes to always use posix character + classes. Based on a patch by Meelis Roos . + (closes: 419062) [ David Härdeman ] * Add support for loading keymaps. (closes: 337663) @@ -16,7 +19,7 @@ initramfs-tools (0.87) UNRELEASED; urgency=low * Bump standards version, no changes necessary. * debian/scripts: Print settings from initramfs.conf in reportbug script. - -- maximilian attems Mon, 16 Apr 2007 19:54:04 +0200 + -- maximilian attems Mon, 16 Apr 2007 20:21:30 +0200 initramfs-tools (0.86) unstable; urgency=low diff --git a/mkinitramfs b/mkinitramfs index b3514fc..e7b9b13 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -84,7 +84,8 @@ fi . "${CONFDIR}/initramfs.conf" EXTRA_CONF='' for i in /usr/share/initramfs-tools/conf.d/* ${CONFDIR}/conf.d/*; do - EXTRA_CONF="${EXTRA_CONF} $(basename $i | grep '^[a-z0-9][a-z0-9\._-]*$' | grep -v '\.dpkg-.*$')"; + EXTRA_CONF="${EXTRA_CONF} $(basename $i \ + | grep '^[[:alnum:]][[:alnum:]\._-]*$' | grep -v '\.dpkg-.*$')"; done for i in ${EXTRA_CONF}; do if [ -e ${CONFDIR}/conf.d/${i} ]; then @@ -204,13 +205,14 @@ copy_exec /usr/share/initramfs-tools/init /init # add existant boot scripts for b in $(cd /usr/share/initramfs-tools/scripts/ && find . \ - -regex '.*/[a-z0-9_]+$' -type f); do + -regextype posix-extended -regex '.*/[[:alnum:]_]+$' -type f); do [ -d "${DESTDIR}/scripts/$(dirname "${b}")" ] \ || mkdir -p "${DESTDIR}/scripts/$(dirname "${b}")" cp -p "/usr/share/initramfs-tools/scripts/${b}" \ "${DESTDIR}/scripts/$(dirname "${b}")" done -for b in $(cd "${CONFDIR}/scripts" && find . -regex '.*/[a-z0-9_]+$' -type f); do +for b in $(cd "${CONFDIR}/scripts" && find . \ + -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}")" diff --git a/scripts/functions b/scripts/functions index 00fcf3d..0b8d1e8 100644 --- a/scripts/functions +++ b/scripts/functions @@ -87,7 +87,7 @@ set_initlist() for si_x in ${initdir}/*; do # only allow variable name chars case ${si_x#${initdir}/} in - *[!A-Za-z0-9_]*) + *[![:alnum:]_]*) continue ;; esac @@ -110,7 +110,7 @@ reduce_satisfied() for rs_y in ${deplist}; do # only allow variable name chars case ${rs_y} in - *[!A-Za-z0-9_]*) + *[![:alnum:]_]*) continue ;; esac -- cgit v1.2.3