summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Prokop <mika@debian.org>2010-06-08 11:10:01 +0200
committerMichael Prokop <mika@debian.org>2010-06-08 11:10:01 +0200
commit90d76d566f7597d9826606b8b5cec62b50c44096 (patch)
tree3b65f8fc9ac3cbc6c85c3f1c05093c2c8e815d8c
parentb1c242ffc5762fea6c15fe880e352008a5c34c43 (diff)
downloadinitramfs-tools-90d76d566f7597d9826606b8b5cec62b50c44096.tar.gz
initramfs-tools-90d76d566f7597d9826606b8b5cec62b50c44096.zip
Support dashes inside scripts names.
[Closes: #566056] Signed-off-by: Michael Prokop <mika@debian.org>
-rw-r--r--initramfs-tools.84
-rwxr-xr-xmkinitramfs4
-rw-r--r--scripts/functions4
3 files changed, 6 insertions, 6 deletions
diff --git a/initramfs-tools.8 b/initramfs-tools.8
index 0a15574..fd00429 100644
--- a/initramfs-tools.8
+++ b/initramfs-tools.8
@@ -9,8 +9,8 @@ will be used during different phases of execution. Each of these will be
discussed separately below with the help of an imaginary tool which performs a
frobnication of a lvm partition prior to mounting the root partition.
-Valid boot and hook scripts names consist solely of alphabetics, numerics
-and underscores. Other scripts are discarded.
+Valid boot and hook scripts names consist solely of alphabetics, numerics,
+dashes and underscores. Other scripts are discarded.
.SS Hook scripts
These are used when an initramfs image is created and not included in the
diff --git a/mkinitramfs b/mkinitramfs
index e54c77f..04eae42 100755
--- a/mkinitramfs
+++ b/mkinitramfs
@@ -229,14 +229,14 @@ cp -p /usr/share/initramfs-tools/init ${DESTDIR}/init
# add existant boot scripts
for b in $(cd /usr/share/initramfs-tools/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 "/usr/share/initramfs-tools/scripts/${b}" \
"${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}")/"
diff --git a/scripts/functions b/scripts/functions
index 1cc9be6..8730d52 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -74,7 +74,7 @@ set_initlist()
# only allow variable name chars
case ${si_x#${initdir}/} in
- *[![:alnum:]_.]*)
+ *[![:alnum:]\._-]*)
[ "${verbose}" = "y" ] \
&& echo "$si_x ignored: not alphanumeric or '_' file"
continue
@@ -106,7 +106,7 @@ reduce_satisfied()
for rs_y in ${deplist}; do
# only allow variable name chars
case ${rs_y} in
- *[![:alnum:]_.]*)
+ *[![:alnum:]\._-]*)
continue
;;
esac