Package: plymouth / 0.9.2-4

0002-stderr.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
Author: Daniel Baumann <mail@daniel-baumann.ch>
Description:
 Use fd for stdout instead of device, since the latter may not always exist,
 e.g. in chroots (Closes: #581649).

diff -Naurp plymouth.orig/scripts/plymouth-populate-initrd.in plymouth/scripts/plymouth-populate-initrd.in
--- plymouth.orig/scripts/plymouth-populate-initrd.in
+++ plymouth/scripts/plymouth-populate-initrd.in
@@ -340,7 +340,7 @@ function usage() {
     local output="/dev/stdout"
     local rc=0
     if [ "$1" == "error" ]; then
-        output="/dev/stderr"
+        output=">&2"
         rc=1
     fi
 
@@ -385,20 +385,20 @@ inst ${PLYMOUTH_POLICYDIR}/plymouthd.def
 inst ${PLYMOUTH_CONFDIR}/plymouthd.conf $INITRDDIR
 
 if [ -z "$PLYMOUTH_THEME_NAME" ]; then
-    echo "No default plymouth plugin is set" > /dev/stderr
+    echo "No default plymouth plugin is set" >&2
     exit 1
 fi
 
 if [ $THEME_OVERRIDE ]; then
     conf=$INITRDDIR/${PLYMOUTH_CONFDIR}/plymouthd.conf
-    echo "modifying plymouthd.conf: Theme=$PLYMOUTH_THEME_NAME" > /dev/stderr
+    echo "modifying plymouthd.conf: Theme=$PLYMOUTH_THEME_NAME" >&2
     sed -i "s/^ *Theme *=.*/# theme modified by plymouth-populate-initrd\nTheme=$PLYMOUTH_THEME_NAME/" $conf
 fi
 
 PLYMOUTH_MODULE_NAME=$(grep "ModuleName *= *" ${PLYMOUTH_DATADIR}/plymouth/themes/${PLYMOUTH_THEME_NAME}/${PLYMOUTH_THEME_NAME}.plymouth | sed 's/ModuleName *= *//')
 
 if [ ! -f ${PLYMOUTH_PLUGIN_PATH}/${PLYMOUTH_MODULE_NAME}.so ]; then
-    echo "The default plymouth plugin (${PLYMOUTH_MODULE_NAME}) doesn't exist" > /dev/stderr
+    echo "The default plymouth plugin (${PLYMOUTH_MODULE_NAME}) doesn't exist" >&2
     exit 1
 fi
 
diff -Naurp plymouth.orig/scripts/plymouth-set-default-theme.in plymouth/scripts/plymouth-set-default-theme.in
--- plymouth.orig/scripts/plymouth-set-default-theme.in
+++ plymouth/scripts/plymouth-set-default-theme.in
@@ -76,14 +76,14 @@ while [ $# -gt 0 ]; do
 
         -l|--list)
                 if [ -n "$THEME_NAME" ]; then
-                        echo "You can only specify --list or a theme name, not both" > /dev/stderr
-                        echo $(usage) > /dev/stderr
+                        echo "You can only specify --list or a theme name, not both" >&2
+                        echo $(usage) >&2
                         exit 1
                 fi
 
                 if [ $DO_RESET -ne 0 ]; then
-                        echo "You can only specify --reset or --list, not both" > /dev/stderr
-                        echo $(usage) > /dev/stderr
+                        echo "You can only specify --reset or --list, not both" >&2
+                        echo $(usage) >&2
                         exit 1
                 fi
 
@@ -96,14 +96,14 @@ while [ $# -gt 0 ]; do
 
         -r|--reset|default)
                 if [ -n "$THEME_NAME" ]; then
-                        echo "You can only specify --reset or a theme name, not both" > /dev/stderr
-                        echo $(usage) > /dev/stderr
+                        echo "You can only specify --reset or a theme name, not both" >&2
+                        echo $(usage) >&2
                         exit 1
                 fi
 
                 if [ $DO_LIST -ne 0 ]; then
-                        echo "You can only specify --reset or --list, not both" > /dev/stderr
-                        echo $(usage) > /dev/stderr
+                        echo "You can only specify --reset or --list, not both" >&2
+                        echo $(usage) >&2
                         exit 1
                 fi
 
@@ -116,20 +116,20 @@ while [ $# -gt 0 ]; do
 
         *)
                 if [ -n "$THEME_NAME" ]; then
-                        echo "You can only specify one theme at a time" > /dev/stderr
-                        echo $(usage) > /dev/stderr
+                        echo "You can only specify one theme at a time" >&2
+                        echo $(usage) >&2
                         exit 1
                 fi
 
                 if [ $DO_RESET -ne 0 ]; then
-                        echo "You can only specify --reset or a theme name, not both" > /dev/stderr
-                        echo $(usage) > /dev/stderr
+                        echo "You can only specify --reset or a theme name, not both" >&2
+                        echo $(usage) >&2
                         exit 1
                 fi
 
                 if [ $DO_LIST -ne 0 ]; then
-                        echo "You can only specify --list or a theme name, not both" > /dev/stderr
-                        echo $(usage) > /dev/stderr
+                        echo "You can only specify --list or a theme name, not both" >&2
+                        echo $(usage) >&2
                         exit 1
                 fi
 
@@ -155,7 +155,7 @@ if [ $DO_RESET -eq 0 ] && [ $DO_INITRD_R
 fi
 
 if [ `id -u` -ne 0 ]; then
-        echo "This program must be run as root" > /dev/stderr
+        echo "This program must be run as root" >&2
         exit 1
 fi
 
@@ -166,14 +166,14 @@ if [ $DO_RESET -ne 0 ]; then
 fi
 
 if [ ! -e ${PLYMOUTH_DATADIR}/plymouth/themes/${THEME_NAME}/${THEME_NAME}.plymouth ]; then
-        echo "${PLYMOUTH_DATADIR}/plymouth/themes/${THEME_NAME}/${THEME_NAME}.plymouth does not exist" > /dev/stderr
+        echo "${PLYMOUTH_DATADIR}/plymouth/themes/${THEME_NAME}/${THEME_NAME}.plymouth does not exist" >&2
         exit 1
 fi
 
 MODULE_NAME=$(grep "ModuleName *= *" ${PLYMOUTH_DATADIR}/plymouth/themes/${THEME_NAME}/${THEME_NAME}.plymouth | sed 's/ModuleName *= *//')
 
 if [ ! -e ${PLYMOUTH_PLUGIN_PATH}${MODULE_NAME}.so ]; then
-        echo "${PLYMOUTH_PLUGIN_PATH}${MODULE_NAME}.so does not exist" > /dev/stderr
+        echo "${PLYMOUTH_PLUGIN_PATH}${MODULE_NAME}.so does not exist" >&2
         exit 1
 fi