Mail archive
alpine-aports

Re: [alpine-aports] fix: cannot blacklist more than 2 modules

From: Timo Teras <timo.teras_at_iki.fi>
Date: Fri, 20 Oct 2017 08:36:42 +0300

On Tue, 3 Oct 2017 15:21:24 +0700
Kurnia D Win <kurnia.d.win_at_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
> _at_@ -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_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Fri Oct 20 2017 - 08:36:42 GMT