Package: lsb-base Version: 3.2-12 Severity: wishlist Tags: patch
It will usefull to add some hooks into functions in init-functions. I can override functions in this file from /etc/lsb-base-logging.sh, but I can't use original functions from init-functions and add only some functionality. I must rewrite whole functions - for simple ones it is not problem. I propose adding pre and post hook functions. Everyone, who wants to enhance functionality can change these hooks (e.g. splashy) and output will be same as with original scripts. -- System Information: Debian Release: lenny/sid APT prefers testing APT policy: (500, 'testing') Architecture: i386 (i686) Kernel: Linux 2.6.21 Locale: LANG=cs_CZ.UTF-8, LC_CTYPE=cs_CZ.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages lsb-base depends on: ii ncurses-bin 5.6+20080308-1 Terminal-related programs and man ii sed 4.1.5-6 The GNU sed stream editor lsb-base recommends no packages. -- no debconf information -- Jezz mail: [EMAIL PROTECTED] jabber: [EMAIL PROTECTED]
--- /lib/lsb/init-functions 2008-05-01 17:07:37.000000000 +0200
+++ init-functions 2008-07-12 09:42:56.042988681 +0200
@@ -223,6 +223,7 @@
if [ -z "${1:-}" ]; then
return 1
fi
+ log_daemon_msg_pre "$@"
if [ -z "${2:-}" ]; then
echo -n "$1:"
@@ -230,6 +231,7 @@
fi
echo -n "$1: $2"
+ log_daemon_msg_post "$@"
}
# #319739
@@ -261,6 +263,7 @@
if [ -z "${1:-}" ]; then
return 1
fi
+ log_end_msg_pre "$@"
# Only do the fancy stuff if we have an appropriate terminal
# and if /usr is already mounted
@@ -279,6 +282,7 @@
echo " failed!"
fi
fi
+ log_end_msg_post "$@"
return $1
}
@@ -295,6 +299,7 @@
}
log_action_end_msg () {
+ log_action_end_msg_pre "$@"
if [ -z "${2:-}" ]; then
end="."
else
@@ -312,7 +317,16 @@
echo "failed${end}"
fi
fi
+ log_action_end_msg_post "$@"
}
+# Hooks for /etc/lsb-base-logging.sh
+log_daemon_msg_pre () { :; }
+log_daemon_msg_post () { :; }
+log_end_msg_pre () { :; }
+log_end_msg_post () { :; }
+log_action_end_msg_post () { :; }
+log_action_end_msg_post () { :; }
+
FANCYTTY=
[ -e /etc/lsb-base-logging.sh ] && . /etc/lsb-base-logging.sh || true
signature.asc
Description: Digital signature

