Patches for aports can be sent to this list

1

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

Kurnia D Win
Details
Message ID
<20171003082124.25237-1-kurnia.d.win@gmail.com>
Sender timestamp
1507018884
DKIM signature
missing
Download raw message
Patch: +1 -1
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

Timo Teras
Details
Message ID
<20171020083642.4205eac8@vostro.util.wtbts.net>
In-Reply-To
<20171003082124.25237-1-kurnia.d.win@gmail.com> (view parent)
Sender timestamp
1508477802
DKIM signature
missing
Download raw message
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
---