1
[alpine-aports] [PATCH] fix: cannot blacklist more than 2 modules
Use 'tr' instead of shell subtitution, because only first ',' char will be
replaced by shell subtitution
See: https://bugs.alpinelinux.org/issues/7954
---
initramfs-init.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/initramfs-init.in b/initramfs-init.in
index f3a3ee5..2574ccb 100755
--- a/initramfs-init.in
+++ b/initramfs-init.in
@@ -325,7 +325,7 @@ ALPINE_REPO=${KOPT_alpine_repo}
[ "$KOPT_quiet" = yes ] && dmesg -n 1
# optional blacklist
-for i in ${KOPT_blacklist/,/ }; do
+for i in $(echo "$KOPT_blacklist" | tr ',' ' ' ); do
echo "blacklist $i" >> /etc/modprobe.d/boot-opt-blacklist.conf
done
--
2.14.2
---
Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org
Help: alpine-aports+help@lists.alpinelinux.org
---
Re: [alpine-aports] fix: cannot blacklist more than 2 modules
On Tue, 3 Oct 2017 15:21:24 +0700
Kurnia D Win <kurnia.d.win@gmail.com> wrote:
> Use 'tr' instead of shell subtitution, because only first ',' char
> will be replaced by shell subtitution
>
> See: https://bugs.alpinelinux.org/issues/7954
Thanks for finding the issue.
> ---
> initramfs-init.in | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/initramfs-init.in b/initramfs-init.in
> index f3a3ee5..2574ccb 100755
> --- a/initramfs-init.in
> +++ b/initramfs-init.in
> @@ -325,7 +325,7 @@ ALPINE_REPO=${KOPT_alpine_repo}
> [ "$KOPT_quiet" = yes ] && dmesg -n 1
>
> # optional blacklist
> -for i in ${KOPT_blacklist/,/ }; do
> +for i in $(echo "$KOPT_blacklist" | tr ',' ' ' ); do
> echo "blacklist $i"
> >> /etc/modprobe.d/boot-opt-blacklist.conf done
Please use instead ${foo//,/ } which is a global substitution. Forking
is slower.
---
Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org
Help: alpine-aports+help@lists.alpinelinux.org
---