summaryrefslogtreecommitdiffstats
path: root/zarb-ml/mageia-dev/2012-July/017348.html
blob: e453d4256425f349e18b66cd06023bf9384259bd (plain)
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
 <HEAD>
   <TITLE> [Mageia-dev] MGA2 Installer + Bootloader stage issue: initrd	regeneration not happening?
   </TITLE>
   <LINK REL="Index" HREF="index.html" >
   <LINK REL="made" HREF="mailto:mageia-dev%40mageia.org?Subject=Re%3A%20%5BMageia-dev%5D%20MGA2%20Installer%20%2B%20Bootloader%20stage%20issue%3A%20initrd%0A%09regeneration%20not%20happening%3F&In-Reply-To=%3Cm3zk71dv0j.fsf%40euphor.blino.org%3E">
   <META NAME="robots" CONTENT="index,nofollow">
   <META http-equiv="Content-Type" content="text/html; charset=us-ascii">
   <LINK REL="Previous"  HREF="017345.html">
   <LINK REL="Next"  HREF="017368.html">
 </HEAD>
 <BODY BGCOLOR="#ffffff">
   <H1>[Mageia-dev] MGA2 Installer + Bootloader stage issue: initrd	regeneration not happening?</H1>
    <B>Olivier Blin</B> 
    <A HREF="mailto:mageia-dev%40mageia.org?Subject=Re%3A%20%5BMageia-dev%5D%20MGA2%20Installer%20%2B%20Bootloader%20stage%20issue%3A%20initrd%0A%09regeneration%20not%20happening%3F&In-Reply-To=%3Cm3zk71dv0j.fsf%40euphor.blino.org%3E"
       TITLE="[Mageia-dev] MGA2 Installer + Bootloader stage issue: initrd	regeneration not happening?">mageia at blino.org
       </A><BR>
    <I>Sun Jul 15 15:16:44 CEST 2012</I>
    <P><UL>
        <LI>Previous message: <A HREF="017345.html">[Mageia-dev] MGA2 Installer + Bootloader stage issue: initrd regeneration not happening?
</A></li>
        <LI>Next message: <A HREF="017368.html">[Mageia-dev] MGA2 Installer + Bootloader stage issue: initrd regeneration not happening?
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#17348">[ date ]</a>
              <a href="thread.html#17348">[ thread ]</a>
              <a href="subject.html#17348">[ subject ]</a>
              <a href="author.html#17348">[ author ]</a>
         </LI>
       </UL>
    <HR>  
<!--beginarticle-->
<PRE>Colin Guthrie &lt;<A HREF="https://www.mageia.org/mailman/listinfo/mageia-dev">mageia at colin.guthr.ie</A>&gt; writes:
&gt;&gt;&gt;<i> In the post of mageia-theme-Default it has:
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i> if [ &quot;$1&quot; == &quot;0&quot; ]; then
</I>&gt;&gt;&gt;<i>   /usr/sbin/plymouth-set-default-theme -R Mageia-Default
</I>&gt;&gt;&gt;<i> fi
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i> This causes an initrd rebuild (-R argument) and doesn't check
</I>&gt;&gt;&gt;<i> DURING_INSTALL.
</I>&gt;&gt;&gt;<i>
</I>&gt;&gt;&gt;<i> That's the problem.
</I>&gt;&gt;<i> 
</I>&gt;&gt;<i> Ah, I did not see that one.
</I>&gt;<i>
</I>&gt;<i> Yeah I missed it the first two times I looked at it too :p
</I>&gt;<i>
</I>&gt;&gt;<i> There are two calls to plymouth-set-default-theme in this %post.
</I>&gt;&gt;<i> Maybe we can just move the second one (with -R) upper to replace the
</I>&gt;&gt;<i> first one?
</I>&gt;<i>
</I>&gt;<i> Well I think we should just drop it completely...
</I>&gt;<i>
</I>&gt;&gt;<i>From my reading, if we're not in the installer then
</I>&gt;<i> /usr/share/bootsplash/scripts/switch-themes is used which takes care of
</I>&gt;<i> regenerating initrd if needed.
</I>&gt;<i>
</I>&gt;<i> If we're in the install then plymouth-set-default-theme gets called
</I>&gt;<i> anyway (without the -R). So to me it seems like this is just a redundant
</I>&gt;<i> call.
</I>&gt;<i>
</I>&gt;<i> The only thing I'd suggest is that we add a -u argument to switch-themes
</I>&gt;<i> to ensure it calls plymouth-set-default-theme internally.
</I>
It seems to be the contrary, switch-themes runs
plymouth-set-default-theme if no -u is supplied:
    if [[ -z $update ]]; then
            /usr/sbin/plymouth-set-default-theme $theme
    fi

&gt;<i> Although as we should likely try and phase out some of the black magic
</I>&gt;<i> of these bootsplash scripts, I'd actually rather just do something like
</I>&gt;<i> this in %post:
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> if [ -f /usr/share/mga/backgrounds/Mageia.png -a ! -f
</I>&gt;<i> /usr/share/mga/backgrounds/default.png -o -L
</I>&gt;<i> /usr/share/mga/backgrounds/default.png ]; then
</I>&gt;<i>   rm -f /usr/share/mga/backgrounds/default.png
</I>&gt;<i>   ln -s Mageia-Default-1600x1200.png /usr/share/mga/backgrounds/default.png
</I>&gt;<i> fi
</I>&gt;<i>
</I>&gt;<i> rm -f
</I>&gt;<i> /usr/share/mga/backgrounds/Mageia-Default-{0000,0700,1300,1800}.jpg ||:
</I>&gt;<i> rm -f /usr/share/mga/backgrounds/Mageia.xml ||:
</I>&gt;<i> rm -f
</I>&gt;<i> /usr/share/mdk/backgrounds/Mandriva-{Free,Flash,One,Powerpack}-{0000,0700,1300,1800}.jpg
</I>&gt;<i> ||:
</I>&gt;<i> rm -f /usr/share/mdk/backgrounds/Mandriva.xml ||:
</I>&gt;<i>
</I>&gt;<i> if [ -z &quot;$DURING_INSTALL&quot; ]; then
</I>&gt;<i>   if [ -x /usr/share/bootsplash/scripts/switch-themes ]; then
</I>&gt;<i>     /usr/share/bootsplash/scripts/switch-themes Mageia-Default
</I>&gt;<i>   fi
</I>&gt;<i> fi
</I>&gt;<i> if [ -f /etc/sysconfig/bootsplash ]; then
</I>&gt;<i>   perl -pi -e 's/^s*SPLASH=.*/SPLASH=auto/;
</I>&gt;<i> s/^s*THEME=.*/THEME=Mageia-Default/' /etc/sysconfig/bootsplash
</I>&gt;<i> fi
</I>&gt;<i> /usr/sbin/plymouth-set-default-theme Mageia-Default
</I>
This %post script always looked a bit convoluted to me, couldn't we move
all this in the switch-themes script?
We could even check directly DURING_INSTALL in there, since DrakX's
bootloader is not using this script to add the splash.

That way, the %post script could be a one-liner, and reused easily in
other theme packages.

&gt;<i> That seems to be the right thing to do generally for now and good enough
</I>&gt;<i> for an update (can you review and give your opinion?), but longer term,
</I>&gt;<i> I'd rather get rid of /etc/sysconfig/bootsplash completely in favour of
</I>&gt;<i> other ways to control the theme (e.g. using plymouth-set-theme directly,
</I>&gt;<i> and tweaking kernel command line options to either use or not the
</I>&gt;<i> plymouth support in the initrd. If users really want to strip plymouth
</I>&gt;<i> from the initrd they can drop a config in /etc/dracut.conf.d/ to put a line:
</I>&gt;<i>  omit_dracutmodules+=&quot; plymouth &quot;
</I>&gt;<i>
</I>&gt;<i> which will prevent plymouth support in any subsequently generated initrd
</I>&gt;<i> (although if the &quot;silent&quot; kernel param is presented and plymouth is
</I>&gt;<i> still installed then it will still kick in after the initrd is finished
</I>&gt;<i> and the main system takes over.
</I>&gt;<i>
</I>&gt;<i> So uninstall plymouth is likely the best option for the purists (and I
</I>&gt;<i> may need to tweak dracut requires on that front)!
</I>
Ok

-- 
Olivier Blin - blino
</PRE>




<!--endarticle-->
    <HR>
    <P><UL>
        <!--threads-->
	<LI>Previous message: <A HREF="017345.html">[Mageia-dev] MGA2 Installer + Bootloader stage issue: initrd regeneration not happening?
</A></li>
	<LI>Next message: <A HREF="017368.html">[Mageia-dev] MGA2 Installer + Bootloader stage issue: initrd regeneration not happening?
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#17348">[ date ]</a>
              <a href="thread.html#17348">[ thread ]</a>
              <a href="subject.html#17348">[ subject ]</a>
              <a href="author.html#17348">[ author ]</a>
         </LI>
       </UL>

<hr>
<a href="https://www.mageia.org/mailman/listinfo/mageia-dev">More information about the Mageia-dev
mailing list</a><br>
</body></html>