From 2c72958bfc090b046e21e9eaad9134235095ad30 Mon Sep 17 00:00:00 2001 From: Jeff Bailey Date: Thu, 30 Jun 2005 00:05:01 +0000 Subject: * Use detailed logging now for debian/changelog. We have at least three people hacking now, and details would probably be useful. * debian/TODO: Update * debian/dirs: Sort and add usr/share/initramfs-tools/hooks * debian/initramfs-tools.examples: Add docs/example_hook and docs/example_hook_cpiogz * debian/initramfs-tools.install: Pretty Print. * debian/rules: Ensure that mkinitramfs is executable * docs/example_script: New file * init: Add concept of 'quiet', be verbose if not specified * mkinitramfs: Do not load script functions until needed Clear up comments / documentation Use DESTDIR instead of TMPDIR Add ability to link in extra hunks into the cpio file Cosmetic cleanups * scripts/functions: Add lsb stype log_FOO_msg functions * scripts/local: Add logging * scripts/nfs: Add logging --- scripts/functions | 39 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) (limited to 'scripts/functions') diff --git a/scripts/functions b/scripts/functions index 5fb8c04..1899a14 100644 --- a/scripts/functions +++ b/scripts/functions @@ -1,9 +1,45 @@ # -*- shell-script -*- +_log_msg() +{ + if [ "$quiet" = "y" ]; then return; fi + echo "$@" +} + +log_success_msg() +{ + _log_msg "Success: $@" +} + +log_failure_msg() +{ + _log_msg "Failure: $@" +} + +log_warning_msg() +{ + _log_msg "Warning: $@" +} + +log_begin_msg() +{ + _log_msg "Begin: $@ ..." +} + +log_end_msg() +{ + _log_msg "Done." +} + +# update_progress() # ToDo: NOP placeholder... what else for usplash? +# { +# : +# } + panic() { echo $@ - FS1='(initramfs) ' exec /bin/sh + FS1='(initramfs) ' exec /bin/sh /dev/console 2>&1 } render() @@ -162,5 +198,4 @@ load_modules() done ide_boot_events - } -- cgit v1.2.3