Merge lp:~pali/ubuntu/oneiric/lsb/lsb into lp:ubuntu/oneiric/lsb

Proposed by Pali
Status: Work in progress
Proposed branch: lp:~pali/ubuntu/oneiric/lsb/lsb
Merge into: lp:ubuntu/oneiric/lsb
Diff against target: 113 lines (+34/-23)
1 file modified
lsb-base-logging-ubuntu.sh (+34/-23)
To merge this branch: bzr merge lp:~pali/ubuntu/oneiric/lsb/lsb
Reviewer Review Type Date Requested Status
Ubuntu branches Pending
Review via email: mp+68212@code.launchpad.net

Description of the change

Write System V init script boot messages to plymouth. It needs this patch:
https://code.launchpad.net/~pali/ubuntu/natty/plymouth/plymouth/+merge/61897

To post a comment you must log in.
Revision history for this message
Martin Pitt (pitti) wrote :

This is blocked on landing https://code.launchpad.net/~pali/ubuntu/natty/plymouth/plymouth/+merge/61897 upstream first, and then needs an update to the current package. I'm setting this to "work in progress", please set back to "needs review" once above happened. Thanks!

Unmerged revisions

45. By Pali

Write System V init script boot messages to plymouth

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lsb-base-logging-ubuntu.sh'
2--- lsb-base-logging-ubuntu.sh 2011-04-25 17:13:43 +0000
3+++ lsb-base-logging-ubuntu.sh 2011-07-18 06:24:34 +0000
4@@ -1,6 +1,5 @@
5 # Default init script logging functions suitable for Ubuntu.
6 # See /lib/lsb/init-functions for usage help.
7-LOG_DAEMON_MSG=""
8
9 log_use_plymouth () {
10 if [ "${loop:-n}" = y ]; then
11@@ -9,12 +8,22 @@
12 plymouth --ping >/dev/null 2>&1
13 }
14
15+log_msg_plymouth () {
16+ plymouth message --text="log:$@"
17+}
18+
19 log_success_msg () {
20- echo " * $@"
21+ if log_use_plymouth; then
22+ log_msg_plymouth "$@"
23+ else
24+ echo " * $@"
25+ fi
26 }
27
28 log_failure_msg () {
29- if log_use_fancy_output; then
30+ if log_use_plymouth; then
31+ log_msg_plymouth "$@"
32+ elif log_use_fancy_output; then
33 RED=`$TPUT setaf 1`
34 NORMAL=`$TPUT op`
35 echo " $RED*$NORMAL $@"
36@@ -24,7 +33,9 @@
37 }
38
39 log_warning_msg () {
40- if log_use_fancy_output; then
41+ if log_use_plymouth; then
42+ log_msg_plymouth "$@"
43+ elif log_use_fancy_output; then
44 YELLOW=`$TPUT setaf 3`
45 NORMAL=`$TPUT op`
46 echo " $YELLOW*$NORMAL $@"
47@@ -42,6 +53,11 @@
48 return 1
49 fi
50
51+ if log_use_plymouth; then
52+ log_msg_plymouth "$@"
53+ return
54+ fi
55+
56 if log_use_fancy_output && $TPUT xenl >/dev/null 2>&1; then
57 COLS=`$TPUT cols`
58 if [ "$COLS" ] && [ "$COLS" -gt 6 ]; then
59@@ -51,15 +67,6 @@
60 COL=73
61 fi
62
63- if log_use_plymouth; then
64- # If plymouth is running, don't output anything at this time
65- # to avoid buffering problems (LP: #752393)
66- if [ -z "$LOG_DAEMON_MSG" ]; then
67- LOG_DAEMON_MSG=$*
68- return
69- fi
70- fi
71-
72 # We leave the cursor `hanging' about-to-wrap (see terminfo(5)
73 # xenl, which is approximately right). That way if the script
74 # prints anything then we will be on the next line and not
75@@ -92,16 +99,16 @@
76 return 1
77 fi
78
79+ if log_use_plymouth; then
80+ if [ "$1" -eq 0 ]; then
81+ log_msg_plymouth "ok"
82+ else
83+ log_msg_plymouth "failed"
84+ fi
85+ return $1
86+ fi
87+
88 if [ "$COL" ] && [ -x "$TPUT" ]; then
89- # If plymouth is running, print previously stored output
90- # to avoid buffering problems (LP: #752393)
91- if log_use_plymouth; then
92- if [ -n "$LOG_DAEMON_MSG" ]; then
93- log_daemon_msg $LOG_DAEMON_MSG
94- LOG_DAEMON_MSG=""
95- fi
96- fi
97-
98 printf "\r"
99 $TPUT hpa $COL
100 if [ "$1" -eq 0 ]; then
101@@ -124,7 +131,11 @@
102 }
103
104 log_action_msg () {
105- echo " * $@"
106+ if log_use_plymouth; then
107+ log_msg_plymouth "$@"
108+ else
109+ echo " * $@"
110+ fi
111 }
112
113 log_action_begin_msg () {

Subscribers

People subscribed via source and target branches

to all changes: