Mail archive
alpine-devel

[alpine-devel] [PATCH 3/4] init: make mdadm quiet

From: Jesse Young <jlyo_at_jlyo.org>
Date: Sun, 13 Sep 2015 15:41:48 -0500

---
 initramfs-init.in | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/initramfs-init.in b/initramfs-init.in
index d687e64..78500aa 100755
--- a/initramfs-init.in
+++ b/initramfs-init.in
_at_@ -227,12 +227,14 @@ setup_inittab_console(){
 
 start_raid() {
 	local n= i=
+	local mdadm_flags=
 	case "$KOPT_root" in
 		/dev/md*) n=${KOPT_root#/dev/md} ;;
 	esac
 	case "$KOPT_autoraid" in
 		[0-9]*) n="$n $(echo $KOPT_autoraid | tr ',' ' ')" ;;
 	esac
+	[ "$KOPT_quiet" = yes ] && mdadm_flags="$mdadm_flags -q"
 	# if kernel can autostart the raid he will
 	for i in $n; do
 		mknod /dev/md$i b 9 $i
_at_@ -241,7 +243,7 @@ start_raid() {
 	# kernel cannot autostart newer versions of mdadm metadata
 	# so we also check if mdadm binary is there
 	if [ -x /sbin/mdadm ]; then
-		mdadm --assemble --scan
+		mdadm $mdadm_flags --assemble --scan
 	fi
 }
 
-- 
2.4.1
---
Unsubscribe:  alpine-devel+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-devel+help_at_lists.alpinelinux.org
---
Received on Sun Sep 13 2015 - 15:41:48 UTC