home: hub: mkinitfs

Download patch

ref: dc56dd054668edb8ee2e9f7fdfd304f14bfa8995
parent: ac42eb30791e447336ae4760513ed353d3d7993d
author: Natanael Copa <ncopa@alpinelinux.org>
date: Thu Nov 7 07:07:41 CST 2013

init: improve boot output

- Don't redirect apk stdout ouput to /dev/null. recent apk has the
  progressbar on stdout.
- Fix noquiet boot option
- Dont't display Init version by default as it gests confused with
  Alpine release.

--- a/initramfs-init.in
+++ b/initramfs-init.in
@@ -22,13 +22,13 @@
 # some helpers
 ebegin() {
 	last_emsg="$*"
-	[ -n "$KOPT_quiet" ] && return 0
+	[ "$KOPT_quiet" = yes ] && return 0
 	echo -n " * $last_emsg: "
 }
 eend() {
 	local msg
 	if [ "$1" = 0 ] || [ $# -lt 1 ] ; then
-		[ -n "$KOPT_quiet" ] && return 0
+		[ "$KOPT_quiet" = yes ] && return 0
 		echo "ok."
 	else
 		shift
@@ -363,9 +363,6 @@
 	fi
 }
 
-# gotta start from somewhere :)
-echo "Alpine Init $VERSION"
-
 # read the kernel options. We use eval set so we can handle things like
 # acpi_osi="!Windows 2006"
 eval set -- `cat /proc/cmdline`
@@ -395,6 +392,8 @@
 	done
 done
 
+[ "$KOPT_quiet" = yes ] || echo "Alpine Init $VERSION"
+
 # enable debugging if requested
 [ -n "$KOPT_debug_init" ] && set -x
 
@@ -598,7 +597,7 @@
 		if [ -n "$OVL_DEV_FS" ]; then
 			mount_opts="-t $OVL_DEV_FS"
 		fi
-		
+
 		retry_mount -o ro $mount_opts /dev/$OVL_DEV /media/$OVL_DEV \
 			>/dev/null 2>&1
 		ovl=$(find_ovl /media/$OVL_DEV)
@@ -651,7 +650,7 @@
 	rc_add hostname boot
 	rc_add bootmisc boot
 	rc_add syslog boot
-	
+
 	rc_add mount-ro shutdown
 	rc_add killprocs shutdown
 	rc_add savecache shutdown
@@ -696,8 +695,6 @@
 
 # install new root
 ebegin "Installing packages to root filesystem"
-# insert newline unless quiet to fix progress bar
-[ -n "$KOPT_quiet" ] || echo ""
 
 if [ "$KOPT_chart" = yes ]; then
 	pkgs="$pkgs acct"
@@ -710,7 +707,7 @@
 	apkflags="$apkflags --update-cache"
 fi
 
-if [ -n "$KOPT_quiet" ]; then
+if [ "$KOPT_quiet" = yes ]; then
 	apkflags="$apkflags --quiet"
 fi
 
@@ -720,9 +717,9 @@
 fi
 
 if [ -n "$ovlfiles" ]; then
-	apk add --root $sysroot $repo_opt $apkflags $pkgs <$ovlfiles>/dev/null
+	apk add --root $sysroot $repo_opt $apkflags $pkgs <$ovlfiles
 else
-	apk add --root $sysroot $repo_opt $apkflags $pkgs >/dev/null
+	apk add --root $sysroot $repo_opt $apkflags $pkgs
 fi
 eend $?