From 9cc9dd7ad43c907b513f9fef58ee449004ec38b0 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 12 Oct 2009 01:31:46 +0200 Subject: [PATCH] initramfs-tools: update to 0.93.2_11. * Remove usplash stuff from all code, I won't use it. * Print log_msg messages in bold. * Use dmesg from busybox and set it to -n1 to avoid polluting the console with unwanted messages. --HG-- extra : convert_revision : 53c9d6628bb9649f148e77c358578494db0d01da --- templates/initramfs-tools/files/init | 21 +++++++++++-------- .../initramfs-tools/files/scripts/functions | 17 +++++---------- templates/initramfs-tools/files/scripts/local | 6 ------ templates/initramfs-tools/template | 2 +- 4 files changed, 18 insertions(+), 28 deletions(-) diff --git a/templates/initramfs-tools/files/init b/templates/initramfs-tools/files/init index af5c9bd485e..ac77d019d05 100755 --- a/templates/initramfs-tools/files/init +++ b/templates/initramfs-tools/files/init @@ -1,15 +1,18 @@ #!/bin/sh -echo "Loading, please wait..." +echo "Starting up the initramfs, please wait..." # Create some required busybox symlinks. if [ -x /bin/busybox ]; then for f in cut touch tr grep awk tail basename ls cp rm \ - head expr du; do + head expr du sed rmdir; do busybox ln -s /bin/busybox /bin/${f} done + rm -f /bin/dmesg + busybox ln -s /bin/busybox /bin/dmesg busybox ln -s /bin/busybox /sbin/pkill fi +dmesg -n1 [ -d /dev ] || mkdir -m 0755 /dev [ -d /root ] || mkdir -m 0700 /root @@ -189,14 +192,14 @@ fi depmod -a maybe_break top - -# Don't do log messages here to avoid confusing usplash +[ "$quiet" != "y" ] && log_begin_msg "Running /scripts/init-top" run_scripts /scripts/init-top +[ "$quiet" != "y" ] && log_end_msg maybe_break modules -log_begin_msg "Loading essential drivers" +[ "$quiet" != "y" ] && log_begin_msg "Loading essential drivers" load_modules -log_end_msg +[ "$quiet" != "y" ] && log_end_msg maybe_break premount [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/init-premount" @@ -204,12 +207,12 @@ run_scripts /scripts/init-premount [ "$quiet" != "y" ] && log_end_msg maybe_break mount -log_begin_msg "Mounting root file system" +[ "$quiet" != "y" ] && log_begin_msg "Mounting root file system" . /scripts/${BOOT} parse_numeric ${ROOT} maybe_break mountroot mountroot -log_end_msg +[ "$quiet" != "y" ] && log_end_msg maybe_break bottom [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/init-bottom" @@ -263,5 +266,5 @@ unset resume unset resume_offset # Chain to real filesystem -exec run-init ${rootmnt} ${init} "$@" <${rootmnt}/dev/console >${rootmnt}/dev/console +exec run-init ${rootmnt} ${init} "$@" panic "Could not execute run-init." diff --git a/templates/initramfs-tools/files/scripts/functions b/templates/initramfs-tools/files/scripts/functions index b8135296ee9..eaaf7d907c5 100644 --- a/templates/initramfs-tools/files/scripts/functions +++ b/templates/initramfs-tools/files/scripts/functions @@ -2,8 +2,10 @@ _log_msg() { - if [ "$quiet" = "y" ]; then return; fi + [ "$quiet" = "y" ] && return + printf "\033[1m" printf "$@" + printf "\033[m\n" } log_success_msg() @@ -23,25 +25,16 @@ log_warning_msg() log_begin_msg() { - if [ -x /sbin/usplash_write ]; then - /sbin/usplash_write "TEXT $@" - fi - _log_msg "Begin: $@ ... " + _log_msg "$@ ..." } log_end_msg() { - if [ -x /sbin/usplash_write ]; then - /sbin/usplash_write "SUCCESS ok" - fi - _log_msg "done.\n" + : } panic() { - if [ -x /sbin/usplash_write ]; then - /sbin/usplash_write "QUIT" - fi # Disallow console access if [ -n "${panic}" ]; then sleep ${panic} diff --git a/templates/initramfs-tools/files/scripts/local b/templates/initramfs-tools/files/scripts/local index 0838ed8c933..77ac68e262d 100644 --- a/templates/initramfs-tools/files/scripts/local +++ b/templates/initramfs-tools/files/scripts/local @@ -49,9 +49,6 @@ pre_mountroot() else slumber=${ROOTDELAY} fi - if [ -x /sbin/usplash_write ]; then - /sbin/usplash_write "TIMEOUT ${slumber}" || true - fi slumber=$(( ${slumber} * 10 )) while [ ! -e "${ROOT}" ] \ @@ -66,9 +63,6 @@ pre_mountroot() else log_end_msg 1 || true fi - if [ -x /sbin/usplash_write ]; then - /sbin/usplash_write "TIMEOUT 15" || true - fi fi # We've given up, but we'll let the user fix matters if they can diff --git a/templates/initramfs-tools/template b/templates/initramfs-tools/template index 38b12c8d114..ee04dd38663 100644 --- a/templates/initramfs-tools/template +++ b/templates/initramfs-tools/template @@ -1,7 +1,7 @@ # Template file for 'initramfs-tools' pkgname=initramfs-tools version=0.93.2 -revision=10 +revision=11 build_style=custom-install short_desc="Tools for generating an initramfs" maintainer="Juan RP "