aboutsummaryrefslogtreecommitdiffstats
path: root/initramfs-init.in
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2013-11-07 13:07:41 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2013-11-07 13:07:41 +0000
commitdc56dd054668edb8ee2e9f7fdfd304f14bfa8995 (patch)
tree47c36aa3c3dbdfeac6c51eab9c3a777543a6c2ac /initramfs-init.in
parentac42eb30791e447336ae4760513ed353d3d7993d (diff)
downloadmkinitfs-dc56dd054668edb8ee2e9f7fdfd304f14bfa8995.tar.bz2
mkinitfs-dc56dd054668edb8ee2e9f7fdfd304f14bfa8995.tar.xz
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.
Diffstat (limited to 'initramfs-init.in')
-rwxr-xr-xinitramfs-init.in21
1 files changed, 9 insertions, 12 deletions
diff --git a/initramfs-init.in b/initramfs-init.in
index 0050787..0c10a19 100755
--- a/initramfs-init.in
+++ b/initramfs-init.in
@@ -22,13 +22,13 @@ mount -t sysfs -o noexec,nosuid,nodev sysfs /sys
# 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 @@ find_boot_repositories() {
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 @@ for opt; do
done
done
+[ "$KOPT_quiet" = yes ] || echo "Alpine Init $VERSION"
+
# enable debugging if requested
[ -n "$KOPT_debug_init" ] && set -x
@@ -598,7 +597,7 @@ case "$OVL_DEV" in
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 @@ if [ -f "$sysroot/etc/.default_boot_services" -o ! -f "$ovl" ]; then
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 @@ done
# 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 @@ else
apkflags="$apkflags --update-cache"
fi
-if [ -n "$KOPT_quiet" ]; then
+if [ "$KOPT_quiet" = yes ]; then
apkflags="$apkflags --quiet"
fi
@@ -720,9 +717,9 @@ if [ "$KOPT_keep_apk_new" != yes ]; then
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 $?