[Pkg-kbd-devel] Bug#386844: console-setup: use LSB logging
functions in init script
Colin Watson
cjwatson at ubuntu.com
Sun Sep 10 16:00:56 UTC 2006
Package: console-setup
Version: 1.7
Severity: wishlist
The attached patch converts console-setup's init scripts to use the LSB
logging functions now used by many other init scripts. This allows them,
for example, to produce the style of init script output used by Ubuntu
without the need for direct changes to the init script.
Thanks,
--
Colin Watson [cjwatson at ubuntu.com]
-------------- next part --------------
--- console-setup-1.7.orig/debian/console-setup.console-setup.init 2006-07-22 21:05:55.000000000 +0100
+++ console-setup-1.7/debian/console-setup.console-setup.init 2006-09-06 21:26:26.000000000 +0100
@@ -4,6 +4,8 @@
test -f /bin/setupcon || exit 0
+. /lib/lsb/init-functions
+
case "$1" in
stop)
# console-setup isn't a daemon
@@ -11,9 +13,12 @@
start|force-reload|restart|reload)
case `readlink /proc/self/fd/2` in
/dev/tty[0-9]*|/dev/vc/[0-9]*|/dev/console)
- echo -n "Setting up font and keyboard on the console... "
- setupcon
- echo done.
+ log_action_begin_msg "Setting up console font and keymap"
+ if setupcon; then
+ log_action_end_msg 0
+ else
+ log_action_end_msg $?
+ fi
;;
*)
exit 0
--- console-setup-1.7.orig/debian/console-setup.keyboard-setup.init 2006-07-22 21:05:55.000000000 +0100
+++ console-setup-1.7/debian/console-setup.keyboard-setup.init 2006-09-06 21:26:28.000000000 +0100
@@ -4,6 +4,8 @@
test -f /bin/setupcon || exit 0
+. /lib/lsb/init-functions
+
case "$1" in
stop)
# keyboard-setup isn't a daemon
@@ -11,9 +13,12 @@
start|force-reload|restart|reload)
case `readlink /proc/self/fd/2` in
/dev/tty[0-9]*|/dev/vc/[0-9]*|/dev/console)
- echo -n "Preliminary setting the keyboard on the console... "
- setupcon -k
- echo done.
+ log_action_begin_msg "Setting preliminary keymap..."
+ if setupcon -k; then
+ log_action_end_msg 0
+ else
+ log_action_end_msg $?
+ fi
;;
*)
exit 0
--- console-setup-1.7.orig/debian/control 2006-07-22 21:05:55.000000000 +0100
+++ console-setup-1.7/debian/control 2006-09-07 09:02:08.000000000 +0100
@@ -11,7 +11,7 @@
Section: utils
Architecture: all
Recommends: kbd (>= 0.99-12) | console-tools (>= 1:0.2.3-16)
-Depends: debconf (>= 0.5) | debconf-2.0, console-terminus (>= 4.16), xkb-data
+Depends: debconf (>= 0.5) | debconf-2.0, console-terminus (>= 4.16), xkb-data, lsb-base (>= 3.0-6)
Description: Setup the font and the keyboard on the console
The package provides the Linux console with the same versatile
keyboard configuration that X Window uses. As a result there is no
@@ -30,7 +30,7 @@
Priority: extra
Architecture: all
Recommends: kbd | console-tools
-Depends: debconf (>= 0.5) | debconf-2.0
+Depends: debconf (>= 0.5) | debconf-2.0, lsb-base (>= 3.0-6)
Conflicts: console-setup, console-terminus
Description: An experimental micro version of console-setup package
This package can be useful when Debian system is installed on
More information about the Pkg-kbd-devel
mailing list