Compare commits
200 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
8ae8652edd | ||
![]() |
5283544cc7 | ||
![]() |
e64dafd1f2 | ||
![]() |
1779aee72c | ||
![]() |
94f61235d7 | ||
![]() |
643be55570 | ||
![]() |
f0094476fd | ||
![]() |
ed2cc8c9b9 | ||
![]() |
421b46f8ae | ||
![]() |
c88c3215e8 | ||
![]() |
f48fb6f4ce | ||
![]() |
cb02ff635c | ||
![]() |
a1c1be4f3e | ||
![]() |
6c7776e344 | ||
![]() |
d7e3bf7abd | ||
![]() |
b25ef46f93 | ||
![]() |
cbb9a4e955 | ||
![]() |
dfbd8f74fd | ||
![]() |
8379784a0e | ||
![]() |
a54206722d | ||
![]() |
83b19de168 | ||
![]() |
9d651355a1 | ||
![]() |
b6054b5de6 | ||
![]() |
308c4066fe | ||
![]() |
bff3ee1936 | ||
![]() |
d842d5cf9e | ||
![]() |
7bb8083562 | ||
![]() |
2a0da60ed1 | ||
![]() |
bce6823a19 | ||
![]() |
33b560fcc2 | ||
![]() |
885b4a17d4 | ||
![]() |
a07b1bb6bb | ||
![]() |
9ed6eb741f | ||
![]() |
b925f7f5d9 | ||
![]() |
637fb76291 | ||
![]() |
8b4b7dc5b2 | ||
![]() |
cc3808184c | ||
![]() |
d888e21b5d | ||
![]() |
5cc17c25c2 | ||
![]() |
2bb4881b82 | ||
![]() |
28a68f1f3c | ||
![]() |
b7a7ab1943 | ||
![]() |
52d19cb161 | ||
![]() |
4c3688d355 | ||
![]() |
8e7d0856d0 | ||
![]() |
6ccb77e19a | ||
![]() |
47f83419a7 | ||
![]() |
c42c387cca | ||
![]() |
b8b341a07f | ||
![]() |
f3e09bf1cb | ||
![]() |
3a6a8d5c83 | ||
![]() |
cd83391c72 | ||
![]() |
0f6d93eb9d | ||
![]() |
33260dac6e | ||
![]() |
8bae047a4e | ||
![]() |
d118e9d940 | ||
![]() |
403f2c3e1d | ||
![]() |
73f89bbadb | ||
![]() |
ea7ffef13e | ||
![]() |
7bc681fd88 | ||
![]() |
d43cccf588 | ||
![]() |
5a8efed021 | ||
![]() |
17414dd01b | ||
![]() |
965cacd43a | ||
![]() |
ba2cfcab1e | ||
![]() |
1f8a7ae799 | ||
![]() |
577f109243 | ||
![]() |
dcacd2b072 | ||
![]() |
d300160e70 | ||
![]() |
c9d207467c | ||
![]() |
68cbbae33a | ||
![]() |
03214e51ae | ||
![]() |
bc4ce61efc | ||
![]() |
d818986db4 | ||
![]() |
8134db6c33 | ||
![]() |
8c3e65d1ce | ||
![]() |
51d2436c22 | ||
![]() |
29a9e92999 | ||
![]() |
de576db3c2 | ||
![]() |
a187bc3ca5 | ||
![]() |
598660bbe6 | ||
![]() |
39ee4fdfbd | ||
![]() |
10f06425a5 | ||
![]() |
d53bb5c017 | ||
![]() |
164760f4b0 | ||
![]() |
fd13d5d4d5 | ||
![]() |
36a8b2e305 | ||
![]() |
4e3eb1e9d1 | ||
![]() |
a3f91db476 | ||
![]() |
2aac319410 | ||
![]() |
43634c2469 | ||
![]() |
8f5c564cb3 | ||
![]() |
07e413bd0f | ||
![]() |
63755f4db8 | ||
![]() |
2d3273f96f | ||
![]() |
a45651c193 | ||
![]() |
12930f30a1 | ||
![]() |
1619e731f7 | ||
![]() |
84912dde41 | ||
![]() |
dfbbb0baf5 | ||
![]() |
c0f2b6bebc | ||
![]() |
8f4f40cb3c | ||
![]() |
fa54381b4e | ||
![]() |
ffbe0373e2 | ||
![]() |
649619f6a5 | ||
![]() |
72f5a098e9 | ||
![]() |
8602e59867 | ||
![]() |
f5c10673de | ||
![]() |
22836a0921 | ||
![]() |
6f1b5c0dab | ||
![]() |
871378aad4 | ||
![]() |
870591acec | ||
![]() |
07e6357483 | ||
![]() |
251afd36b2 | ||
![]() |
8008d47faf | ||
![]() |
af99264a36 | ||
![]() |
239e8ba2ac | ||
![]() |
8d20322f11 | ||
![]() |
d12ce1da85 | ||
![]() |
51f4ab300d | ||
![]() |
9fd3e045d5 | ||
![]() |
c75196e11e | ||
![]() |
d71c9ee286 | ||
![]() |
d066fcc3fb | ||
![]() |
6b96b50d2c | ||
![]() |
611b8ae0d7 | ||
![]() |
fb9970ba2d | ||
![]() |
6b7dca1631 | ||
![]() |
9f2916cce1 | ||
![]() |
df96cccc8f | ||
![]() |
19453dc874 | ||
![]() |
3dbf1f0783 | ||
![]() |
215fe58324 | ||
![]() |
94d09135a7 | ||
![]() |
cd0305cee0 | ||
![]() |
69acd20d4e | ||
![]() |
825730780a | ||
![]() |
2bdce3d461 | ||
![]() |
b36d322bd2 | ||
![]() |
e6199960d9 | ||
![]() |
84fe3c1a20 | ||
![]() |
96d69bbf34 | ||
![]() |
ee6b44342b | ||
![]() |
a13e97e511 | ||
![]() |
1ec2e34adc | ||
![]() |
11b3d60f5c | ||
![]() |
b1e1b6cba3 | ||
![]() |
18a5011ff2 | ||
![]() |
f9042fd839 | ||
![]() |
38ff9dfbe5 | ||
![]() |
28aea41829 | ||
![]() |
d976e19325 | ||
![]() |
9408a2ac33 | ||
![]() |
ed9281d6d1 | ||
![]() |
e190224345 | ||
![]() |
21789cbb0a | ||
![]() |
1751bacda1 | ||
![]() |
4b758ebe22 | ||
![]() |
82651e9ef3 | ||
![]() |
6bc8fbda61 | ||
![]() |
faabcb2360 | ||
![]() |
1df4538662 | ||
![]() |
2c9bcac113 | ||
![]() |
04fa949877 | ||
![]() |
791d801689 | ||
![]() |
8c2aa6161a | ||
![]() |
4c2d98c75b | ||
![]() |
b69ce65bf4 | ||
![]() |
4e3833f6a2 | ||
![]() |
0d947530b2 | ||
![]() |
bf5c53a33f | ||
![]() |
bada26263c | ||
![]() |
7c9e64272e | ||
![]() |
32618b456e | ||
![]() |
28401778c4 | ||
![]() |
b7058d0ce5 | ||
![]() |
795256bbb1 | ||
![]() |
d0eabcab43 | ||
![]() |
4d60324757 | ||
![]() |
ef84ce2521 | ||
![]() |
da97807ccc | ||
![]() |
7dbadcc749 | ||
![]() |
79926486a0 | ||
![]() |
424c065cd9 | ||
![]() |
1499719d25 | ||
![]() |
d000b9a2c7 | ||
![]() |
afe4e2844f | ||
![]() |
15d00459c3 | ||
![]() |
bd93e9287d | ||
![]() |
721bec3f14 | ||
![]() |
5634a31156 | ||
![]() |
37f2fe55d1 | ||
![]() |
e5d6018783 | ||
![]() |
348935e3b6 | ||
![]() |
3bd3ef5819 | ||
![]() |
00f3525a30 | ||
![]() |
0344c2be13 | ||
![]() |
81269979e6 | ||
![]() |
cc4e507322 | ||
![]() |
ccf948f2ab |
14
.mailmap
14
.mailmap
@@ -4,6 +4,7 @@ Philippe Seewer <philippe.seewer@bfh.ch> <philippe.seewer@bfh.ch>
|
||||
Victor Lowther <victor.lowther@gmail.com> <victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
|
||||
Harald Hoyer <harald@redhat.com> <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
|
||||
Harald Hoyer <harald@redhat.com> <harald@eeepc.(none)>
|
||||
Harald Hoyer <harald@redhat.com> <harald@hoyer.xyz>
|
||||
Mike Snitzer <snitzer@redhat.com> <msnitzer@redhat.com>
|
||||
Amerigo Wang <amwang@redhat.com> <xiyou.wangcong@gmail.com>
|
||||
Andrey Borzenkov <arvidjaar@gmail.com> <arvidjaar@mail.ru>
|
||||
@@ -17,3 +18,16 @@ Frederic Crozat <fcrozat@suse.com> <fcrozat@mandriva.com>
|
||||
Shawn W Dunn <sfalken@opensuse.org> <sfalken@opensuse.org>
|
||||
Kyle McMartin <kmcmarti@redhat.com> <kyle@redhat.com>
|
||||
Angelo "pallotron" Failla <pallotron@fb.com> <pallotron@fb.com>
|
||||
Yu Watanabe <watanabe.yu+github@gmail.com>
|
||||
Martin Wilck <mwilck@suse.de> <mwilck@suse.com>
|
||||
Thomas Renninger <trenn@suse.com> <trenn@suse.de>
|
||||
Andrey Borzenkov <arvidjaar@gmail.com>
|
||||
Cristian Rodríguez <crrodriguez@opensuse.org>
|
||||
Daniel Drake <drake@endlessm.com> <dsd@laptop.org>
|
||||
Fabian Vogt <fvogt@suse.com>
|
||||
Hannes Reinecke <hare@suse.com> <hare@suse.de>
|
||||
Julian Wolf <juwolf@suse.com> <juwolf@suse.de>
|
||||
Lidong Zhong <lidong.zhong@suse.com> <lzhong@suse.com>
|
||||
Nikoli <nikoli@gmx.us> <nikoli@lavabit.com>
|
||||
Peter Robinson <pbrobinson@fedoraproject.org> <pbrobinson@gmail.com>
|
||||
Xunlei Pang <xlpang@redhat.com> <xpang@redhat.com>
|
||||
|
83
AUTHORS
83
AUTHORS
@@ -1,41 +1,46 @@
|
||||
Harald Hoyer <harald@redhat.com>
|
||||
Victor Lowther <victor.lowther@gmail.com>
|
||||
Amadeusz Żołnowski <aidecoe@aidecoe.name>
|
||||
Hannes Reinecke <hare@suse.com>
|
||||
Will Woods <wwoods@redhat.com>
|
||||
Philippe Seewer <philippe.seewer@bfh.ch>
|
||||
Warren Togami <wtogami@redhat.com>
|
||||
Dave Young <dyoung@redhat.com>
|
||||
Jeremy Katz <katzj@redhat.com>
|
||||
David Dillow <dave@thedillows.org>
|
||||
Hannes Reinecke <hare@suse.de>
|
||||
Michal Soltys <soltys@ziu.info>
|
||||
Colin Guthrie <colin@mageia.org>
|
||||
Amerigo Wang <amwang@redhat.com>
|
||||
Thomas Renninger <trenn@suse.de>
|
||||
Thomas Renninger <trenn@suse.com>
|
||||
Daniel Molkentin <dmolkentin@suse.com>
|
||||
WANG Chao <chaowang@redhat.com>
|
||||
Andrey Borzenkov <arvidjaar@gmail.com>
|
||||
Alexander Tsoy <alexander@tsoy.me>
|
||||
Peter Jones <pjones@redhat.com>
|
||||
Andreas Thienemann <andreas@bawue.net>
|
||||
Lukas Nykryn <lnykryn@redhat.com>
|
||||
Hans de Goede <hdegoede@redhat.com>
|
||||
Peter Jones <pjones@redhat.com>
|
||||
Yu Watanabe <watanabe.yu+github@gmail.com>
|
||||
Andreas Thienemann <andreas@bawue.net>
|
||||
Frederick Grose <fgrose@sugarlabs.org>
|
||||
Peter Robinson <pbrobinson@fedoraproject.org>
|
||||
Fabian Vogt <fvogt@suse.com>
|
||||
John Reiser <jreiser@bitwagon.com>
|
||||
Luca Berra <bluca@vodka.it>
|
||||
Xunlei Pang <xlpang@redhat.com>
|
||||
Daniel Drake <drake@endlessm.com>
|
||||
Angelo "pallotron" Failla <pallotron@fb.com>
|
||||
Brian C. Lane <bcl@redhat.com>
|
||||
Daniel Drake <dsd@laptop.org>
|
||||
Peter Robinson <pbrobinson@gmail.com>
|
||||
Ville Skyttä <ville.skytta@iki.fi>
|
||||
Cristian Rodríguez <crrodriguez@opensuse.org>
|
||||
Dan Horák <dhorak@redhat.com>
|
||||
Daniel Molkentin <dmolkentin@suse.com>
|
||||
Baoquan He <bhe@redhat.com>
|
||||
Brendan Germain <brendan.germain@nasdaqomx.com>
|
||||
Leho Kraav <leho@kraav.com>
|
||||
Xunlei Pang <xlpang@redhat.com>
|
||||
Moritz Maxeiner <moritz@ucworks.org>
|
||||
Colin Walters <walters@verbum.org>
|
||||
Cristian Rodríguez <crrodriguez@opensuse.org>
|
||||
Fabian Deutsch <fabiand@fedoraproject.org>
|
||||
Kamil Rytarowski <n54@gmx.com>
|
||||
Lukas Nykryn <lnykryn@redhat.com>
|
||||
Lidong Zhong <lidong.zhong@suse.com>
|
||||
Marc Grimme <grimme@atix.de>
|
||||
NeilBrown <neilb@suse.de>
|
||||
Nicolas Chauvet <kwizart@gmail.com>
|
||||
@@ -46,6 +51,7 @@ Chao Wang <chaowang@redhat.com>
|
||||
Frederic Crozat <fcrozat@suse.com>
|
||||
James Lee <jlee@thestaticvoid.com>
|
||||
Jesse Keating <jkeating@redhat.com>
|
||||
Martin Wilck <mwilck@suse.de>
|
||||
Milan Broz <mbroz@redhat.com>
|
||||
Mimi Zohar <zohar@linux.vnet.ibm.com>
|
||||
Roberto Sassu <roberto.sassu@polito.it>
|
||||
@@ -60,19 +66,22 @@ Jan Synacek <jsynacek@redhat.com>
|
||||
Jon Ander Hernandez <jonan.h@gmail.com>
|
||||
Juan RP <xtraeme@gmail.com>
|
||||
Lance Albertson <lance@osuosl.org>
|
||||
Lidong Zhong <lzhong@suse.com>
|
||||
Marian Ganisin <mganisin@redhat.com>
|
||||
Matthias Gerstner <matthias.gerstner@suse.de>
|
||||
Michael Ploujnikov <plouj@somanetworks.com>
|
||||
Mike Gilbert <floppym@gentoo.org>
|
||||
Pratyush Anand <panand@redhat.com>
|
||||
Silvio Fricke <silvio.fricke@gmail.com>
|
||||
Steven Brudenell <steven.brudenell@gmail.com>
|
||||
Stig Telfer <stelfer@cray.com>
|
||||
Thomas Backlund <tmb@mageia.org>
|
||||
Vasiliy Tolstov <v.tolstov@selfip.ru>
|
||||
Wim Muskee <wimmuskee@gmail.com>
|
||||
yuwata <watanabe.yu+github@gmail.com>
|
||||
Adam Williamson <awilliam@redhat.com>
|
||||
Alan Jenkins <alan-jenkins@tuffmail.co.uk>
|
||||
Alan Pevec <apevec@redhat.com>
|
||||
Alex Harpin <development@landsofshadow.co.uk>
|
||||
Ankit Kumar <ankit@linux.vnet.ibm.com>
|
||||
Antony Messerli <amesserl@rackspace.com>
|
||||
Chao Fan <cfan@redhat.com>
|
||||
Daniel Kahn Gillmor <dkg@fifthhorseman.net>
|
||||
@@ -81,12 +90,13 @@ Denis Silakov <dsilakov@virtuozzo.com>
|
||||
Dimitri John Ledkov <dimitri.j.ledkov@intel.com>
|
||||
Erwan Velu <erwan.velu@enovance.com>
|
||||
Evgeny Vereshchagin <evvers@ya.ru>
|
||||
Fabian Vogt <fvogt@suse.com>
|
||||
Guido Trentalancia <guido@trentalancia.net>
|
||||
Hari Bathini <hbathini@linux.vnet.ibm.com>
|
||||
Ian Dall <ian@beware.dropbear.id.au>
|
||||
Imran Haider <imran1008@gmail.com>
|
||||
James Buren <ryuo@frugalware.org>
|
||||
Joey Boggs <jboggs@redhat.com>
|
||||
Julian Wolf <juwolf@suse.com>
|
||||
Koen Kooi <koen@dominion.thruhere.net>
|
||||
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
|
||||
Kyle McMartin <kmcmarti@redhat.com>
|
||||
@@ -94,74 +104,81 @@ Lubomir Rintel <lkundrak@v3.sk>
|
||||
Lukas Wunner <lukas@wunner.de>
|
||||
Mike Snitzer <snitzer@redhat.com>
|
||||
Minfei Huang <mhuang@redhat.com>
|
||||
Moritz Maxeiner <moritz@ucworks.org>
|
||||
Nikoli <nikoli@gmx.us>
|
||||
Przemysław Rudy <prudy1@o2.pl>
|
||||
Robert LeBlanc <robert@leblancnet.us>
|
||||
Robert Scheck <robert@fedoraproject.org>
|
||||
Stefan Berger <stefanb@us.ibm.com>
|
||||
Thomas Backlund <tmb@mageia.org>
|
||||
Thomas Lange <lange@informatik.uni-koeln.de>
|
||||
Till Maas <opensource@till.name>
|
||||
Vivek Goyal <vgoyal@redhat.com>
|
||||
Vladislav Bogdanov <bubble@hoster-ok.com>
|
||||
Yu Watanabe <watanabe.yu+github@gmail.com>
|
||||
pallotron <pallotron@fb.com>
|
||||
Adam Williamson <awilliam@redhat.com>
|
||||
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
|
||||
tpgxyz <tpgxyz@gmail.com>
|
||||
Alexander Kurtz <alexander@kurtz.be>
|
||||
Alexander Todorov <atodorov@redhat.com>
|
||||
Andreas Stieger <astieger@suse.com>
|
||||
Andrei Borzenkov <arvidjaar@gmail.com>
|
||||
Andy Lutomirski <luto@mit.edu>
|
||||
Anssi Hannula <anssi@mageia.org>
|
||||
Artem Savkov <asavkov@redhat.com>
|
||||
Brandon Philips <brandon@ifup.co>
|
||||
Bryn M. Reeves <bmr@redhat.com>
|
||||
Canek Peláez Valdés <caneko@gmail.com>
|
||||
Carlo Caione <carlo@endlessm.com>
|
||||
Chad Dupuis <chad.dupuis@cavium.com>
|
||||
Christian Heinz <christian.ch.heinz@gmail.com>
|
||||
Christian Rodrigues <crrodriguez@opensuse.org>
|
||||
Cong Wang <amwang@redhat.com>
|
||||
Dan Fuhry <dfuhry@datto.com>
|
||||
Daniel Drake <drake@endlessm.com>
|
||||
Dave Jones <davej@redhat.com>
|
||||
David Disseldorp <ddiss@suse.de>
|
||||
David Michael <david.michael@coreos.com>
|
||||
Dennis Schridde <devurandom@gmx.net>
|
||||
Derek Higgins <derekh@redhat.com>
|
||||
Duane Griffin <duaneg@dghda.com>
|
||||
Elan Ruusamäe <glen@delfi.ee>
|
||||
Fabian <fvogt@suse.com>
|
||||
Florian Albrechtskirchinger <falbrechtskirchinger@gmail.com>
|
||||
Florian Gamböck <mail@floga.de>
|
||||
François Cami <fcami@fedoraproject.org>
|
||||
Gerd von Egidy <gerd.von.egidy@intra2net.com>
|
||||
Glen Gray <slaine@slaine.org>
|
||||
HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
|
||||
Hermann Gausterer <git-dracut-2012@mrq1.org>
|
||||
Imran Haider <imran1008@gmail.com>
|
||||
Ignaz Forster <iforster@suse.com>
|
||||
James Laska <jlaska@redhat.com>
|
||||
Jan Stodola <jstodola@redhat.com>
|
||||
Jason Dana <jasondana@quarksecurity.com>
|
||||
Javier Martinez Canillas <javierm@redhat.com>
|
||||
Jiri Pirko <jiri@resnulli.us>
|
||||
Joe Lawrence <Joe.Lawrence@stratus.com>
|
||||
Johannes Thumshirn <jthumshirn@suse.com>
|
||||
Jonas Jonsson <jonas@websystem.se>
|
||||
Julian Wolf <juwolf@suse.com>
|
||||
Kevin Yung <Kevin.Yung@myob.com>
|
||||
Lars R. Damerow <lars@pixar.com>
|
||||
Lennert Buytenhek <buytenh@wantstofly.org>
|
||||
Lidong Zhong <lidong.zhong@suse.com>
|
||||
Major Hayden <major@mhtx.net>
|
||||
Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
|
||||
Marian Csontos <mcsontos@redhat.com>
|
||||
Mark Fasheh <mfasheh@suse.de>
|
||||
Marko Myllynen <myllynen@redhat.com>
|
||||
Martin Wilck <mwilck@suse.com>
|
||||
Matt <smoothsailing72@hotmail.com>
|
||||
Matt Smith <shadowfax@gmx.com>
|
||||
Matthew Thode <mthode@mthode.org>
|
||||
Mei Liu <liumbj@linux.vnet.ibm.com>
|
||||
Michael Chapman <mike@very.puzzling.org>
|
||||
Michal Koutný <mkoutny@suse.com>
|
||||
Michal Schmidt <mschmidt@redhat.com>
|
||||
Michal Sekletar <msekleta@redhat.com>
|
||||
Mike Gorse <mgorse@suse.com>
|
||||
Moritz 'Morty' Strübe <morty@gmx.net>
|
||||
Munehiro Matsuda <haro@kgt.co.jp>
|
||||
Nikoli <nikoli@gmx.us>
|
||||
Nikoli <nikoli@lavabit.com>
|
||||
Olivier Blin <dev@blino.org>
|
||||
P J P <ppandit@redhat.com>
|
||||
Paolo Bonzini <pbonzini@redhat.com>
|
||||
Pavel Zhukov <pzhukov@redhat.com>
|
||||
Pawel Wieczorkiewicz <pwieczorkiewicz@suse.de>
|
||||
Pekka Wallendahl <wyrmiyu@gmail.com>
|
||||
Peter Robinson <pbrobinson@fedoraproject.org>
|
||||
Pingfan Liu <piliu@redhat.com>
|
||||
Prarit Bhargava <prarit@redhat.com>
|
||||
Praveen_Paladugu@Dell.com <Praveen_Paladugu@Dell.com>
|
||||
Pádraig Brady <P@draigBrady.com>
|
||||
Quentin Armitage <quentin@armitage.org.uk>
|
||||
@@ -173,19 +190,23 @@ Shawn W Dunn <sfalken@opensuse.org>
|
||||
Srinivasa T N <seenutn@linux.vnet.ibm.com>
|
||||
Stijn Hoop <stijn@sandcat.nl>
|
||||
Thilo Bangert <thilo.bangert@gmx.net>
|
||||
Thomas Blume <thomas.blume@suse.com>
|
||||
Tobias Geerinckx <tobias.geerinckx@gmail.com>
|
||||
Tom Gundersen <teg@jklm.no>
|
||||
Tomasz Paweł Gajc <tpgxyz@gmail.com>
|
||||
Tomasz Torcz <tomek@pipebreaker.pl>
|
||||
Tong Li <tonli@redhat.com>
|
||||
Vadim Kuznetsov <vadimk@gentoo.org>
|
||||
Vaughan Cao <vaughan.cao@oracle.com>
|
||||
Vratislav Podzimek <vpodzime@redhat.com>
|
||||
Xunlei Pang <xpang@redhat.com>
|
||||
Yanko Kaneti <yaneti@declera.com>
|
||||
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
|
||||
Zhiguo Deng <bjzgdeng@linux.vnet.ibm.com>
|
||||
Ziyue Yang <ziyang@redhat.com>
|
||||
honza801 <honza801@gmail.com>
|
||||
jloeser <jloeser@suse.de>
|
||||
johannes <johannes.brechtmann@gmail.com>
|
||||
jonathan-teh <30538043+jonathan-teh@users.noreply.github.com>
|
||||
maximilian attems <max@stro.at>
|
||||
privb0x23 <privb0x23@users.noreply.github.com>
|
||||
tpg <tpgxyz@gmail.com>
|
||||
xtraeme <xtraeme@voidlinux.eu>
|
||||
|
100
NEWS
100
NEWS
@@ -1,3 +1,103 @@
|
||||
dracut-047
|
||||
==========
|
||||
dracut.sh:
|
||||
- sync initramfs to filesystem with fsfreeze
|
||||
- introduce "--no-hostonly-default-device"
|
||||
- disable lsinitrd logging when quiet
|
||||
- add support for Zstandard compression
|
||||
- fixed relative paths in --kerneldir
|
||||
- if /boot/vmlinuz-$version exists use /boot/ as default output dir
|
||||
- make qemu and qemu-net a default module in non-hostonly mode
|
||||
- fixed relative symlinks
|
||||
- support microcode updates for all AMD CPU families
|
||||
- install all modules-load.d regardless of hostonly
|
||||
- fixed parsing of "-i" and "--include"
|
||||
- bump kmod version to >= 23
|
||||
- enable 'early_microcode' by default
|
||||
- fixed check_block_and_slaves() for nvme
|
||||
|
||||
lsinitrd.sh:
|
||||
- dismiss "cat" error messages
|
||||
|
||||
systemd-bootchart:
|
||||
- removed
|
||||
|
||||
i18n:
|
||||
- install all keymaps for a given locale
|
||||
- add correct fontmaps
|
||||
|
||||
dmsquash-live:
|
||||
- fixed systemd unit escape
|
||||
|
||||
systemd:
|
||||
- enable core dumps with systemd from initrd
|
||||
- fixed setting of timeouts for device units
|
||||
- emergency.service: use Type=idle and fixed task limit
|
||||
|
||||
multipath:
|
||||
- include files from /etc/multipath/conf.d
|
||||
- do not fail startup on missing configuration
|
||||
- start daemon after udev settle
|
||||
- add shutdown script
|
||||
- parse kernel commandline option 'multipath=off'
|
||||
- start before local-fs-pre.target
|
||||
|
||||
dracut-emergency:
|
||||
- optionally print filesystem help
|
||||
|
||||
network:
|
||||
- fixed MTU for bond master
|
||||
- fixed race condition when wait for networks
|
||||
|
||||
fcoe:
|
||||
- handle CNAs with DCB firmware support
|
||||
- allow to specify the FCoE mode via the fcoe= parameter
|
||||
- always set AUTO_VLAN for fcoemon
|
||||
- add shutdown script
|
||||
- fixup fcoe-genrules.sh for VN2VN mode
|
||||
- switch back to using fipvlan for bnx2fc
|
||||
- add timeout mechanism
|
||||
|
||||
crypt:
|
||||
- add basic LUKS detached header support
|
||||
- escape backslashes for systemd unit names correctly
|
||||
- put block_uuid.map into initramfs
|
||||
|
||||
dmraid:
|
||||
- do not delete partitions
|
||||
|
||||
dasd_mod:
|
||||
- do not set module parameters if dasd_cio_free is not present
|
||||
|
||||
nfs:
|
||||
- fix mount if IPv4 address is used in /etc/fstab
|
||||
- support host being a DNS ALIAS
|
||||
|
||||
fips:
|
||||
- fixed creating path to .hmac of kernel based on BOOT_IMAGE
|
||||
|
||||
lunmask:
|
||||
- add module to handle LUN masking
|
||||
|
||||
s390:
|
||||
- add rd.cio_accept
|
||||
|
||||
dcssblk:
|
||||
- add new module for DCSS block devices
|
||||
|
||||
zipl:
|
||||
- add new module to update s390x configuration
|
||||
|
||||
iscsi:
|
||||
- no more iscsid, either iscsistart or iscsid
|
||||
|
||||
integrity:
|
||||
- support loading x509 into the trusted/builtin .evm keyring
|
||||
- support X.509-only EVM configuration
|
||||
|
||||
plymouth:
|
||||
- improve distro compatibility
|
||||
|
||||
dracut-046
|
||||
==========
|
||||
|
||||
|
@@ -20,6 +20,7 @@ dracut is an initramfs infrastructure.
|
||||
- Test 17: [](https://ci.centos.org/job/dracut-matrix-master/TESTS=17,label=dracut-ci-slave01/)
|
||||
- Test 20: [](https://ci.centos.org/job/dracut-matrix-master/TESTS=20,label=dracut-ci-slave01/)
|
||||
- Test 30: [](https://ci.centos.org/job/dracut-matrix-master/TESTS=30,label=dracut-ci-slave01/)
|
||||
- Test 31: [](https://ci.centos.org/job/dracut-matrix-master/TESTS=31,label=dracut-ci-slave01/)
|
||||
- Test 40: [](https://ci.centos.org/job/dracut-matrix-master/TESTS=40,label=dracut-ci-slave01/)
|
||||
- Test 50: [](https://ci.centos.org/job/dracut-matrix-master/TESTS=50,label=dracut-ci-slave01/)
|
||||
- Test 70: [](https://ci.centos.org/job/dracut-matrix-master/TESTS=70,label=dracut-ci-slave01/)
|
||||
|
8
configure
vendored
8
configure
vendored
@@ -52,8 +52,8 @@ while (($# > 0)); do
|
||||
shift
|
||||
done
|
||||
|
||||
if ! ${PKG_CONFIG} --exists --print-errors " libkmod >= 15 "; then
|
||||
echo "dracut needs pkg-config and libkmod >= 15." >&2
|
||||
if ! ${PKG_CONFIG} --exists --print-errors " libkmod >= 23 "; then
|
||||
echo "dracut needs pkg-config and libkmod >= 23." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -66,8 +66,8 @@ sbindir ?= ${sbindir:-${prefix}/sbin}
|
||||
mandir ?= ${mandir:-${prefix}/share/man}
|
||||
enable_documentation ?= ${enable_documentation:-yes}
|
||||
bindir ?= ${bindir:-${prefix}/bin}
|
||||
KMOD_CFLAGS ?= $(${PKG_CONFIG} --cflags " libkmod >= 15 ")
|
||||
KMOD_LIBS ?= $(${PKG_CONFIG} --libs " libkmod >= 15 ")
|
||||
KMOD_CFLAGS ?= $(${PKG_CONFIG} --cflags " libkmod >= 23 ")
|
||||
KMOD_LIBS ?= $(${PKG_CONFIG} --libs " libkmod >= 23 ")
|
||||
EOF
|
||||
|
||||
{
|
||||
|
@@ -29,7 +29,7 @@ _dracut() {
|
||||
--hardlink --nohardlink --noprefix --mdadmconf --nomdadmconf
|
||||
--lvmconf --nolvmconf --debug --profile --verbose --quiet
|
||||
--local --hostonly --no-hostonly --fstab --help --bzip2 --lzma
|
||||
--xz --no-compress --gzip --list-modules --show-modules --keep
|
||||
--xz --zstd --no-compress --gzip --list-modules --show-modules --keep
|
||||
--printsize --regenerate-all --noimageifnotneeded --early-microcode
|
||||
--no-early-microcode --print-cmdline --prelink --noprelink --reproducible
|
||||
--uefi
|
||||
|
@@ -223,14 +223,20 @@ get_devpath_block() {
|
||||
|
||||
# get a persistent path from a device
|
||||
get_persistent_dev() {
|
||||
local i _tmp _dev
|
||||
local i _tmp _dev _pol
|
||||
|
||||
_dev=$(get_maj_min "$1")
|
||||
[ -z "$_dev" ] && return
|
||||
|
||||
if [[ -n "$persistent_policy" ]]; then
|
||||
_pol="/dev/disk/${persistent_policy}/*"
|
||||
else
|
||||
_pol=
|
||||
fi
|
||||
|
||||
for i in \
|
||||
$_pol \
|
||||
/dev/mapper/* \
|
||||
/dev/disk/${persistent_policy:-by-uuid}/* \
|
||||
/dev/disk/by-uuid/* \
|
||||
/dev/disk/by-label/* \
|
||||
/dev/disk/by-partuuid/* \
|
||||
@@ -468,7 +474,8 @@ for_each_host_dev_fs()
|
||||
local _dev
|
||||
local _ret=1
|
||||
|
||||
[[ "${#host_fs_types[@]}" ]] || return 0
|
||||
[[ "${#host_fs_types[@]}" ]] || return 2
|
||||
|
||||
|
||||
for _dev in "${!host_fs_types[@]}"; do
|
||||
$_func "$_dev" "${host_fs_types[$_dev]}" && _ret=0
|
||||
@@ -490,13 +497,14 @@ check_block_and_slaves() {
|
||||
[[ -b /dev/block/$2 ]] || return 1 # Not a block device? So sorry.
|
||||
if ! lvm_internal_dev $2; then "$1" $2 && return; fi
|
||||
check_vol_slaves "$@" && return 0
|
||||
if [[ -f /sys/dev/block/$2/../dev ]]; then
|
||||
if [[ -f /sys/dev/block/$2/../dev ]] && [[ /sys/dev/block/$2/../subsystem -ef /sys/class/block ]]; then
|
||||
check_block_and_slaves $1 $(<"/sys/dev/block/$2/../dev") && return 0
|
||||
fi
|
||||
[[ -d /sys/dev/block/$2/slaves ]] || return 1
|
||||
for _x in /sys/dev/block/$2/slaves/*/dev; do
|
||||
[[ -f $_x ]] || continue
|
||||
check_block_and_slaves $1 $(<"$_x") && return 0
|
||||
for _x in /sys/dev/block/$2/slaves/*; do
|
||||
[[ -f $_x/dev ]] || continue
|
||||
[[ $_x/subsystem -ef /sys/class/block ]] || continue
|
||||
check_block_and_slaves $1 $(<"$_x/dev") && return 0
|
||||
done
|
||||
return 1
|
||||
}
|
||||
@@ -508,13 +516,14 @@ check_block_and_slaves_all() {
|
||||
_ret=0
|
||||
fi
|
||||
check_vol_slaves_all "$@" && return 0
|
||||
if [[ -f /sys/dev/block/$2/../dev ]]; then
|
||||
if [[ -f /sys/dev/block/$2/../dev ]] && [[ /sys/dev/block/$2/../subsystem -ef /sys/class/block ]]; then
|
||||
check_block_and_slaves_all $1 $(<"/sys/dev/block/$2/../dev") && _ret=0
|
||||
fi
|
||||
[[ -d /sys/dev/block/$2/slaves ]] || return 1
|
||||
for _x in /sys/dev/block/$2/slaves/*/dev; do
|
||||
[[ -f $_x ]] || continue
|
||||
check_block_and_slaves_all $1 $(<"$_x") && _ret=0
|
||||
for _x in /sys/dev/block/$2/slaves/*; do
|
||||
[[ -f $_x/dev ]] || continue
|
||||
[[ $_x/subsystem -ef /sys/class/block ]] || continue
|
||||
check_block_and_slaves_all $1 $(<"$_x/dev") && _ret=0
|
||||
done
|
||||
return $_ret
|
||||
}
|
||||
@@ -527,7 +536,7 @@ for_each_host_dev_and_slaves_all()
|
||||
local _dev
|
||||
local _ret=1
|
||||
|
||||
[[ "${host_devs[@]}" ]] || return 0
|
||||
[[ "${host_devs[@]}" ]] || return 2
|
||||
|
||||
for _dev in "${host_devs[@]}"; do
|
||||
[[ -b "$_dev" ]] || continue
|
||||
@@ -543,7 +552,7 @@ for_each_host_dev_and_slaves()
|
||||
local _func="$1"
|
||||
local _dev
|
||||
|
||||
[[ "${host_devs[@]}" ]] || return 0
|
||||
[[ "${host_devs[@]}" ]] || return 2
|
||||
|
||||
for _dev in "${host_devs[@]}"; do
|
||||
[[ -b "$_dev" ]] || continue
|
||||
@@ -559,45 +568,39 @@ for_each_host_dev_and_slaves()
|
||||
# but you cannot create the logical volume without the volume group.
|
||||
# And the volume group might be bigger than the devices the LV needs.
|
||||
check_vol_slaves() {
|
||||
local _lv _vg _pv _dm
|
||||
for i in /dev/mapper/*; do
|
||||
[[ $i == /dev/mapper/control ]] && continue
|
||||
_lv=$(get_maj_min $i)
|
||||
_dm=/sys/dev/block/$_lv/dm
|
||||
[[ -f $_dm/uuid && $(<$_dm/uuid) =~ LVM-* ]] || continue
|
||||
if [[ $_lv = $2 ]]; then
|
||||
_vg=$(lvm lvs --noheadings -o vg_name $i 2>/dev/null)
|
||||
# strip space
|
||||
_vg="${_vg//[[:space:]]/}"
|
||||
if [[ $_vg ]]; then
|
||||
for _pv in $(lvm vgs --noheadings -o pv_name "$_vg" 2>/dev/null)
|
||||
do
|
||||
check_block_and_slaves $1 $(get_maj_min $_pv) && return 0
|
||||
done
|
||||
fi
|
||||
fi
|
||||
done
|
||||
local _lv _vg _pv _dm _majmin
|
||||
_majmin="$2"
|
||||
_lv="/dev/block/$_majmin"
|
||||
_dm=/sys/dev/block/$_majmin/dm
|
||||
[[ -f $_dm/uuid && $(<$_dm/uuid) =~ LVM-* ]] || return 1
|
||||
_vg=$(dmsetup splitname --noheadings -o vg_name $(<"$_dm/name") )
|
||||
# strip space
|
||||
_vg="${_vg//[[:space:]]/}"
|
||||
if [[ $_vg ]]; then
|
||||
for _pv in $(lvm vgs --noheadings -o pv_name "$_vg" 2>/dev/null)
|
||||
do
|
||||
check_block_and_slaves $1 $(get_maj_min $_pv) && return 0
|
||||
done
|
||||
fi
|
||||
return 1
|
||||
}
|
||||
|
||||
check_vol_slaves_all() {
|
||||
local _lv _vg _pv
|
||||
for i in /dev/mapper/*; do
|
||||
[[ $i == /dev/mapper/control ]] && continue
|
||||
_lv=$(get_maj_min $i)
|
||||
if [[ $_lv = $2 ]]; then
|
||||
_vg=$(lvm lvs --noheadings -o vg_name $i 2>/dev/null)
|
||||
# strip space
|
||||
_vg="${_vg//[[:space:]]/}"
|
||||
if [[ $_vg ]]; then
|
||||
for _pv in $(lvm vgs --noheadings -o pv_name "$_vg" 2>/dev/null)
|
||||
do
|
||||
check_block_and_slaves_all $1 $(get_maj_min $_pv)
|
||||
done
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
done
|
||||
local _lv _vg _pv _majmin
|
||||
_majmin="$2"
|
||||
_lv="/dev/block/$_majmin"
|
||||
_dm="/sys/dev/block/$_majmin/dm"
|
||||
[[ -f $_dm/uuid && $(<$_dm/uuid) =~ LVM-* ]] || return 1
|
||||
_vg=$(dmsetup splitname --noheadings -o vg_name $(<"$_dm/name") )
|
||||
# strip space
|
||||
_vg="${_vg//[[:space:]]/}"
|
||||
if [[ $_vg ]]; then
|
||||
for _pv in $(lvm vgs --noheadings -o pv_name "$_vg" 2>/dev/null)
|
||||
do
|
||||
check_block_and_slaves_all $1 $(get_maj_min $_pv)
|
||||
done
|
||||
return 0
|
||||
fi
|
||||
return 1
|
||||
}
|
||||
|
||||
@@ -661,11 +664,8 @@ get_ucode_file ()
|
||||
local stepping=`grep -E "stepping" /proc/cpuinfo | head -1 | sed s/.*:\ //`
|
||||
|
||||
if [[ "$(get_cpu_vendor)" == "AMD" ]]; then
|
||||
# If family greater than or equal to 0x16
|
||||
if [[ $family -ge 22 ]]; then
|
||||
printf "microcode_amd_fam16h.bin"
|
||||
elif [[ $family -eq 21 ]]; then
|
||||
printf "microcode_amd_fam15h.bin"
|
||||
if [[ $family -ge 21 ]]; then
|
||||
printf "microcode_amd_fam%xh.bin" $family
|
||||
else
|
||||
printf "microcode_amd.bin"
|
||||
fi
|
||||
|
@@ -261,6 +261,12 @@ inst_script() {
|
||||
(($? != 0)) && derror FAILED: $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} "$@" || :
|
||||
}
|
||||
|
||||
inst_fsck_help() {
|
||||
local _helper="/run/dracut/fsck/fsck_help_$1.txt"
|
||||
$DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} "$2" $_helper
|
||||
(($? != 0)) && derror $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${DRACUT_RESOLVE_DEPS:+-l} ${DRACUT_FIPS_MODE:+-f} "$2" $_helper || :
|
||||
}
|
||||
|
||||
mark_hostonly() {
|
||||
for i in "$@"; do
|
||||
echo "$i" >> "$initdir/lib/dracut/hostonly-files"
|
||||
|
@@ -31,6 +31,8 @@ elif $SKIP "$IMG" | xzcat | cpio -id --no-absolute-filenames --quiet >/dev/null;
|
||||
rm -f -- .need_shutdown
|
||||
elif $SKIP "$IMG" | lz4 -d -c | cpio -id --no-absolute-filenames --quiet >/dev/null; then
|
||||
rm -f -- .need_shutdown
|
||||
elif $SKIP "$IMG" | zstd -d -c | cpio -id --no-absolute-filenames --quiet >/dev/null; then
|
||||
rm -f -- .need_shutdown
|
||||
else
|
||||
# something failed, so we clean up
|
||||
echo "Unpacking of $IMG to /run/initramfs failed" >&2
|
||||
|
12
dracut.8.asc
12
dracut.8.asc
@@ -323,6 +323,10 @@ provide a valid _/etc/fstab_.
|
||||
**--no-hostonly-cmdline**:
|
||||
Do not store kernel command line arguments needed in the initramfs
|
||||
|
||||
**--no-hostonly-default-device**:
|
||||
Do not generate implicit host devices like root, swap, fstab, etc.
|
||||
Use "--mount" or "--add-device" to explicitly add devices as needed.
|
||||
|
||||
**--hostonly-i18n**:
|
||||
Install only needed keyboard and font files according to the host configuration (default).
|
||||
|
||||
@@ -428,6 +432,14 @@ Make sure your kernel has lz4 decompression support compiled in, otherwise you
|
||||
will not be able to boot.
|
||||
====
|
||||
|
||||
**--zstd**::
|
||||
Compress the generated initramfs using Zstandard.
|
||||
[WARNING]
|
||||
====
|
||||
Make sure your kernel has zstd decompression support compiled in, otherwise you
|
||||
will not be able to boot.
|
||||
====
|
||||
|
||||
**--compress** _<compressor>_::
|
||||
Compress the generated initramfs using the passed compression program. If
|
||||
you pass it just the name of a compression program, it will call that
|
||||
|
@@ -755,10 +755,12 @@ iscsistart -b --param node.session.timeo.replacement_timeout=30
|
||||
|
||||
FCoE
|
||||
~~~~
|
||||
**fcoe=**__<edd|interface|MAC>__:__{dcb|nodcb}__::
|
||||
**fcoe=**__<edd|interface|MAC>__:__{dcb|nodcb}__:__{fabric|vn2vn}__::
|
||||
Try to connect to a FCoE SAN through the NIC specified by _<interface>_ or
|
||||
_<MAC>_ or EDD settings. For the second argument, currently only nodcb is
|
||||
supported. This parameter can be specified multiple times.
|
||||
_<MAC>_ or EDD settings. The second argument specifies if DCB
|
||||
should be used. The optional third argument specifies whether
|
||||
fabric or VN2VN mode should be used.
|
||||
This parameter can be specified multiple times.
|
||||
+
|
||||
NOTE: letters in the MAC-address must be lowercase!
|
||||
|
||||
@@ -809,6 +811,9 @@ rd.zfcp=0.0.4000
|
||||
ZNET
|
||||
~~~~
|
||||
**rd.znet=**__<nettype>__,__<subchannels>__,__<options>__::
|
||||
The whole parameter is appended to /etc/ccw.conf, which is used on
|
||||
RHEL/Fedora with ccw_init, which is called from udev for certain
|
||||
devices on z-series.
|
||||
rd.znet can be specified multiple times on the kernel command line.
|
||||
+
|
||||
[listing]
|
||||
@@ -999,6 +1004,35 @@ be mounted read only through a higher level transient overlay directory, has
|
||||
been implemented through the multiple lower layers feature of OverlayFS.
|
||||
|
||||
|
||||
ZIPL
|
||||
~~~~
|
||||
**rd.zipl=**__<path to blockdevice>__::
|
||||
Update the dracut commandline with the values found in the
|
||||
_dracut-cmdline.conf_ file on the given device.
|
||||
The values are merged into the existing commandline values
|
||||
and the udev events are regenerated.
|
||||
+
|
||||
[listing]
|
||||
.Example
|
||||
--
|
||||
rd.zipl=UUID=0fb28157-99e3-4395-adef-da3f7d44835a
|
||||
--
|
||||
|
||||
CIO_IGNORE
|
||||
~~~~~~~~~~
|
||||
**rd.cio_accept=**__<device-ids>__::
|
||||
Remove the devices listed in <device-ids> from the default
|
||||
cio_ignore kernel command-line settings.
|
||||
<device-ids> is a list of comma-separated CCW device ids.
|
||||
The default for this value is taken from the
|
||||
_/boot/zipl/active_devices.txt_ file.
|
||||
+
|
||||
[listing]
|
||||
.Example
|
||||
--
|
||||
rd.cio_accept=0.0.0180,0.0.0800,0.0.0801,0.0.0802
|
||||
--
|
||||
|
||||
Plymouth Boot Splash
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
**plymouth.enable=0**::
|
||||
@@ -1052,7 +1086,8 @@ their new replacement.
|
||||
|
||||
rdbreak:: rd.break
|
||||
|
||||
rd_CCW:: rd.ccw
|
||||
rd.ccw:: rd.znet
|
||||
rd_CCW:: rd.znet
|
||||
|
||||
rd_DASD_MOD:: rd.dasd
|
||||
|
||||
|
@@ -79,7 +79,7 @@ Configuration files must have the extension .conf; other extensions are ignored.
|
||||
Specify additional files to include in the initramfs, separated by spaces,
|
||||
if they exist.
|
||||
|
||||
*compress=*"__{bzip2|lzma|xz|gzip|lzo|lz4|<compressor [args ...]>}__"::
|
||||
*compress=*"__{bzip2|lzma|xz|gzip|lzo|lz4|zstd|<compressor [args ...]>}__"::
|
||||
Compress the generated initramfs using the passed compression program. If
|
||||
you pass it just the name of a compression program, it will call that
|
||||
program with known-working arguments. If you pass arguments, it will be called
|
||||
@@ -167,7 +167,7 @@ provide a valid _/etc/fstab_.
|
||||
Directory to search for ACPI tables if acpi_override= is set to yes.
|
||||
|
||||
*early_microcode=*"{yes|no}"::
|
||||
Combine early microcode with ramdisk (default=no)
|
||||
Combine early microcode with ramdisk (default=yes)
|
||||
|
||||
*stdloglvl*="__\{0-6\}__"::
|
||||
Set logging to standard error level.
|
||||
|
62
dracut.sh
62
dracut.sh
@@ -151,6 +151,10 @@ Creates initial ramdisk images for preloading modules
|
||||
in the initramfs
|
||||
--no-hostonly-cmdline Do not store kernel command line arguments needed
|
||||
in the initramfs
|
||||
--no-hostonly-default-device
|
||||
Do not generate implicit host devices like root,
|
||||
swap, fstab, etc. Use "--mount" or "--add-device"
|
||||
to explicitly add devices as needed.
|
||||
--hostonly-i18n Install only needed keyboard and font files according
|
||||
to the host configuration (default).
|
||||
--no-hostonly-i18n Install all keyboard and font files available.
|
||||
@@ -193,6 +197,9 @@ Creates initial ramdisk images for preloading modules
|
||||
--lz4 Compress the generated initramfs using lz4.
|
||||
Make sure that your kernel has lz4 support compiled
|
||||
in, otherwise you will not be able to boot.
|
||||
--zstd Compress the generated initramfs using Zstandard.
|
||||
Make sure that your kernel has zstd support compiled
|
||||
in, otherwise you will not be able to boot.
|
||||
--compress [COMPRESSION] Compress the generated initramfs with the
|
||||
passed compression program. Make sure your kernel
|
||||
knows how to decompress the generated initramfs,
|
||||
@@ -279,11 +286,15 @@ dropindirs_sort()
|
||||
rearrange_params()
|
||||
{
|
||||
# Workaround -i, --include taking 2 arguments
|
||||
set -- "${@/--include/++include}"
|
||||
|
||||
# This prevents any long argument ending with "-i"
|
||||
# -i, like --opt-i but I think we can just prevent that
|
||||
set -- "${@/%-i/++include}"
|
||||
newat=()
|
||||
for i in "$@"; do
|
||||
if [[ $i == "-i" ]] || [[ $i == "--include" ]]; then
|
||||
newat+=("++include") # Replace --include by ++include
|
||||
else
|
||||
newat+=("$i")
|
||||
fi
|
||||
done
|
||||
set -- "${newat[@]}" # Set new $@
|
||||
|
||||
TEMP=$(unset POSIXLY_CORRECT; getopt \
|
||||
-o "a:m:o:d:I:k:c:L:fvqlHhMN" \
|
||||
@@ -345,6 +356,7 @@ rearrange_params()
|
||||
--long no-host-only \
|
||||
--long hostonly-cmdline \
|
||||
--long no-hostonly-cmdline \
|
||||
--long no-hostonly-default-device \
|
||||
--long persistent-policy: \
|
||||
--long fstab \
|
||||
--long help \
|
||||
@@ -353,6 +365,7 @@ rearrange_params()
|
||||
--long xz \
|
||||
--long lzo \
|
||||
--long lz4 \
|
||||
--long zstd \
|
||||
--long no-compress \
|
||||
--long gzip \
|
||||
--long list-modules \
|
||||
@@ -539,6 +552,8 @@ while :; do
|
||||
i18n_install_all_l="yes" ;;
|
||||
--no-hostonly-cmdline)
|
||||
hostonly_cmdline_l="no" ;;
|
||||
--no-hostonly-default-device)
|
||||
hostonly_default_device="no" ;;
|
||||
--persistent-policy)
|
||||
persistent_policy_l="$2"; PARMS_TO_STORE+=" '$2'"; shift;;
|
||||
--fstab) use_fstab_l="yes" ;;
|
||||
@@ -550,6 +565,7 @@ while :; do
|
||||
--xz) compress_l="xz";;
|
||||
--lzo) compress_l="lzo";;
|
||||
--lz4) compress_l="lz4";;
|
||||
--zstd) compress_l="zstd";;
|
||||
--no-compress) _no_compress_l="cat";;
|
||||
--gzip) compress_l="gzip";;
|
||||
--list-modules) do_list="yes";;
|
||||
@@ -732,7 +748,7 @@ stdloglvl=$((stdloglvl + verbosity_mod_l))
|
||||
[[ $nofscks_l ]] && nofscks="yes"
|
||||
[[ $ro_mnt_l ]] && ro_mnt="yes"
|
||||
[[ $early_microcode_l ]] && early_microcode=$early_microcode_l
|
||||
[[ $early_microcode ]] || early_microcode=no
|
||||
[[ $early_microcode ]] || early_microcode=yes
|
||||
[[ $logfile_l ]] && logfile="$logfile_l"
|
||||
[[ $reproducible_l ]] && reproducible="$reproducible_l"
|
||||
[[ $loginstall_l ]] && loginstall="$loginstall_l"
|
||||
@@ -761,7 +777,9 @@ if ! [[ $outfile ]]; then
|
||||
mkdir -p "$efidir/Linux"
|
||||
outfile="$efidir/Linux/linux-$kernel${MACHINE_ID:+-${MACHINE_ID}}${BUILD_ID:+-${BUILD_ID}}.efi"
|
||||
else
|
||||
if [[ $MACHINE_ID ]] && ( [[ -d /boot/${MACHINE_ID} ]] || [[ -L /boot/${MACHINE_ID} ]] ); then
|
||||
if [[ -e "/boot/vmlinuz-$kernel" ]]; then
|
||||
outfile="/boot/initramfs-$kernel.img"
|
||||
elif [[ $MACHINE_ID ]] && ( [[ -d /boot/${MACHINE_ID} ]] || [[ -L /boot/${MACHINE_ID} ]] ); then
|
||||
outfile="/boot/${MACHINE_ID}/$kernel/initrd"
|
||||
else
|
||||
outfile="/boot/initramfs-$kernel.img"
|
||||
@@ -790,7 +808,7 @@ fi
|
||||
|
||||
if ! [[ $compress ]]; then
|
||||
# check all known compressors, if none specified
|
||||
for i in pigz gzip lz4 lzop lzma xz lbzip2 bzip2 cat; do
|
||||
for i in pigz gzip lz4 lzop zstd lzma xz lbzip2 bzip2 cat; do
|
||||
command -v "$i" &>/dev/null || continue
|
||||
compress="$i"
|
||||
break
|
||||
@@ -830,6 +848,9 @@ case $compress in
|
||||
lz4)
|
||||
compress="lz4 -l -9"
|
||||
;;
|
||||
zstd)
|
||||
compress="zstd -15 -q -T0"
|
||||
;;
|
||||
esac
|
||||
|
||||
[[ $hostonly = yes ]] && hostonly="-h"
|
||||
@@ -1133,7 +1154,7 @@ if (( ${#add_device_l[@]} )); then
|
||||
push_host_devs "${add_device_l[@]}"
|
||||
fi
|
||||
|
||||
if [[ $hostonly ]]; then
|
||||
if [[ $hostonly ]] && [[ "$hostonly_default_device" != "no" ]]; then
|
||||
# in hostonly mode, determine all devices, which have to be accessed
|
||||
# and examine them for filesystem types
|
||||
|
||||
@@ -1151,6 +1172,7 @@ if [[ $hostonly ]]; then
|
||||
"/usr/lib64" \
|
||||
"/boot" \
|
||||
"/boot/efi" \
|
||||
"/boot/zipl" \
|
||||
;
|
||||
do
|
||||
mp=$(readlink -f "$mp")
|
||||
@@ -1300,7 +1322,7 @@ export initdir dracutbasedir \
|
||||
dracutmodules force_add_dracutmodules add_dracutmodules omit_dracutmodules \
|
||||
mods_to_load \
|
||||
fw_dir drivers_dir debug no_kernel kernel_only \
|
||||
omit_drivers mdadmconf lvmconf root_dev \
|
||||
omit_drivers mdadmconf lvmconf root_devs \
|
||||
use_fstab fstab_lines libdirs fscks nofscks ro_mnt \
|
||||
stdloglvl sysloglvl fileloglvl kmsgloglvl logfile \
|
||||
debug host_fs_types host_devs swap_devs sshkey add_fstab \
|
||||
@@ -1449,7 +1471,7 @@ if [[ $no_kernel != yes ]]; then
|
||||
hostonly='' instmods $drivers
|
||||
fi
|
||||
|
||||
if [[ $add_drivers ]]; then
|
||||
if [[ -n "${add_drivers// }" ]]; then
|
||||
hostonly='' instmods -c $add_drivers
|
||||
fi
|
||||
if [[ $force_drivers ]]; then
|
||||
@@ -1527,6 +1549,10 @@ if [[ $kernel_only != yes ]]; then
|
||||
dinfo "*** Resolving executable dependencies done***"
|
||||
fi
|
||||
|
||||
# Now we are done with lazy resolving, always install dependencies
|
||||
unset DRACUT_RESOLVE_LAZY
|
||||
export DRACUT_RESOLVE_DEPS=1
|
||||
|
||||
# libpthread workaround: pthread_cancel wants to dlopen libgcc_s.so
|
||||
for _dir in $libdirs; do
|
||||
for _f in "$_dir/libpthread.so"*; do
|
||||
@@ -1752,7 +1778,7 @@ if ! (
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if (( maxloglvl >= 5 )); then
|
||||
if (( maxloglvl >= 5 )) && (( verbosity_mod_l >= 0 )); then
|
||||
if [[ $allowlocal ]]; then
|
||||
"$dracutbasedir/lsinitrd.sh" "${DRACUT_TMPDIR}/initramfs.img"| ddebug
|
||||
else
|
||||
@@ -1806,10 +1832,16 @@ fi
|
||||
|
||||
command -v restorecon &>/dev/null && restorecon -- "$outfile"
|
||||
|
||||
sync $outfile 2> /dev/null
|
||||
if [ $? -ne 0 ] ; then
|
||||
dinfo "dracut: sync operartion on newly created initramfs $outfile failed"
|
||||
if ! sync "$outfile" 2> /dev/null; then
|
||||
dinfo "dracut: sync operation on newly created initramfs $outfile failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# use fsfreeze only if we're not writing to /
|
||||
if [[ "$(stat -c %m -- "$outfile")" != "/" && "$(stat -f -c %T -- "$outfile")" != "msdos" ]]; then
|
||||
if ! $(fsfreeze -f $(dirname "$outfile") 2>/dev/null && fsfreeze -u $(dirname "$outfile") 2>/dev/null); then
|
||||
dinfo "dracut: warning: could not fsfreeze $(dirname "$outfile")"
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
76
dracut.spec
76
dracut.spec
@@ -14,9 +14,11 @@
|
||||
%define with_nbd 0
|
||||
%endif
|
||||
|
||||
%define dist_free_release xxx
|
||||
|
||||
Name: dracut
|
||||
Version: xxx
|
||||
Release: xxx
|
||||
Release: %{dist_free_release}%{?dist}
|
||||
|
||||
Summary: Initramfs generator using udev
|
||||
%if 0%{?fedora} || 0%{?rhel}
|
||||
@@ -37,8 +39,10 @@ URL: https://dracut.wiki.kernel.org/
|
||||
Source0: http://www.kernel.org/pub/linux/utils/boot/dracut/dracut-%{version}.tar.xz
|
||||
Source1: https://www.gnu.org/licenses/lgpl-2.1.txt
|
||||
|
||||
BuildRequires: bash git
|
||||
BuildRequires: kmod-devel >= 15
|
||||
BuildRequires: bash
|
||||
BuildRequires: git
|
||||
BuildRequires: kmod-devel >= 23
|
||||
BuildRequires: gcc
|
||||
|
||||
%if 0%{?fedora} || 0%{?rhel}
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
@@ -136,7 +140,15 @@ NFS, iSCSI, NBD, FCoE with the dracut-network package.
|
||||
|
||||
%package network
|
||||
Summary: dracut modules to build a dracut initramfs with network support
|
||||
%if 0%{?_module_build}
|
||||
# In the module-build-service, we have pieces of dracut provided by different
|
||||
# modules ("base-runtime" provides most functionality, but we need
|
||||
# dracut-network in "installer". Since these two modules build with separate
|
||||
# dist-tags, we need to reduce this strict requirement to ignore the dist-tag.
|
||||
Requires: %{name} >= %{version}-%{dist_free_release}
|
||||
%else
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
%endif
|
||||
Requires: iputils
|
||||
Requires: iproute
|
||||
Requires: dhclient
|
||||
@@ -184,9 +196,17 @@ initramfs with dracut, which drops capabilities.
|
||||
|
||||
%package live
|
||||
Summary: dracut modules to build a dracut initramfs with live image capabilities
|
||||
%if 0%{?_module_build}
|
||||
# See the network subpackage comment.
|
||||
Requires: %{name} >= %{version}-%{dist_free_release}
|
||||
%else
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
%endif
|
||||
Requires: %{name}-network = %{version}-%{release}
|
||||
Requires: tar gzip coreutils bash device-mapper curl
|
||||
%if 0%{?fedora}
|
||||
Requires: fuse ntfs-3g
|
||||
%endif
|
||||
|
||||
%description live
|
||||
This package requires everything which is needed to build an
|
||||
@@ -266,6 +286,20 @@ rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/97masterkey
|
||||
rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/98integrity
|
||||
%endif
|
||||
|
||||
%ifnarch s390 s390x
|
||||
# remove architecture specific modules
|
||||
rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/80cms
|
||||
rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/81cio_ignore
|
||||
rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/91zipl
|
||||
rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/95dasd
|
||||
rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/95dasd_mod
|
||||
rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/95dasd_rules
|
||||
rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/95dcssblk
|
||||
rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/95zfcp
|
||||
rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/95zfcp_rules
|
||||
rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/95znet
|
||||
%endif
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT/boot/dracut
|
||||
mkdir -p $RPM_BUILD_ROOT/var/lib/dracut/overlay
|
||||
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log
|
||||
@@ -352,9 +386,7 @@ rm -rf -- $RPM_BUILD_ROOT
|
||||
%{_mandir}/man5/dracut.conf.5*
|
||||
%endif
|
||||
|
||||
%if %{defined _unitdir}
|
||||
%{dracutlibdir}/modules.d/00systemd-bootchart
|
||||
%else
|
||||
%if %{undefined _unitdir}
|
||||
%{dracutlibdir}/modules.d/00bootchart
|
||||
%endif
|
||||
%{dracutlibdir}/modules.d/00bash
|
||||
@@ -369,7 +401,6 @@ rm -rf -- $RPM_BUILD_ROOT
|
||||
%{dracutlibdir}/modules.d/45url-lib
|
||||
%{dracutlibdir}/modules.d/50drm
|
||||
%{dracutlibdir}/modules.d/50plymouth
|
||||
%{dracutlibdir}/modules.d/80cms
|
||||
%{dracutlibdir}/modules.d/80lvmmerge
|
||||
%{dracutlibdir}/modules.d/90btrfs
|
||||
%{dracutlibdir}/modules.d/90crypt
|
||||
@@ -384,28 +415,35 @@ rm -rf -- $RPM_BUILD_ROOT
|
||||
%{dracutlibdir}/modules.d/91crypt-gpg
|
||||
%{dracutlibdir}/modules.d/91crypt-loop
|
||||
%{dracutlibdir}/modules.d/95debug
|
||||
%{dracutlibdir}/modules.d/95fstab-sys
|
||||
%{dracutlibdir}/modules.d/95lunmask
|
||||
%{dracutlibdir}/modules.d/95resume
|
||||
%{dracutlibdir}/modules.d/95rootfs-block
|
||||
%{dracutlibdir}/modules.d/95dasd
|
||||
%{dracutlibdir}/modules.d/95dasd_mod
|
||||
%{dracutlibdir}/modules.d/95dasd_rules
|
||||
%{dracutlibdir}/modules.d/95fstab-sys
|
||||
%{dracutlibdir}/modules.d/95zfcp
|
||||
%{dracutlibdir}/modules.d/95zfcp_rules
|
||||
%{dracutlibdir}/modules.d/95terminfo
|
||||
%{dracutlibdir}/modules.d/95udev-rules
|
||||
%{dracutlibdir}/modules.d/95virtfs
|
||||
%ifarch s390 s390x
|
||||
%{dracutlibdir}/modules.d/80cms
|
||||
%{dracutlibdir}/modules.d/81cio_ignore
|
||||
%{dracutlibdir}/modules.d/91zipl
|
||||
%{dracutlibdir}/modules.d/95dasd
|
||||
%{dracutlibdir}/modules.d/95dasd_mod
|
||||
%{dracutlibdir}/modules.d/95dasd_rules
|
||||
%{dracutlibdir}/modules.d/95dcssblk
|
||||
%{dracutlibdir}/modules.d/95zfcp
|
||||
%{dracutlibdir}/modules.d/95zfcp_rules
|
||||
%endif
|
||||
%if %{undefined _unitdir}
|
||||
%{dracutlibdir}/modules.d/96securityfs
|
||||
%{dracutlibdir}/modules.d/97masterkey
|
||||
%{dracutlibdir}/modules.d/98integrity
|
||||
%endif
|
||||
%{dracutlibdir}/modules.d/97biosdevname
|
||||
%{dracutlibdir}/modules.d/98dracut-systemd
|
||||
%{dracutlibdir}/modules.d/98ecryptfs
|
||||
%{dracutlibdir}/modules.d/98pollcdrom
|
||||
%{dracutlibdir}/modules.d/98selinux
|
||||
%{dracutlibdir}/modules.d/98syslog
|
||||
%{dracutlibdir}/modules.d/98dracut-systemd
|
||||
%{dracutlibdir}/modules.d/98usrmount
|
||||
%{dracutlibdir}/modules.d/99base
|
||||
%{dracutlibdir}/modules.d/99fs-lib
|
||||
@@ -439,17 +477,19 @@ rm -rf -- $RPM_BUILD_ROOT
|
||||
%defattr(-,root,root,0755)
|
||||
%{dracutlibdir}/modules.d/02systemd-networkd
|
||||
%{dracutlibdir}/modules.d/40network
|
||||
%{dracutlibdir}/modules.d/45ifcfg
|
||||
%{dracutlibdir}/modules.d/90kernel-network-modules
|
||||
%{dracutlibdir}/modules.d/95fcoe
|
||||
%{dracutlibdir}/modules.d/95iscsi
|
||||
%{dracutlibdir}/modules.d/90qemu-net
|
||||
%{dracutlibdir}/modules.d/95cifs
|
||||
%{dracutlibdir}/modules.d/95fcoe
|
||||
%{dracutlibdir}/modules.d/95fcoe-uefi
|
||||
%{dracutlibdir}/modules.d/95iscsi
|
||||
%{dracutlibdir}/modules.d/95nbd
|
||||
%{dracutlibdir}/modules.d/95nfs
|
||||
%{dracutlibdir}/modules.d/95ssh-client
|
||||
%{dracutlibdir}/modules.d/45ifcfg
|
||||
%ifarch s390 s390x
|
||||
%{dracutlibdir}/modules.d/95znet
|
||||
%{dracutlibdir}/modules.d/95fcoe-uefi
|
||||
%endif
|
||||
%{dracutlibdir}/modules.d/99uefi-lib
|
||||
|
||||
%if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version}
|
||||
|
14
git2spec.pl
14
git2spec.pl
@@ -5,6 +5,8 @@ sub create_patches {
|
||||
my $pdir=shift;
|
||||
my $n=1;
|
||||
my @lines;
|
||||
my $fname;
|
||||
my $f=0;
|
||||
|
||||
mkdir $pdir, 0755;
|
||||
|
||||
@@ -12,9 +14,13 @@ sub create_patches {
|
||||
|
||||
while (<GIT>) {
|
||||
if (/^From [a-z0-9]{40} .*$/) {
|
||||
my $fname = sprintf("%04d", $n++).".patch";
|
||||
push @lines, $fname;
|
||||
$fname = sprintf("%04d", $n++).".patch";
|
||||
open FH, ">".$pdir."/".$fname;
|
||||
$f=1;
|
||||
}
|
||||
if (/^---$/ && $f == 1) {
|
||||
push @lines, $fname;
|
||||
$f=0;
|
||||
}
|
||||
print FH;
|
||||
}
|
||||
@@ -39,8 +45,8 @@ while(<>) {
|
||||
if (/^Version:/) {
|
||||
print "Version: $tag\n";
|
||||
}
|
||||
elsif (/^Release:/) {
|
||||
print "Release: $release%{?dist}\n";
|
||||
elsif (/^%define dist_free_release/) {
|
||||
print "%define dist_free_release $release\n";
|
||||
}
|
||||
elsif ((/^Source0:/) || (/^Source:/)) {
|
||||
print $_;
|
||||
|
@@ -633,7 +633,7 @@ static int dracut_install(const char *src, const char *dst, bool isdir, bool res
|
||||
|
||||
hashmap_put(items, i, i);
|
||||
|
||||
ret = asprintf(&fulldstpath, "%s/%s", destrootdir, dst);
|
||||
ret = asprintf(&fulldstpath, "%s/%s", destrootdir, (dst[0]=='/' ? (dst+1) : dst));
|
||||
if (ret < 0) {
|
||||
log_error("Out of memory!");
|
||||
exit(EXIT_FAILURE);
|
||||
@@ -720,7 +720,7 @@ static int dracut_install(const char *src, const char *dst, bool isdir, bool res
|
||||
if (lstat(fulldstpath, &sb) != 0) {
|
||||
_cleanup_free_ char *absdestpath = NULL;
|
||||
|
||||
ret = asprintf(&absdestpath, "%s/%s", destrootdir, abspath);
|
||||
ret = asprintf(&absdestpath, "%s/%s", destrootdir, (abspath[0]=='/' ? (abspath+1) : abspath));
|
||||
if (ret < 0) {
|
||||
log_error("Out of memory!");
|
||||
exit(EXIT_FAILURE);
|
||||
@@ -933,13 +933,6 @@ static int parse_argv(int argc, char *argv[])
|
||||
break;
|
||||
case ARG_KERNELDIR:
|
||||
kerneldir = strdup(optarg);
|
||||
if ((strncmp("/lib/modules/", kerneldir, 13) != 0)
|
||||
&& (strncmp("/usr/lib/modules/", kerneldir, 17) != 0)) {
|
||||
char *p;
|
||||
p = strstr(kerneldir, "/lib/modules/");
|
||||
if (p != NULL)
|
||||
kerneldirlen = p - kerneldir;
|
||||
}
|
||||
break;
|
||||
case ARG_FIRMWAREDIRS:
|
||||
firmwaredirs = strv_split(optarg, ":");
|
||||
@@ -1398,10 +1391,17 @@ static int install_modules(int argc, char **argv)
|
||||
|
||||
struct kmod_module *mod = NULL, *mod_o = NULL;
|
||||
|
||||
const char *modname = NULL;
|
||||
const char *abskpath = NULL;
|
||||
char *p;
|
||||
int i;
|
||||
|
||||
ctx = kmod_new(kerneldir, NULL);
|
||||
abskpath = kmod_get_dirname(ctx);
|
||||
|
||||
p = strstr(abskpath, "/lib/modules/");
|
||||
if (p != NULL)
|
||||
kerneldirlen = p - abskpath;
|
||||
|
||||
if (arg_hostonly) {
|
||||
char *modalias_file;
|
||||
modalias_file = getenv("DRACUT_KERNEL_MODALIASES");
|
||||
@@ -1444,6 +1444,7 @@ static int install_modules(int argc, char **argv)
|
||||
|
||||
if (argv[i][0] == '/') {
|
||||
_cleanup_kmod_module_unref_list_ struct kmod_list *modlist = NULL;
|
||||
_cleanup_free_ const char *modname = NULL;
|
||||
|
||||
r = kmod_module_new_from_path(ctx, argv[i], &mod_o);
|
||||
if (r < 0) {
|
||||
@@ -1453,7 +1454,7 @@ static int install_modules(int argc, char **argv)
|
||||
continue;
|
||||
}
|
||||
/* Check, if we have to load another module with that name instead */
|
||||
modname = kmod_module_get_name(mod_o);
|
||||
modname = strdup(kmod_module_get_name(mod_o));
|
||||
|
||||
if (!modname) {
|
||||
if (!arg_optional) {
|
||||
@@ -1529,6 +1530,7 @@ static int install_modules(int argc, char **argv)
|
||||
|
||||
for (FTSENT *ftsent = fts_read(fts); ftsent != NULL; ftsent = fts_read(fts)) {
|
||||
_cleanup_kmod_module_unref_list_ struct kmod_list *modlist = NULL;
|
||||
_cleanup_free_ const char *modname = NULL;
|
||||
|
||||
if((ftsent->fts_info == FTS_D) && !check_module_path(ftsent->fts_accpath)) {
|
||||
fts_set(fts, ftsent, FTS_SKIP);
|
||||
@@ -1551,7 +1553,7 @@ static int install_modules(int argc, char **argv)
|
||||
}
|
||||
|
||||
/* Check, if we have to load another module with that name instead */
|
||||
modname = kmod_module_get_name(mod_o);
|
||||
modname = strdup(kmod_module_get_name(mod_o));
|
||||
|
||||
if (!modname) {
|
||||
log_error("Failed to get name for module '%s'", ftsent->fts_accpath);
|
||||
@@ -1597,7 +1599,7 @@ static int install_modules(int argc, char **argv)
|
||||
}
|
||||
} else {
|
||||
_cleanup_kmod_module_unref_list_ struct kmod_list *modlist = NULL;
|
||||
char *modname = argv[i];
|
||||
char *modname = argv[i];
|
||||
|
||||
if (endswith(modname, ".ko")) {
|
||||
int len = strlen(modname);
|
||||
|
11
lsinitrd.sh
11
lsinitrd.sh
@@ -130,7 +130,7 @@ extract_files()
|
||||
for f in "${!filenames[@]}"; do
|
||||
[[ $nofileinfo ]] || echo "initramfs:/$f"
|
||||
[[ $nofileinfo ]] || echo "========================================================================"
|
||||
$CAT $image | cpio --extract --verbose --quiet --to-stdout $f 2>/dev/null
|
||||
$CAT "$image" 2>/dev/null | cpio --extract --verbose --quiet --to-stdout "$f" 2>/dev/null
|
||||
((ret+=$?))
|
||||
[[ $nofileinfo ]] || echo "========================================================================"
|
||||
[[ $nofileinfo ]] || echo
|
||||
@@ -149,9 +149,9 @@ list_files()
|
||||
{
|
||||
echo "========================================================================"
|
||||
if [ "$sorted" -eq 1 ]; then
|
||||
$CAT "$image" | cpio --extract --verbose --quiet --list | sort -n -k5
|
||||
$CAT "$image" 2>/dev/null | cpio --extract --verbose --quiet --list | sort -n -k5
|
||||
else
|
||||
$CAT "$image" | cpio --extract --verbose --quiet --list | sort -k9
|
||||
$CAT "$image" 2>/dev/null | cpio --extract --verbose --quiet --list | sort -k9
|
||||
fi
|
||||
((ret+=$?))
|
||||
echo "========================================================================"
|
||||
@@ -159,7 +159,7 @@ list_files()
|
||||
|
||||
unpack_files()
|
||||
{
|
||||
$CAT "$image" | cpio -id --quiet $verbose
|
||||
$CAT "$image" 2>/dev/null | cpio -id --quiet $verbose
|
||||
((ret+=$?))
|
||||
}
|
||||
|
||||
@@ -219,6 +219,9 @@ case $bin in
|
||||
$'\x89'LZO$'\0'*)
|
||||
CAT="lzop -d -c"
|
||||
;;
|
||||
$'0xFD2FB528'*)
|
||||
CAT="zstd -d -c"
|
||||
;;
|
||||
*)
|
||||
if echo "test"|xz|xzcat --single-stream >/dev/null 2>&1; then
|
||||
CAT="xzcat --single-stream --"
|
||||
|
@@ -265,7 +265,7 @@ while (($# > 0)); do
|
||||
;;
|
||||
-M) read_arg map_file "$@" || shift $?
|
||||
;;
|
||||
-A) host_only=0;;
|
||||
-A) dracut_args="${dracut_args} --no-host-only";;
|
||||
-B) skip_update_bootloader=1;;
|
||||
-v|--verbose) dracut_args="${dracut_args} -v";;
|
||||
-L) logfile=;;
|
||||
|
@@ -1,19 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# called by dracut
|
||||
check() {
|
||||
[[ "$mount_needs" ]] && return 1
|
||||
require_binaries $systemdutildir/systemd-bootchart || return 1
|
||||
return 255
|
||||
}
|
||||
|
||||
# called by dracut
|
||||
depends() {
|
||||
return 0
|
||||
}
|
||||
|
||||
# called by dracut
|
||||
install() {
|
||||
inst_symlink /init /sbin/init
|
||||
inst_multiple $systemdutildir/systemd-bootchart
|
||||
}
|
@@ -18,7 +18,7 @@ depends() {
|
||||
}
|
||||
|
||||
installkernel() {
|
||||
hostonly='' instmods autofs4 ipv6
|
||||
hostonly='' instmods autofs4 ipv6 algif_hash hmac sha256
|
||||
instmods -s efivarfs
|
||||
}
|
||||
|
||||
@@ -33,6 +33,7 @@ install() {
|
||||
|
||||
inst_multiple -o \
|
||||
$systemdutildir/systemd \
|
||||
$systemdutildir/systemd-coredump \
|
||||
$systemdutildir/systemd-cgroups-agent \
|
||||
$systemdutildir/systemd-shutdown \
|
||||
$systemdutildir/systemd-reply-password \
|
||||
@@ -159,7 +160,7 @@ install() {
|
||||
}
|
||||
|
||||
_mods=$(modules_load_get /usr/lib/modules-load.d)
|
||||
[[ $_mods ]] && instmods $_mods
|
||||
[[ $_mods ]] && hostonly='' instmods $_mods
|
||||
|
||||
if [[ $hostonly ]]; then
|
||||
inst_multiple -H -o \
|
||||
@@ -179,7 +180,7 @@ install() {
|
||||
${NULL}
|
||||
|
||||
_mods=$(modules_load_get /etc/modules-load.d)
|
||||
[[ $_mods ]] && instmods $_mods
|
||||
[[ $_mods ]] && hostonly='' instmods $_mods
|
||||
fi
|
||||
|
||||
if ! [[ -e "$initdir/etc/machine-id" ]]; then
|
||||
|
@@ -110,13 +110,29 @@ do_fips()
|
||||
do_rhevh_check /run/initramfs/live/isolinux/vmlinuz0 || return 1
|
||||
else
|
||||
BOOT_IMAGE="$(getarg BOOT_IMAGE)"
|
||||
[ -e "/boot/.${BOOT_IMAGE}.hmac" ] || BOOT_IMAGE="vmlinuz-${KERNEL}"
|
||||
BOOT_IMAGE_NAME="${BOOT_IMAGE##*/}"
|
||||
BOOT_IMAGE_PATH="${BOOT_IMAGE%${BOOT_IMAGE_NAME}}"
|
||||
|
||||
if ! [ -e "/boot/.${BOOT_IMAGE}.hmac" ]; then
|
||||
warn "/boot/.${BOOT_IMAGE}.hmac does not exist"
|
||||
if [ -z "$BOOT_IMAGE_NAME" ]; then
|
||||
BOOT_IMAGE_NAME="vmlinuz-${KERNEL}"
|
||||
elif ! [ -e "/boot/${BOOT_IMAGE_PATH}/${BOOT_IMAGE}" ]; then
|
||||
#if /boot is not a separate partition BOOT_IMAGE might start with /boot
|
||||
BOOT_IMAGE_PATH=${BOOT_IMAGE_PATH#"/boot"}
|
||||
#on some achitectures BOOT_IMAGE does not contain path to kernel
|
||||
#so if we can't find anything, let's treat it in the same way as if it was empty
|
||||
if ! [ -e "/boot/${BOOT_IMAGE_PATH}/${BOOT_IMAGE_NAME}" ]; then
|
||||
BOOT_IMAGE_NAME="vmlinuz-${KERNEL}"
|
||||
BOOT_IMAGE_PATH=""
|
||||
fi
|
||||
fi
|
||||
|
||||
BOOT_IMAGE_HMAC="/boot/${BOOT_IMAGE_PATH}.${BOOT_IMAGE_NAME}.hmac"
|
||||
if ! [ -e "${BOOT_IMAGE_HMAC}" ]; then
|
||||
warn "${BOOT_IMAGE_HMAC} does not exist"
|
||||
return 1
|
||||
fi
|
||||
sha512hmac -c "/boot/.${BOOT_IMAGE}.hmac" || return 1
|
||||
|
||||
sha512hmac -c "${BOOT_IMAGE_HMAC}" || return 1
|
||||
fi
|
||||
|
||||
info "All initrd crypto checks done"
|
||||
|
@@ -29,21 +29,24 @@ install() {
|
||||
|
||||
# This is from 10redhat-i18n.
|
||||
findkeymap () {
|
||||
local MAP=$1
|
||||
local MAPS=$1
|
||||
local MAPNAME=${1%.map*}
|
||||
[[ ! -f $MAP ]] && \
|
||||
MAP=$(find ${kbddir}/keymaps -type f -name ${MAPNAME} -o -name ${MAPNAME}.map -o -name ${MAPNAME}.map.\* | head -n1)
|
||||
[[ " $KEYMAPS " = *" $MAP "* ]] && return
|
||||
KEYMAPS="$KEYMAPS $MAP"
|
||||
case $MAP in
|
||||
*.gz) cmd=zgrep;;
|
||||
*.bz2) cmd=bzgrep;;
|
||||
*) cmd=grep ;;
|
||||
esac
|
||||
local map
|
||||
[[ ! -f $MAPS ]] && \
|
||||
MAPS=$(find ${kbddir}/keymaps -type f -name ${MAPNAME} -o -name ${MAPNAME}.map -o -name ${MAPNAME}.map.\*)
|
||||
|
||||
for INCL in $($cmd "^include " $MAP | while read a a b || [ -n "$a" ]; do echo ${a//\"/}; done); do
|
||||
for FN in $(find ${kbddir}/keymaps -type f -name $INCL\*); do
|
||||
findkeymap $FN
|
||||
for map in $MAPS; do
|
||||
KEYMAPS="$KEYMAPS $map"
|
||||
case $map in
|
||||
*.gz) cmd=zgrep;;
|
||||
*.bz2) cmd=bzgrep;;
|
||||
*) cmd=grep ;;
|
||||
esac
|
||||
|
||||
for INCL in $($cmd "^include " $map | while read a a b || [ -n "$a" ]; do echo ${a//\"/}; done); do
|
||||
for FN in $(find ${kbddir}/keymaps -type f -name $INCL\*); do
|
||||
findkeymap $FN
|
||||
done
|
||||
done
|
||||
done
|
||||
}
|
||||
@@ -191,7 +194,9 @@ install() {
|
||||
findkeymap ${map}
|
||||
done
|
||||
|
||||
inst_opt_decompress ${KEYMAPS}
|
||||
for keymap in ${KEYMAPS}; do
|
||||
inst_opt_decompress ${keymap}
|
||||
done
|
||||
|
||||
inst_opt_decompress ${kbddir}/consolefonts/${DEFAULT_FONT}.*
|
||||
|
||||
@@ -204,7 +209,11 @@ install() {
|
||||
if [[ ${FONT_MAP} ]]
|
||||
then
|
||||
FONT_MAP=${FONT_MAP%.trans}
|
||||
inst_simple ${kbddir}/consoletrans/${FONT_MAP}.trans
|
||||
# There are three different formats that setfont supports
|
||||
inst_simple ${kbddir}/consoletrans/${FONT_MAP} \
|
||||
|| inst_simple ${kbddir}/consoletrans/${FONT_MAP}.trans \
|
||||
|| inst_simple ${kbddir}/consoletrans/${FONT_MAP}_to_uni.trans \
|
||||
|| dwarn "Could not find FONT_MAP ${FONT_MAP}!"
|
||||
fi
|
||||
|
||||
if [[ ${FONT_UNIMAP} ]]
|
||||
|
@@ -257,7 +257,7 @@ if [ -z "$NO_BOND_MASTER" ]; then
|
||||
done
|
||||
|
||||
# Set mtu on bond master
|
||||
[ -n "$bondmtu" ] && ip link set mtu $bondmtu dev $netif
|
||||
[ -n "$bondmtu" ] && ip link set mtu $bondmtu dev $bondname
|
||||
|
||||
# add the bits to setup the needed post enslavement parameters
|
||||
for arg in $bondoptions ; do
|
||||
|
@@ -4,7 +4,7 @@
|
||||
check() {
|
||||
local _program
|
||||
|
||||
require_binaries ip dhclient || return 1
|
||||
require_binaries ip dhclient sed awk grep || return 1
|
||||
require_any_binary arping arping2 || return 1
|
||||
|
||||
return 255
|
||||
@@ -24,7 +24,7 @@ installkernel() {
|
||||
# called by dracut
|
||||
install() {
|
||||
local _arch _i _dir
|
||||
inst_multiple ip dhclient sed awk
|
||||
inst_multiple ip dhclient sed awk grep
|
||||
|
||||
inst_multiple -o arping arping2
|
||||
strstr "$(arping 2>&1)" "ARPing 2" && mv "$initdir/bin/arping" "$initdir/bin/arping2"
|
||||
|
@@ -105,6 +105,9 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh
|
||||
cond='ACTION=="add", SUBSYSTEM=="net", ENV{DEVTYPE}!="wlan|wwan"'
|
||||
# if you change the name of "91-default-net.rules", also change modules.d/80cms/cmssetup.sh
|
||||
echo "$cond, $runcmd" > /etc/udev/rules.d/91-default-net.rules
|
||||
if [ "$NEEDNET" = "1" ]; then
|
||||
echo 'for i in /tmp/net.*.did-setup; do [ -f "$i" ] && exit 0; done; exit 1' >$hookdir/initqueue/finished/wait-network.sh
|
||||
fi
|
||||
fi
|
||||
|
||||
# if you change the name of "90-net.rules", also change modules.d/80cms/cmssetup.sh
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Format:
|
||||
# bond=<bondname>[:<bondslaves>:[:<options>[:<mtu>]]]
|
||||
# bond=<bondname>[:<bondslaves>[:<options>[:<mtu>]]]
|
||||
#
|
||||
# bondslaves is a comma-separated list of physical (ethernet) interfaces
|
||||
# options is a comma-separated list on bonding options (modinfo bonding for details) in format compatible with initscripts
|
||||
@@ -12,7 +12,7 @@
|
||||
# if the mtu is specified, it will be set on the bond master
|
||||
#
|
||||
|
||||
# We translate list of slaves to space-separated here to mwke it easier to loop over them in ifup
|
||||
# We translate list of slaves to space-separated here to make it easier to loop over them in ifup
|
||||
# Ditto for bonding options
|
||||
parsebond() {
|
||||
local v=${1}:
|
||||
|
@@ -40,6 +40,6 @@ installkernel() {
|
||||
fi
|
||||
done
|
||||
else
|
||||
dracut_instmods -s "drm_crtc_init" "=drivers/gpu/drm"
|
||||
dracut_instmods -s "drm_crtc_init" "=drivers/gpu/drm" "=drivers/staging"
|
||||
fi
|
||||
}
|
||||
|
@@ -1,8 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
pkglib_dir() {
|
||||
local _dirs="/usr/lib/plymouth /usr/libexec/plymouth/"
|
||||
if type -P dpkg-architecture &>/dev/null; then
|
||||
_dirs+=" /usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/plymouth"
|
||||
fi
|
||||
for _dir in $_dirs; do
|
||||
if [ -d $_dir ]; then
|
||||
echo $_dir
|
||||
return
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# called by dracut
|
||||
check() {
|
||||
[[ "$mount_needs" ]] && return 1
|
||||
[ -z $(pkglib_dir) ] && return 1
|
||||
|
||||
require_binaries plymouthd plymouth plymouth-set-default-theme
|
||||
}
|
||||
|
||||
@@ -13,12 +28,7 @@ depends() {
|
||||
|
||||
# called by dracut
|
||||
install() {
|
||||
PKGLIBDIR="/usr/lib/plymouth"
|
||||
if type -P dpkg-architecture &>/dev/null; then
|
||||
PKGLIBDIR="/usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/plymouth"
|
||||
fi
|
||||
[ -x /usr/libexec/plymouth/plymouth-populate-initrd ] && PKGLIBDIR="/usr/libexec/plymouth"
|
||||
|
||||
PKGLIBDIR=$(pkglib_dir)
|
||||
if grep -q nash ${PKGLIBDIR}/plymouth-populate-initrd \
|
||||
|| [ ! -x ${PKGLIBDIR}/plymouth-populate-initrd ]; then
|
||||
. "$moddir"/plymouth-populate-initrd.sh
|
||||
|
@@ -4,9 +4,10 @@ PLYMOUTH_LOGO_FILE="/usr/share/pixmaps/system-logo-white.png"
|
||||
PLYMOUTH_THEME=$(plymouth-set-default-theme)
|
||||
|
||||
inst_multiple plymouthd plymouth \
|
||||
"${PLYMOUTH_LOGO_FILE}" \
|
||||
/etc/system-release
|
||||
|
||||
test -e "${PLYMOUTH_LOGO_FILE}" && inst_simple "${PLYMOUTH_LOGO_FILE}"
|
||||
|
||||
mkdir -m 0755 -p "${initdir}/usr/share/plymouth"
|
||||
|
||||
inst_libdir_file "plymouth/text.so" "plymouth/details.so"
|
||||
|
@@ -10,7 +10,7 @@ check() {
|
||||
|
||||
# called by dracut
|
||||
depends() {
|
||||
echo lvm
|
||||
echo lvm dracut-systemd systemd
|
||||
return 0
|
||||
}
|
||||
|
||||
|
40
modules.d/81cio_ignore/module-setup.sh
Executable file
40
modules.d/81cio_ignore/module-setup.sh
Executable file
@@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||
|
||||
# called by dracut
|
||||
check() {
|
||||
# do not add this module by default
|
||||
local arch=$(uname -m)
|
||||
[ "$arch" = "s390" -o "$arch" = "s390x" ] || return 1
|
||||
return 0
|
||||
}
|
||||
|
||||
cmdline() {
|
||||
local cio_accept
|
||||
|
||||
if [ -e /boot/zipl/active_devices.txt ] ; then
|
||||
while read dev etc ; do
|
||||
[ "$dev" = "#" -o "$dev" = "" ] && continue;
|
||||
if [ -z "$cio_accept" ] ; then
|
||||
cio_accept="$dev"
|
||||
else
|
||||
cio_accept="${cio_accept},${dev}"
|
||||
fi
|
||||
done < /boot/zipl/active_devices.txt
|
||||
fi
|
||||
if [ -n "$cio_accept" ] ; then
|
||||
echo "rd.cio_accept=${cio_accept}"
|
||||
fi
|
||||
}
|
||||
|
||||
# called by dracut
|
||||
install() {
|
||||
if [[ $hostonly_cmdline == "yes" ]] ; then
|
||||
local _cio_accept=$(cmdline)
|
||||
[[ $_cio_accept ]] && printf "%s\n" "$_cio_accept" >> "${initdir}/etc/cmdline.d/01cio_accept.conf"
|
||||
fi
|
||||
|
||||
inst_hook cmdline 20 "$moddir/parse-cio_accept.sh"
|
||||
inst_multiple cio_ignore
|
||||
}
|
22
modules.d/81cio_ignore/parse-cio_accept.sh
Executable file
22
modules.d/81cio_ignore/parse-cio_accept.sh
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||
|
||||
CIO_IGNORE=$(getarg cio_ignore)
|
||||
CIO_ACCEPT=$(getarg rd.cio_accept)
|
||||
|
||||
if [ -z $CIO_IGNORE ] ; then
|
||||
info "cio_ignored disabled on commandline"
|
||||
return
|
||||
fi
|
||||
if [ -n "$CIO_ACCEPT" ] ; then
|
||||
OLDIFS="$IFS"
|
||||
IFS=,
|
||||
set -- $CIO_ACCEPT
|
||||
while (($# > 0)) ; do
|
||||
info "Enabling device $1"
|
||||
cio_ignore --remove $1
|
||||
shift
|
||||
done
|
||||
IFS="$OLDIFS"
|
||||
fi
|
@@ -26,6 +26,8 @@ depends() {
|
||||
# called by dracut
|
||||
installkernel() {
|
||||
instmods btrfs
|
||||
# Make sure btfs can use fast crc32c implementations where available (bsc#1011554)
|
||||
instmods crc32c-intel
|
||||
}
|
||||
|
||||
# called by dracut
|
||||
|
@@ -16,13 +16,13 @@ crypttab_contains() {
|
||||
[ "$dev" -ef "$_dev" ] && return 0
|
||||
done
|
||||
fi
|
||||
if [ -e /usr/lib/dracut/modules.d/90crypt/block_uuid.map ]; then
|
||||
if [ -e /etc/block_uuid.map ]; then
|
||||
# search for line starting with $d
|
||||
_line=$(sed -n "\,^$d .*$,{p}" /usr/lib/dracut/modules.d/90crypt/block_uuid.map)
|
||||
_line=$(sed -n "\,^$d .*$,{p}" /etc/block_uuid.map)
|
||||
[ -z "$_line" ] && continue
|
||||
# get second column with uuid
|
||||
_uuid="$(echo $_line | sed 's,^.* \(.*$\),\1,')"
|
||||
strstr "$_uuid" "${luks##luks-}" && return 0
|
||||
strstr "$_uuid" "${luks##luks-}" && return 0
|
||||
fi
|
||||
done < /etc/crypttab
|
||||
fi
|
||||
|
@@ -29,13 +29,27 @@ if [ -f /etc/crypttab ] && getargbool 1 rd.luks.crypttab -d -n rd_NO_CRYPTTAB; t
|
||||
continue
|
||||
fi
|
||||
|
||||
# PARTUUID used in crypttab
|
||||
if [ "${dev%%=*}" = "PARTUUID" ]; then
|
||||
if [ "luks-${dev##PARTUUID=}" = "$luksname" ]; then
|
||||
luksname="$name"
|
||||
break
|
||||
fi
|
||||
|
||||
# UUID used in crypttab
|
||||
if [ "${dev%%=*}" = "UUID" ]; then
|
||||
elif [ "${dev%%=*}" = "UUID" ]; then
|
||||
if [ "luks-${dev##UUID=}" = "$luksname" ]; then
|
||||
luksname="$name"
|
||||
break
|
||||
fi
|
||||
|
||||
# ID used in crypttab
|
||||
elif [ "${dev%%=*}" = "ID" ]; then
|
||||
if [ "luks-${dev##ID=}" = "$luksname" ]; then
|
||||
luksname="$name"
|
||||
break
|
||||
fi
|
||||
|
||||
# path used in crypttab
|
||||
else
|
||||
cdev=$(readlink -f $dev)
|
||||
@@ -88,6 +102,10 @@ while [ $# -gt 0 ]; do
|
||||
;;
|
||||
allow-discards)
|
||||
allowdiscards="--allow-discards"
|
||||
;;
|
||||
header=*)
|
||||
cryptsetupopts="${cryptsetupopts} --${1}"
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
@@ -68,22 +68,50 @@ install() {
|
||||
|
||||
if [[ $hostonly ]] && [[ -f /etc/crypttab ]]; then
|
||||
# filter /etc/crypttab for the devices we need
|
||||
while read _mapper _dev _rest || [ -n "$_mapper" ]; do
|
||||
while read _mapper _dev _luksfile _luksoptions || [ -n "$_mapper" ]; do
|
||||
[[ $_mapper = \#* ]] && continue
|
||||
[[ $_dev ]] || continue
|
||||
|
||||
[[ $_dev == PARTUUID=* ]] && \
|
||||
_dev="/dev/disk/by-partuuid/${_dev#PARTUUID=}"
|
||||
|
||||
[[ $_dev == UUID=* ]] && \
|
||||
_dev="/dev/disk/by-uuid/${_dev#UUID=}"
|
||||
|
||||
echo "$_dev $(blkid $_dev -s UUID -o value)" > /usr/lib/dracut/modules.d/90crypt/block_uuid.map
|
||||
[[ $_dev == ID=* ]] && \
|
||||
_dev="/dev/disk/by-id/${_dev#ID=}"
|
||||
|
||||
for _hdev in "${!host_fs_types[@]}"; do
|
||||
[[ ${host_fs_types[$_hdev]} == "crypto_LUKS" ]] || continue
|
||||
if [[ $_hdev -ef $_dev ]] || [[ /dev/block/$_hdev -ef $_dev ]]; then
|
||||
echo "$_mapper $_dev $_rest"
|
||||
break
|
||||
fi
|
||||
echo "$_dev $(blkid $_dev -s UUID -o value)" >> "${initdir}/etc/block_uuid.map"
|
||||
|
||||
# loop through the options to check for the force option
|
||||
luksoptions=${_luksoptions}
|
||||
OLD_IFS="${IFS}"
|
||||
IFS=,
|
||||
set -- ${luksoptions}
|
||||
IFS="${OLD_IFS}"
|
||||
|
||||
while [ $# -gt 0 ]; do
|
||||
case $1 in
|
||||
force)
|
||||
forceentry="yes"
|
||||
break
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
# include the entry regardless
|
||||
if [ "${forceentry}" = "yes" ]; then
|
||||
echo "$_mapper $_dev $_luksfile $_luksoptions"
|
||||
else
|
||||
for _hdev in "${!host_fs_types[@]}"; do
|
||||
[[ ${host_fs_types[$_hdev]} == "crypto_LUKS" ]] || continue
|
||||
if [[ $_hdev -ef $_dev ]] || [[ /dev/block/$_hdev -ef $_dev ]]; then
|
||||
echo "$_mapper $_dev $_luksfile $_luksoptions"
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
done < /etc/crypttab > $initdir/etc/crypttab
|
||||
mark_hostonly /etc/crypttab
|
||||
fi
|
||||
|
@@ -35,6 +35,7 @@ else
|
||||
echo 'ACTION!="add|change", GOTO="luks_end"'
|
||||
} > /etc/udev/rules.d/70-luks.rules.new
|
||||
|
||||
SERIAL=$(getargs rd.luks.serial -d rd_LUKS_SERIAL)
|
||||
LUKS=$(getargs rd.luks.uuid -d rd_LUKS_UUID)
|
||||
tout=$(getarg rd.luks.key.tout)
|
||||
|
||||
@@ -44,7 +45,39 @@ else
|
||||
done < /etc/crypttab
|
||||
fi
|
||||
|
||||
if [ -n "$LUKS" ]; then
|
||||
if [ -n "$SERIAL" ]; then
|
||||
for serialid in $SERIAL; do
|
||||
|
||||
serialid=${serialid##luks-}
|
||||
if luksname=$(_cryptgetargsname "rd.luks.name=$serialid="); then
|
||||
luksname="${luksname#$serialid=}"
|
||||
else
|
||||
luksname="luks-$serialid"
|
||||
fi
|
||||
|
||||
if [ -z "$DRACUT_SYSTEMD" ]; then
|
||||
{
|
||||
printf -- 'ENV{ID_SERIAL_SHORT}=="*%s*", ' "$serialid"
|
||||
printf -- 'RUN+="%s --settled --unique --onetime ' "$(command -v initqueue)"
|
||||
printf -- '--name cryptroot-ask-%%k %s ' "$(command -v cryptroot-ask)"
|
||||
printf -- '$env{DEVNAME} %s %s"\n' "$luksname" "$tout"
|
||||
} >> /etc/udev/rules.d/70-luks.rules.new
|
||||
else
|
||||
luksname=$(dev_unit_name "$luksname")
|
||||
luksname="$(str_replace "$luksname" '\' '\\')"
|
||||
|
||||
if ! crypttab_contains "$serialid"; then
|
||||
{
|
||||
printf -- 'ENV{ID_SERIAL_SHORT}=="*%s*", ' "$serialid"
|
||||
printf -- 'RUN+="%s --settled --unique --onetime ' "$(command -v initqueue)"
|
||||
printf -- '--name systemd-cryptsetup-%%k %s start ' "$(command -v systemctl)"
|
||||
printf -- 'systemd-cryptsetup@%s.service"\n' "$luksname"
|
||||
} >> /etc/udev/rules.d/70-luks.rules.new
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
elif [ -n "$LUKS" ]; then
|
||||
for luksid in $LUKS; do
|
||||
|
||||
luksid=${luksid##luks-}
|
||||
@@ -64,6 +97,8 @@ else
|
||||
} >> /etc/udev/rules.d/70-luks.rules.new
|
||||
else
|
||||
luksname=$(dev_unit_name "$luksname")
|
||||
luksname="$(str_replace "$luksname" '\' '\\')"
|
||||
|
||||
if ! crypttab_contains "$luksid"; then
|
||||
{
|
||||
printf -- 'ENV{ID_FS_TYPE}=="crypto_LUKS", '
|
||||
|
@@ -1,11 +1,42 @@
|
||||
#!/bin/sh
|
||||
|
||||
_remove_dm() {
|
||||
local dev=$1
|
||||
local s
|
||||
local devname
|
||||
|
||||
for s in /sys/block/${dev}/holders/dm-* ; do
|
||||
[ -e ${s} ] || continue
|
||||
_remove_dm ${s##*/}
|
||||
done
|
||||
# multipath devices might have MD devices on top,
|
||||
# which are removed after this script. So do not
|
||||
# remove those to avoid spurious errors
|
||||
case $(cat /sys/block/${dev}/dm/uuid) in
|
||||
mpath-*)
|
||||
return 0
|
||||
;;
|
||||
*)
|
||||
devname=$(cat /sys/block/${dev}/dm/name)
|
||||
dmsetup -v --noudevsync remove "$devname" || return $?
|
||||
;;
|
||||
esac
|
||||
return 0
|
||||
}
|
||||
|
||||
_do_dm_shutdown() {
|
||||
local ret=0
|
||||
local final=$1
|
||||
local dev
|
||||
|
||||
info "Disassembling device-mapper devices"
|
||||
for dev in $(dmsetup info -c --noheadings -o name) ; do
|
||||
dmsetup -v --noudevsync remove "$dev" || ret=$?
|
||||
for dev in /sys/block/dm-* ; do
|
||||
[ -e ${dev} ] || continue
|
||||
if [ "x$final" != "x" ]; then
|
||||
_remove_dm ${dev##*/} || ret=$?
|
||||
else
|
||||
_remove_dm ${dev##*/} >/dev/null 2>&1 || ret=$?
|
||||
fi
|
||||
done
|
||||
if [ "x$final" != "x" ]; then
|
||||
info "dmsetup ls --tree"
|
||||
|
@@ -38,6 +38,6 @@ install() {
|
||||
inst_rules "$moddir/59-persistent-storage-dm.rules"
|
||||
prepare_udev_rules 59-persistent-storage-dm.rules
|
||||
|
||||
inst_hook shutdown 30 "$moddir/dm-shutdown.sh"
|
||||
inst_hook shutdown 25 "$moddir/dm-shutdown.sh"
|
||||
}
|
||||
|
||||
|
@@ -23,9 +23,6 @@ ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=="1", GOTO="dm_end"
|
||||
PROGRAM=="/bin/sh -c 'for i in $sys/$devpath/holders/dm-[0-9]*; do [ -e $$i ] && exit 0; done; exit 1;' ", \
|
||||
GOTO="dm_end"
|
||||
|
||||
ENV{DEVTYPE}!="partition", \
|
||||
RUN+="/sbin/partx -d --nr 1-1024 $env{DEVNAME}"
|
||||
|
||||
RUN+="/sbin/initqueue --onetime --unique --settled /sbin/dmraid_scan $env{DEVNAME}"
|
||||
|
||||
LABEL="dm_end"
|
||||
|
@@ -33,8 +33,6 @@ if [ -n "$DM_RAIDS" ] || getargbool 0 rd.auto; then
|
||||
if [ "${s##$r}" != "$s" ]; then
|
||||
info "Activating $s"
|
||||
dmraid -ay -i -p --rm_partitions "$s" 2>&1 | vinfo
|
||||
[ -e "/dev/mapper/$s" ] && kpartx -a "/dev/mapper/$s" 2>&1 | vinfo
|
||||
udevsettle
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
@@ -74,6 +74,8 @@ install() {
|
||||
|
||||
inst "$moddir/dmraid.sh" /sbin/dmraid_scan
|
||||
|
||||
inst_rules 66-kpartx.rules 67-kpartx-compat.rules
|
||||
|
||||
inst_libdir_file "libdmraid-events*.so*"
|
||||
|
||||
inst_rules "$moddir/61-dmraid-imsm.rules"
|
||||
|
@@ -8,7 +8,7 @@ check() {
|
||||
}
|
||||
|
||||
depends() {
|
||||
echo 90dmsquash-live
|
||||
echo dmsquash-live
|
||||
return 0
|
||||
}
|
||||
|
||||
|
@@ -70,7 +70,7 @@ ROOTFLAGS="$(getarg rootflags)"
|
||||
else
|
||||
echo "What=/dev/mapper/live-rw"
|
||||
[ -n "$ROOTFLAGS" ] && echo "Options=${ROOTFLAGS}"
|
||||
_dev=dev-mapper-live\x2drw
|
||||
_dev=$'dev-mapper-live\\x2drw'
|
||||
fi
|
||||
} > "$GENERATOR_DIR"/sysroot.mount
|
||||
|
||||
@@ -78,4 +78,5 @@ mkdir -p "$GENERATOR_DIR/$_dev.device.d"
|
||||
{
|
||||
echo "[Unit]"
|
||||
echo "JobTimeoutSec=3000"
|
||||
echo "JobRunningTimeoutSec=3000"
|
||||
} > "$GENERATOR_DIR/$_dev.device.d/timeout.conf"
|
||||
|
@@ -84,7 +84,7 @@ else
|
||||
# Symlinking /usr/bin/ntfs-3g as /sbin/mount.ntfs seems to boot
|
||||
# at the first glance, but ends with lots and lots of squashfs
|
||||
# errors, because systemd attempts to kill the ntfs-3g process?!
|
||||
if [ -x "$(find_binary "ntfs-3g")" ]; then
|
||||
if [ -x "/usr/bin/ntfs-3g" ]; then
|
||||
( exec -a @ntfs-3g ntfs-3g -o ${liverw:-ro} $livedev /run/initramfs/live ) | vwarn
|
||||
else
|
||||
die "Failed to mount block device of live image: Missing NTFS support"
|
||||
@@ -178,29 +178,26 @@ do_live_overlay() {
|
||||
warn "Using temporary overlay."
|
||||
elif [ -n "$devspec" -a -n "$pathspec" ]; then
|
||||
[ -z "$m" ] &&
|
||||
m=' Unable to find a persistent overlay; using a temporary one.'
|
||||
m=($'\n' "$m" $'\n'
|
||||
' All root filesystem changes will be lost on shutdown.'
|
||||
$'\n' ' Press any key to continue')
|
||||
echo -e "\n\n\n${m[*]}\n\n\n" > /dev/kmsg
|
||||
m=' Unable to find a persistent overlay; using a temporary one.'
|
||||
m="$m"$'\n All root filesystem changes will be lost on shutdown.'
|
||||
m="$m"$'\n Press [Enter] to continue.'
|
||||
echo -e "\n\n\n\n${m}\n\n\n" > /dev/kmsg
|
||||
if [ -n "$DRACUT_SYSTEMD" ]; then
|
||||
if plymouth --ping ; then
|
||||
if type plymouth >/dev/null 2>&1 && plymouth --ping ; then
|
||||
if getargbool 0 rhgb || getargbool 0 splash ; then
|
||||
m[0]='>>>'$'\n''>>>'$'\n''>>>'$'\n\n'
|
||||
m[5]=$'\n''<<<'$'\n''<<<'$'\n''<<<'
|
||||
plymouth display-message --text="${m[*]}"
|
||||
m='>>>'$'\n''>>>'$'\n''>>>'$'\n\n\n'"$m"
|
||||
m="${m%n.*}"$'n.\n\n\n''<<<'$'\n''<<<'$'\n''<<<'
|
||||
plymouth display-message --text="${m}"
|
||||
else
|
||||
plymouth ask-question --prompt="${m[*]}" --command=true
|
||||
plymouth ask-question --prompt="${m}" --command=true
|
||||
fi
|
||||
else
|
||||
m[0]='>>>'
|
||||
m[5]='<<<'
|
||||
unset -v m[2] m[4]
|
||||
systemd-ask-password --timeout=0 "${m[*]}"
|
||||
m=">>>${m//.[[:space:]]/.} <<<"
|
||||
systemd-ask-password --timeout=0 "${m}"
|
||||
fi
|
||||
else
|
||||
plymouth --ping && plymouth --quit
|
||||
read -s -r -p $'\n\n'"${m[*]}:" -n 1 reply
|
||||
type plymouth >/dev/null 2>&1 && plymouth --ping && plymouth --quit
|
||||
read -s -r -p $'\n\n'"${m}" -n 1 reply
|
||||
fi
|
||||
fi
|
||||
if [ -n "$overlayfs" ]; then
|
||||
|
@@ -32,17 +32,20 @@ installkernel() {
|
||||
"=drivers/clk" \
|
||||
"=drivers/dma" \
|
||||
"=drivers/extcon" \
|
||||
"=drivers/hwspinlock" \
|
||||
"=drivers/i2c/busses" \
|
||||
"=drivers/mfd" \
|
||||
"=drivers/phy" \
|
||||
"=drivers/power" \
|
||||
"=drivers/regulator" \
|
||||
"=drivers/rpmsg" \
|
||||
"=drivers/rtc" \
|
||||
"=drivers/soc" \
|
||||
"=drivers/usb/chipidea" \
|
||||
"=drivers/usb/dwc2" \
|
||||
"=drivers/usb/dwc3" \
|
||||
"=drivers/usb/host" \
|
||||
"=drivers/usb/misc" \
|
||||
"=drivers/usb/musb" \
|
||||
"=drivers/usb/phy" \
|
||||
"=drivers/scsi/hisi_sas" \
|
||||
@@ -57,7 +60,7 @@ installkernel() {
|
||||
if [[ -z $filesystems ]]; then
|
||||
dracut_instmods -o -P ".*/(kernel/fs/nfs|kernel/fs/nfsd|kernel/fs/lockd)/.*" '=fs'
|
||||
fi
|
||||
else
|
||||
elif [[ "${host_fs_types[*]}" ]]; then
|
||||
hostonly='' instmods "${host_fs_types[@]}"
|
||||
fi
|
||||
fi
|
||||
|
@@ -57,4 +57,5 @@ mkdir -p "$GENERATOR_DIR/dev-mapper-live\x2drw.device.d"
|
||||
{
|
||||
echo "[Unit]"
|
||||
echo "JobTimeoutSec=3000"
|
||||
echo "JobRunningTimeoutSec=3000"
|
||||
} > "$GENERATOR_DIR/dev-mapper-live\x2drw.device.d/timeout.conf"
|
||||
|
@@ -114,7 +114,7 @@ if [ -n "$LVS" ] ; then
|
||||
info "Scanning devices $lvmdevs for LVM logical volumes $LVS"
|
||||
lvm lvscan $lvm_ignorelockingfailure 2>&1 | vinfo
|
||||
for LV in $LVS; do
|
||||
lvm lvchange --yes -ay $lvm_quirk_args $LV 2>&1 | vinfo
|
||||
lvm lvchange --yes -K -ay $lvm_quirk_args $LV 2>&1 | vinfo
|
||||
done
|
||||
fi
|
||||
|
||||
|
@@ -10,13 +10,14 @@ is_mpath() {
|
||||
# called by dracut
|
||||
check() {
|
||||
local _rootdev
|
||||
# if there's no multipath binary, no go.
|
||||
require_binaries multipath || return 1
|
||||
|
||||
[[ $hostonly ]] || [[ $mount_needs ]] && {
|
||||
for_each_host_dev_and_slaves is_mpath || return 255
|
||||
}
|
||||
|
||||
# if there's no multipath binary, no go.
|
||||
require_binaries multipath || return 1
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
@@ -29,7 +30,7 @@ depends() {
|
||||
|
||||
# called by dracut
|
||||
cmdline() {
|
||||
for m in scsi_dh_alua scsi_dh_emc scsi_dh_rdac ; do
|
||||
for m in scsi_dh_alua scsi_dh_emc scsi_dh_rdac dm_multipath; do
|
||||
if grep -m 1 -q "$m" /proc/modules ; then
|
||||
printf 'rd.driver.pre=%s ' "$m"
|
||||
fi
|
||||
@@ -65,7 +66,8 @@ install() {
|
||||
xdrgetprio \
|
||||
/etc/xdrdevices.conf \
|
||||
/etc/multipath.conf \
|
||||
/etc/multipath/*
|
||||
/etc/multipath/* \
|
||||
/etc/multipath/conf.d/*
|
||||
|
||||
inst $(command -v partx) /sbin/partx
|
||||
|
||||
@@ -87,6 +89,7 @@ install() {
|
||||
fi
|
||||
|
||||
inst_hook cleanup 80 "$moddir/multipathd-needshutdown.sh"
|
||||
inst_hook shutdown 20 "$moddir/multipath-shutdown.sh"
|
||||
|
||||
inst_rules 40-multipath.rules 56-multipath.rules \
|
||||
62-multipath.rules 65-multipath.rules \
|
||||
|
7
modules.d/90multipath/multipath-shutdown.sh
Executable file
7
modules.d/90multipath/multipath-shutdown.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
for i in $(multipath -l -v1); do
|
||||
if ! $(dmsetup table $i | sed -n '/.*queue_if_no_path.*/q1') ; then
|
||||
dmsetup message $i 0 fail_if_no_path
|
||||
fi
|
||||
done
|
@@ -1,7 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
for i in /dev/mapper/mpath*; do
|
||||
[ -b "$i" ] || continue
|
||||
need_shutdown
|
||||
break
|
||||
for i in $(multipath -l -v1); do
|
||||
if $(dmsetup table $i | sed -n '/.*queue_if_no_path.*/q1') ; then
|
||||
need_shutdown
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
@@ -1,16 +1,19 @@
|
||||
[Unit]
|
||||
Description=Device-Mapper Multipath Device Controller
|
||||
Before=iscsi.service iscsid.service lvm2-activation-early.service
|
||||
Wants=systemd-udev-trigger.service systemd-udev-settle.service local-fs-pre.target
|
||||
After=systemd-udev-trigger.service systemd-udev-settle.service
|
||||
Before=local-fs-pre.target
|
||||
DefaultDependencies=no
|
||||
Conflicts=shutdown.target
|
||||
ConditionKernelCommandLine=!nompath
|
||||
ConditionKernelCommandLine=!rd.multipath=0
|
||||
ConditionKernelCommandLine=!rd_NO_MULTIPATH
|
||||
ConditionPathExists=/etc/multipath.conf
|
||||
ConditionKernelCommandLine=!multipath=off
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStartPre=/sbin/modprobe dm-multipath
|
||||
ExecStartPre=-/sbin/modprobe dm-multipath
|
||||
ExecStart=/sbin/multipathd -s -d
|
||||
ExecReload=/sbin/multipathd reconfigure
|
||||
ExecStop=/sbin/multipathd shutdown
|
||||
|
@@ -2,22 +2,25 @@
|
||||
|
||||
# called by dracut
|
||||
check() {
|
||||
if type -P systemd-detect-virt >/dev/null 2>&1; then
|
||||
vm=$(systemd-detect-virt --vm >/dev/null 2>&1)
|
||||
(($? != 0)) && return 255
|
||||
[[ $vm = "qemu" ]] && return 0
|
||||
[[ $vm = "kvm" ]] && return 0
|
||||
[[ $vm = "bochs" ]] && return 0
|
||||
if [[ $hostonly ]] || [[ $mount_needs ]]; then
|
||||
if type -P systemd-detect-virt >/dev/null 2>&1; then
|
||||
vm=$(systemd-detect-virt --vm >/dev/null 2>&1)
|
||||
(($? != 0)) && return 255
|
||||
[[ $vm = "qemu" ]] && return 0
|
||||
[[ $vm = "kvm" ]] && return 0
|
||||
[[ $vm = "bochs" ]] && return 0
|
||||
fi
|
||||
|
||||
for i in /sys/class/dmi/id/*_vendor; do
|
||||
[[ -f $i ]] || continue
|
||||
read vendor < $i
|
||||
[[ "$vendor" == "QEMU" ]] && return 0
|
||||
[[ "$vendor" == "Bochs" ]] && return 0
|
||||
done
|
||||
|
||||
return 255
|
||||
fi
|
||||
|
||||
for i in /sys/class/dmi/id/*_vendor; do
|
||||
[[ -f $i ]] || continue
|
||||
read vendor < $i
|
||||
[[ "$vendor" == "QEMU" ]] && return 0
|
||||
[[ "$vendor" == "Bochs" ]] && return 0
|
||||
done
|
||||
|
||||
return 255
|
||||
return 0
|
||||
}
|
||||
|
||||
# called by dracut
|
||||
|
@@ -2,28 +2,33 @@
|
||||
|
||||
# called by dracut
|
||||
check() {
|
||||
if type -P systemd-detect-virt >/dev/null 2>&1; then
|
||||
vm=$(systemd-detect-virt --vm 2>/dev/null)
|
||||
(($? != 0)) && return 255
|
||||
[[ $vm = "qemu" ]] && return 0
|
||||
[[ $vm = "kvm" ]] && return 0
|
||||
[[ $vm = "bochs" ]] && return 0
|
||||
if [[ $hostonly ]] || [[ $mount_needs ]]; then
|
||||
if type -P systemd-detect-virt >/dev/null 2>&1; then
|
||||
vm=$(systemd-detect-virt --vm 2>/dev/null)
|
||||
(($? != 0)) && return 255
|
||||
[[ $vm = "qemu" ]] && return 0
|
||||
[[ $vm = "kvm" ]] && return 0
|
||||
[[ $vm = "bochs" ]] && return 0
|
||||
fi
|
||||
|
||||
for i in /sys/class/dmi/id/*_vendor; do
|
||||
[[ -f $i ]] || continue
|
||||
read vendor < $i
|
||||
[[ "$vendor" == "QEMU" ]] && return 0
|
||||
[[ "$vendor" == "Red Hat" ]] && return 0
|
||||
[[ "$vendor" == "Bochs" ]] && return 0
|
||||
done
|
||||
|
||||
return 255
|
||||
fi
|
||||
|
||||
for i in /sys/class/dmi/id/*_vendor; do
|
||||
[[ -f $i ]] || continue
|
||||
read vendor < $i
|
||||
[[ "$vendor" == "QEMU" ]] && return 0
|
||||
[[ "$vendor" == "Red Hat" ]] && return 0
|
||||
[[ "$vendor" == "Bochs" ]] && return 0
|
||||
done
|
||||
return 255
|
||||
return 0
|
||||
}
|
||||
|
||||
# called by dracut
|
||||
installkernel() {
|
||||
# qemu specific modules
|
||||
hostonly='' instmods \
|
||||
# qemu specific modules
|
||||
hostonly='' instmods \
|
||||
ata_piix ata_generic pata_acpi cdrom sr_mod ahci \
|
||||
virtio_blk virtio virtio_ring virtio_pci \
|
||||
virtio_scsi virtio_console virtio_rng \
|
||||
|
40
modules.d/91zipl/install_zipl_cmdline.sh
Executable file
40
modules.d/91zipl/install_zipl_cmdline.sh
Executable file
@@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
|
||||
DEV="$1"
|
||||
MNT=/boot/zipl
|
||||
|
||||
if [ -z "$DEV" ] ; then
|
||||
echo "No IPL device given"
|
||||
> /tmp/install.zipl.cmdline-done
|
||||
exit 1
|
||||
fi
|
||||
|
||||
[ -d ${MNT} ] || mkdir -p ${MNT}
|
||||
|
||||
mount -o ro ${DEV} ${MNT}
|
||||
if [ "$?" != "0" ] ; then
|
||||
echo "Failed to mount ${MNT}"
|
||||
> /tmp/install.zipl.cmdline-done
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -f ${MNT}/dracut-cmdline.conf ] ; then
|
||||
cp ${MNT}/dracut-cmdline.conf /etc/cmdline.d/99zipl.conf
|
||||
fi
|
||||
|
||||
if [ -f ${MNT}/active_devices.txt ] ; then
|
||||
while read dev etc ; do
|
||||
[ "$dev" = "#" -o "$dev" = "" ] && continue;
|
||||
cio_ignore -r $dev
|
||||
done < ${MNT}/active_devices.txt
|
||||
fi
|
||||
|
||||
umount ${MNT}
|
||||
|
||||
if [ -f /etc/cmdline.d/99zipl.conf ] ; then
|
||||
systemctl restart dracut-cmdline.service
|
||||
systemctl restart systemd-udev-trigger.service
|
||||
fi
|
||||
> /tmp/install.zipl.cmdline-done
|
||||
|
||||
exit 0
|
61
modules.d/91zipl/module-setup.sh
Executable file
61
modules.d/91zipl/module-setup.sh
Executable file
@@ -0,0 +1,61 @@
|
||||
#!/bin/bash
|
||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||
|
||||
# called by dracut
|
||||
check() {
|
||||
local _arch=$(uname -m)
|
||||
# Only for systems on s390 using indirect booting via userland grub
|
||||
[ "$_arch" = "s390" -o "$_arch" = "s390x" ] || return 1
|
||||
# /boot/zipl contains a first stage kernel used to launch grub in initrd
|
||||
[ -d /boot/zipl ] || return 1
|
||||
return 0
|
||||
}
|
||||
|
||||
# called by dracut
|
||||
depends() {
|
||||
echo grub2
|
||||
return 0
|
||||
}
|
||||
|
||||
# called by dracut
|
||||
installkernel() {
|
||||
local _boot_zipl
|
||||
|
||||
_boot_zipl=$(sed -n 's/\(.*\)\w*\/boot\/zipl.*/\1/p' /etc/fstab)
|
||||
if [ -n "$_boot_zipl" ] ; then
|
||||
eval $(blkid -s TYPE -o udev ${_boot_zipl})
|
||||
if [ -n "$ID_FS_TYPE" ] ; then
|
||||
case "$ID_FS_TYPE" in
|
||||
ext?)
|
||||
ID_FS_TYPE=ext4
|
||||
;;
|
||||
esac
|
||||
instmods ${ID_FS_TYPE}
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# called by dracut
|
||||
cmdline() {
|
||||
local _boot_zipl
|
||||
|
||||
_boot_zipl=$(sed -n 's/\(.*\)\w*\/boot\/zipl.*/\1/p' /etc/fstab)
|
||||
if [ -n "$_boot_zipl" ] ; then
|
||||
echo "rd.zipl=${_boot_zipl}"
|
||||
fi
|
||||
}
|
||||
|
||||
# called by dracut
|
||||
install() {
|
||||
inst_multiple mount umount
|
||||
|
||||
inst_hook cmdline 91 "$moddir/parse-zipl.sh"
|
||||
inst_script "${moddir}/install_zipl_cmdline.sh" /sbin/install_zipl_cmdline.sh
|
||||
if [[ $hostonly_cmdline == "yes" ]] ; then
|
||||
local _zipl=$(cmdline)
|
||||
|
||||
[[ $_zipl ]] && printf "%s\n" "$_zipl" > "${initdir}/etc/cmdline.d/91zipl.conf"
|
||||
fi
|
||||
dracut_need_initqueue
|
||||
}
|
41
modules.d/91zipl/parse-zipl.sh
Executable file
41
modules.d/91zipl/parse-zipl.sh
Executable file
@@ -0,0 +1,41 @@
|
||||
#!/bin/sh
|
||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||
|
||||
zipl_arg=$(getarg rd.zipl)
|
||||
|
||||
if [ -n "$zipl_arg" ] ; then
|
||||
case "$zipl_arg" in
|
||||
LABEL=*) \
|
||||
zipl_env="ENV{ID_FS_LABEL}"
|
||||
zipl_val=${zipl_arg#LABEL=}
|
||||
zipl_arg="/dev/disk/by-label/${zipl_val}"
|
||||
;;
|
||||
UUID=*) \
|
||||
zipl_env="ENV{ID_FS_UUID}"
|
||||
zipl_val=${zipl_arg#UUID=}
|
||||
zipl_arg="/dev/disk/by-uuid/${zipl_val}"
|
||||
;;
|
||||
/dev/mapper/*) \
|
||||
zipl_env="ENV{DM_NAME}"
|
||||
zipl_val=${zipl_arg#/dev/mapper/}
|
||||
;;
|
||||
/dev/disk/by-*) \
|
||||
zipl_env="SYMLINK"
|
||||
zipl_val=${zipl_arg#/dev/}
|
||||
;;
|
||||
/dev/*) \
|
||||
zipl_env="KERNEL"
|
||||
zipl_val=${zipl_arg}
|
||||
;;
|
||||
esac
|
||||
if [ "$zipl_env" ] ; then
|
||||
{
|
||||
printf 'ACTION=="add|change", SUBSYSTEM=="block", %s=="%s", RUN+="/sbin/initqueue --settled --onetime --unique --name install_zipl_cmdline /sbin/install_zipl_cmdline.sh %s"\n' \
|
||||
${zipl_env} ${zipl_val} ${zipl_arg}
|
||||
echo "[ -f /tmp/install.zipl.cmdline-done ]" >$hookdir/initqueue/finished/wait-zipl-conf.sh
|
||||
} >> /etc/udev/rules.d/99zipl-conf.rules
|
||||
cat /etc/udev/rules.d/99zipl-conf.rules
|
||||
fi
|
||||
wait_for_dev -n "$zipl_arg"
|
||||
fi
|
@@ -7,7 +7,7 @@ done
|
||||
|
||||
mod_args="${mod_args#*,}"
|
||||
|
||||
if [ -n "$mod_args" ]; then
|
||||
if [ -x /sbin/dasd_cio_free -a -n "$mod_args" ]; then
|
||||
[ -d /etc/modprobe.d ] || mkdir -m 0755 -p /etc/modprobe.d
|
||||
echo "options dasd_mod dasd=$mod_args" >> /etc/modprobe.d/dasd_mod.conf
|
||||
fi
|
||||
|
28
modules.d/95dcssblk/module-setup.sh
Normal file
28
modules.d/95dcssblk/module-setup.sh
Normal file
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||
|
||||
# called by dracut
|
||||
check() {
|
||||
local _arch=$(uname -m)
|
||||
[ "$_arch" = "s390" -o "$_arch" = "s390x" ] || return 1
|
||||
return 0
|
||||
}
|
||||
|
||||
# called by dracut
|
||||
installkernel() {
|
||||
if [ -e /sys/devices/dcssblk/*/block/dcssblk* ];then
|
||||
hostonly='' instmods dcssblk
|
||||
fi
|
||||
}
|
||||
|
||||
# called by dracut
|
||||
install() {
|
||||
inst_hook cmdline 30 "$moddir/parse-dcssblk.sh"
|
||||
# If there is a config file which contains avail (best only of root device)
|
||||
# disks to activate add it and use it during boot -> then we do not need
|
||||
# a kernel param anymore
|
||||
#if [[ $hostonly ]]; then
|
||||
# inst /etc/dcssblk.conf
|
||||
#fi
|
||||
}
|
8
modules.d/95dcssblk/parse-dcssblk.sh
Normal file
8
modules.d/95dcssblk/parse-dcssblk.sh
Normal file
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||
dcssblk_arg=$(getarg rd.dcssblk=)
|
||||
if [ $? == 0 ];then
|
||||
info "Loading dcssblk segments=$dcssblk_arg"
|
||||
modprobe dcssblk segments=$dcssblk_arg
|
||||
fi
|
@@ -12,6 +12,11 @@ check() {
|
||||
}
|
||||
[[ $hostonly ]] || [[ $mount_needs ]] && {
|
||||
[ -d /sys/firmware/efi ] || return 255
|
||||
for c in /sys/bus/fcoe/devices/ctlr_* ; do
|
||||
[ -L $c ] || continue
|
||||
fcoe_ctlr=$c
|
||||
done
|
||||
[ -z "$fcoe_ctlr" ] && return 255
|
||||
}
|
||||
require_binaries dcbtool fipvlan lldpad ip readlink || return 1
|
||||
return 0
|
||||
|
@@ -7,8 +7,10 @@
|
||||
# Write udev rules
|
||||
{
|
||||
if [ -n "$fcoe_mac" ] ; then
|
||||
printf 'ACTION=="add", SUBSYSTEM=="net", ATTR{address}=="%s", RUN+="/sbin/initqueue --onetime --unique --name fcoe-up-$env{INTERFACE} /sbin/fcoe-up $env{INTERFACE} %s"\n' "$fcoe_mac" "$fcoe_dcb"
|
||||
printf 'ACTION=="add", SUBSYSTEM=="net", ATTR{address}=="%s", RUN+="/sbin/initqueue --onetime --unique --name fcoe-up-$env{INTERFACE} /sbin/fcoe-up $env{INTERFACE} %s %s"\n' "$fcoe_mac" "$fcoe_dcb" "$fcoe_mode"
|
||||
printf 'ACTION=="add", SUBSYSTEM=="net", ATTR{address}=="%s", RUN+="/sbin/initqueue --onetime --timeout --unique --name fcoe-timeout-$env{INTERFACE} /sbin/fcoe-up $env{INTERFACE} %s %s"\n' "$fcoe_mac" "$fcoe_dcb" "$fcoe_mode"
|
||||
else
|
||||
printf 'ACTION=="add", SUBSYSTEM=="net", NAME=="%s", RUN+="/sbin/initqueue --onetime --unique --name fcoe-up-$env{INTERFACE} /sbin/fcoe-up $env{INTERFACE} %s"\n' "$fcoe_interface" "$fcoe_dcb"
|
||||
printf 'ACTION=="add", SUBSYSTEM=="net", NAME=="%s", RUN+="/sbin/initqueue --onetime --unique --name fcoe-up-$env{INTERFACE} /sbin/fcoe-up $env{INTERFACE} %s %s"\n' "$fcoe_interface" "$fcoe_dcb" "$fcoe_mode"
|
||||
printf 'ACTION=="add", SUBSYSTEM=="net", NAME=="%s", RUN+="/sbin/initqueue --onetime --timeout --unique --name fcoe-timeout-$env{INTERFACE} /sbin/fcoe-up $env{INTERFACE} %s %s"\n' "$fcoe_interface" "$fcoe_dcb" "$fcoe_mode"
|
||||
fi
|
||||
} >> /etc/udev/rules.d/92-fcoe.rules
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# We get called like this:
|
||||
# fcoe-up <network-device> <dcb|nodcb>
|
||||
# fcoe-up <network-device> <dcb|nodcb> <fabric|vn2vn>
|
||||
#
|
||||
# Note currently only nodcb is supported, the dcb option is reserved for
|
||||
# future use.
|
||||
@@ -15,6 +15,7 @@ type ip_to_var >/dev/null 2>&1 || . /lib/net-lib.sh
|
||||
|
||||
netif=$1
|
||||
dcb=$2
|
||||
mode=$3
|
||||
vlan="yes"
|
||||
|
||||
iflink=$(cat /sys/class/net/$netif/iflink)
|
||||
@@ -27,10 +28,18 @@ fi
|
||||
ip link set dev $netif up
|
||||
linkup "$netif"
|
||||
|
||||
# Some fcoemon implementations expect --syslog=true
|
||||
syslogopt="--syslog"
|
||||
if fcoemon -h|grep syslog|grep -q yes; then
|
||||
fcoemonyes="$syslogopt=yes"
|
||||
fi
|
||||
|
||||
|
||||
netdriver=$(readlink -f /sys/class/net/$netif/device/driver)
|
||||
netdriver=${netdriver##*/}
|
||||
|
||||
write_fcoemon_cfg() {
|
||||
[ -f /etc/fcoe/cfg-$netif ] && return
|
||||
echo FCOE_ENABLE=\"yes\" > /etc/fcoe/cfg-$netif
|
||||
if [ "$dcb" = "dcb" ]; then
|
||||
echo DCB_REQUIRED=\"yes\" >> /etc/fcoe/cfg-$netif
|
||||
@@ -42,9 +51,23 @@ write_fcoemon_cfg() {
|
||||
else
|
||||
echo AUTO_VLAN=\"no\" >> /etc/fcoe/cfg-$netif
|
||||
fi
|
||||
echo MODE=\"fabric\" >> /etc/fcoe/cfg-$netif
|
||||
if [ "$mode" = "vn2vn" ] ; then
|
||||
echo MODE=\"vn2vn\" >> /etc/fcoe/cfg-$netif
|
||||
else
|
||||
echo MODE=\"fabric\" >> /etc/fcoe/cfg-$netif
|
||||
fi
|
||||
}
|
||||
|
||||
if [ "$netdriver" = "bnx2x" ]; then
|
||||
# If driver is bnx2x, do not use /sys/module/fcoe/parameters/create but fipvlan
|
||||
modprobe 8021q
|
||||
udevadm settle --timeout=30
|
||||
# Sleep for 13 s to allow dcb negotiation
|
||||
sleep 13
|
||||
fipvlan "$netif" -c -s
|
||||
need_shutdown
|
||||
exit
|
||||
fi
|
||||
if [ "$dcb" = "dcb" ]; then
|
||||
# wait for lldpad to be ready
|
||||
i=0
|
||||
@@ -77,20 +100,8 @@ if [ "$dcb" = "dcb" ]; then
|
||||
done
|
||||
|
||||
sleep 1
|
||||
|
||||
write_fcoemon_cfg
|
||||
fcoemon --syslog
|
||||
elif [ "$netdriver" = "bnx2x" ]; then
|
||||
# If driver is bnx2x, do not use /sys/module/fcoe/parameters/create but fipvlan
|
||||
modprobe 8021q
|
||||
udevadm settle --timeout=30
|
||||
# Sleep for 13 s to allow dcb negotiation
|
||||
sleep 13
|
||||
fipvlan "$netif" -c -s
|
||||
else
|
||||
vlan="no"
|
||||
write_fcoemon_cfg
|
||||
fcoemon --syslog
|
||||
fi
|
||||
write_fcoemon_cfg
|
||||
fcoemon $syslogopt
|
||||
|
||||
need_shutdown
|
||||
|
@@ -41,28 +41,52 @@ get_vlan_parent() {
|
||||
|
||||
# called by dracut
|
||||
cmdline() {
|
||||
{
|
||||
for c in /sys/bus/fcoe/devices/ctlr_* ; do
|
||||
[ -L $c ] || continue
|
||||
read enabled < $c/enabled
|
||||
read mode < $c/mode
|
||||
[ $enabled -eq 0 ] && continue
|
||||
if [ $mode = "VN2VN" ] ; then
|
||||
mode="vn2vn"
|
||||
else
|
||||
mode="fabric"
|
||||
fi
|
||||
d=$(cd -P $c; echo $PWD)
|
||||
i=${d%/*}
|
||||
ifname=${i##*/}
|
||||
read mac < ${i}/address
|
||||
s=$(dcbtool gc ${i##*/} dcb 2>/dev/null | sed -n 's/^DCB State:\t*\(.*\)/\1/p')
|
||||
if [ -z "$s" ] ; then
|
||||
p=$(get_vlan_parent ${i})
|
||||
if [ "$p" ] ; then
|
||||
s=$(dcbtool gc ${p} dcb 2>/dev/null | sed -n 's/^DCB State:\t*\(.*\)/\1/p')
|
||||
ifname=${p##*/}
|
||||
fi
|
||||
fi
|
||||
if [ "$s" = "on" ] ; then
|
||||
dcb="dcb"
|
||||
else
|
||||
dcb="nodcb"
|
||||
fi
|
||||
|
||||
for c in /sys/bus/fcoe/devices/ctlr_* ; do
|
||||
[ -L $c ] || continue
|
||||
read enabled < $c/enabled
|
||||
[ $enabled -eq 0 ] && continue
|
||||
d=$(cd -P $c; echo $PWD)
|
||||
i=${d%/*}
|
||||
read mac < ${i}/address
|
||||
s=$(dcbtool gc ${i##*/} dcb | sed -n 's/^DCB State:\t*\(.*\)/\1/p')
|
||||
if [ -z "$s" ] ; then
|
||||
p=$(get_vlan_parent ${i})
|
||||
if [ "$p" ] ; then
|
||||
s=$(dcbtool gc ${p} dcb | sed -n 's/^DCB State:\t*\(.*\)/\1/p')
|
||||
fi
|
||||
fi
|
||||
if [ "$s" = "on" ] ; then
|
||||
dcb="dcb"
|
||||
else
|
||||
dcb="nodcb"
|
||||
fi
|
||||
echo "fcoe=${mac}:${dcb}"
|
||||
done
|
||||
# Some Combined Network Adapters(CNAs) implement DCB in firmware.
|
||||
# Do not run software-based DCB or LLDP on CNAs that implement DCB.
|
||||
# If the network interface provides hardware DCB/DCBX capabilities,
|
||||
# DCB_REQUIRED in "/etc/fcoe/cfg-xxx" is expected to set to "no".
|
||||
#
|
||||
# Force "nodcb" if there's any DCB_REQUIRED="no"(child or vlan parent).
|
||||
grep -q "^[[:blank:]]*DCB_REQUIRED=\"no\"" /etc/fcoe/cfg-${i##*/} &>/dev/null
|
||||
[ $? -eq 0 ] && dcb="nodcb"
|
||||
if [ "$p" ] ; then
|
||||
grep -q "^[[:blank:]]*DCB_REQUIRED=\"no\"" /etc/fcoe/cfg-${p} &>/dev/null
|
||||
[ $? -eq 0 ] && dcb="nodcb"
|
||||
fi
|
||||
|
||||
echo "ifname=${ifname}:${mac}"
|
||||
echo "fcoe=${ifname}:${dcb}:${mode}"
|
||||
done
|
||||
} | sort | uniq
|
||||
}
|
||||
|
||||
# called by dracut
|
||||
@@ -80,12 +104,15 @@ install() {
|
||||
local _fcoeconf=$(cmdline)
|
||||
[[ $_fcoeconf ]] && printf "%s\n" "$_fcoeconf" >> "${initdir}/etc/cmdline.d/95fcoe.conf"
|
||||
fi
|
||||
inst_multiple /etc/fcoe/cfg-*
|
||||
|
||||
inst "$moddir/fcoe-up.sh" "/sbin/fcoe-up"
|
||||
inst "$moddir/fcoe-edd.sh" "/sbin/fcoe-edd"
|
||||
inst "$moddir/fcoe-genrules.sh" "/sbin/fcoe-genrules.sh"
|
||||
inst_hook pre-trigger 03 "$moddir/lldpad.sh"
|
||||
inst_hook cmdline 99 "$moddir/parse-fcoe.sh"
|
||||
inst_hook cleanup 90 "$moddir/cleanup-fcoe.sh"
|
||||
inst_hook shutdown 40 "$moddir/stop-fcoe.sh"
|
||||
dracut_need_initqueue
|
||||
}
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Supported formats:
|
||||
# fcoe=<networkdevice>:<dcb|nodcb>
|
||||
# fcoe=<macaddress>:<dcb|nodcb>
|
||||
# fcoe=<networkdevice>:<dcb|nodcb>:<fabric|vn2vn>
|
||||
# fcoe=<macaddress>:<dcb|nodcb>:<fabric|vn2vn>
|
||||
#
|
||||
# Note currently only nodcb is supported, the dcb option is reserved for
|
||||
# future use.
|
||||
@@ -10,8 +10,8 @@
|
||||
# Note letters in the macaddress must be lowercase!
|
||||
#
|
||||
# Examples:
|
||||
# fcoe=eth0:nodcb
|
||||
# fcoe=4a:3f:4c:04:f8:d7:nodcb
|
||||
# fcoe=eth0:nodcb:vn2vn
|
||||
# fcoe=4a:3f:4c:04:f8:d7:nodcb:fabric
|
||||
|
||||
[ -z "$fcoe" ] && fcoe=$(getarg fcoe=)
|
||||
|
||||
@@ -32,11 +32,25 @@ parse_fcoe_opts() {
|
||||
2)
|
||||
fcoe_interface=$1
|
||||
fcoe_dcb=$2
|
||||
fcoe_mode="fabric"
|
||||
return 0
|
||||
;;
|
||||
3)
|
||||
fcoe_interface=$1
|
||||
fcoe_dcb=$2
|
||||
fcoe_mode=$3
|
||||
return 0
|
||||
;;
|
||||
7)
|
||||
fcoe_mac=$1:$2:$3:$4:$5:$6
|
||||
fcoe_dcb=$7
|
||||
fcoe_mode="fabric"
|
||||
return 0
|
||||
;;
|
||||
8)
|
||||
fcoe_mac=$1:$2:$3:$4:$5:$6
|
||||
fcoe_dcb=$7
|
||||
fcoe_mode=$8
|
||||
return 0
|
||||
;;
|
||||
*)
|
||||
|
6
modules.d/95fcoe/stop-fcoe.sh
Executable file
6
modules.d/95fcoe/stop-fcoe.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
for f in /sys/bus/fcoe/devices/ctlr_* ; do
|
||||
[ -e $f ] || continue
|
||||
echo 0 > $f/enabled
|
||||
done
|
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ -z "${DRACUT_SYSTEMD}" ] && [ -e /sys/module/bnx2i ] && killproc iscsiuio
|
||||
[ -e /sys/module/bnx2i ] && killproc iscsiuio
|
||||
|
||||
|
@@ -36,23 +36,24 @@ iroot=${iroot#:}
|
||||
# figured out a way how to check whether this is built-in or not
|
||||
modprobe crc32c 2>/dev/null
|
||||
|
||||
if [ -z "${DRACUT_SYSTEMD}" ] && [ -e /sys/module/bnx2i ] && ! [ -e /tmp/iscsiuio-started ]; then
|
||||
if [ -e /sys/module/bnx2i ] && ! [ -e /tmp/iscsiuio-started ]; then
|
||||
iscsiuio
|
||||
> /tmp/iscsiuio-started
|
||||
fi
|
||||
|
||||
handle_firmware()
|
||||
{
|
||||
if ! iscsistart -f; then
|
||||
warn "iscistart: Could not get list of targets from firmware."
|
||||
return 1
|
||||
if ! iscsistart-flocked -f; then
|
||||
warn "iscistart: Could not get list of targets from firmware. Skipping."
|
||||
echo 'skipped' > "/tmp/iscsistarted-firmware"
|
||||
return 0
|
||||
fi
|
||||
|
||||
for p in $(getargs rd.iscsi.param -d iscsi_param); do
|
||||
iscsi_param="$iscsi_param --param $p"
|
||||
done
|
||||
|
||||
if ! iscsistart -b $iscsi_param; then
|
||||
if ! iscsistart-flocked -b $iscsi_param; then
|
||||
warn "'iscsistart -b $iscsi_param' failed with return code $?"
|
||||
fi
|
||||
|
||||
@@ -116,11 +117,6 @@ handle_netroot()
|
||||
mkdir -p /etc/iscsi
|
||||
ln -fs /run/initiatorname.iscsi /etc/iscsi/initiatorname.iscsi
|
||||
> /tmp/iscsi_set_initiator
|
||||
if [ -n "$DRACUT_SYSTEMD" ]; then
|
||||
systemctl try-restart iscsid
|
||||
# FIXME: iscsid is not yet ready, when the service is :-/
|
||||
sleep 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$iscsi_initiator" ]; then
|
||||
@@ -137,11 +133,6 @@ handle_netroot()
|
||||
mkdir -p /etc/iscsi
|
||||
ln -fs /run/initiatorname.iscsi /etc/iscsi/initiatorname.iscsi
|
||||
> /tmp/iscsi_set_initiator
|
||||
if [ -n "$DRACUT_SYSTEMD" ]; then
|
||||
systemctl try-restart iscsid
|
||||
# FIXME: iscsid is not yet ready, when the service is :-/
|
||||
sleep 1
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
@@ -162,11 +153,6 @@ handle_netroot()
|
||||
if ! [ -e /etc/iscsi/initiatorname.iscsi ]; then
|
||||
mkdir -p /etc/iscsi
|
||||
ln -fs /run/initiatorname.iscsi /etc/iscsi/initiatorname.iscsi
|
||||
if [ -n "$DRACUT_SYSTEMD" ]; then
|
||||
systemctl try-restart iscsid
|
||||
# FIXME: iscsid is not yet ready, when the service is :-/
|
||||
sleep 1
|
||||
fi
|
||||
fi
|
||||
# FIXME $iscsi_protocol??
|
||||
|
||||
@@ -192,7 +178,7 @@ handle_netroot()
|
||||
--description="Login iSCSI Target $iscsi_target_name" \
|
||||
-p 'DefaultDependencies=no' \
|
||||
--unit="$netroot_enc" -- \
|
||||
$(command -v iscsistart) \
|
||||
$(command -v iscsistart-flocked) \
|
||||
-i "$iscsi_initiator" -t "$iscsi_target_name" \
|
||||
-g "$iscsi_target_group" -a "$iscsi_target_ip" \
|
||||
-p "$iscsi_target_port" \
|
||||
@@ -210,7 +196,7 @@ handle_netroot()
|
||||
fi
|
||||
fi
|
||||
else
|
||||
iscsistart -i "$iscsi_initiator" -t "$iscsi_target_name" \
|
||||
iscsistart-flocked -i "$iscsi_initiator" -t "$iscsi_target_name" \
|
||||
-g "$iscsi_target_group" -a "$iscsi_target_ip" \
|
||||
-p "$iscsi_target_port" \
|
||||
${iscsi_username:+-u "$iscsi_username"} \
|
||||
@@ -233,14 +219,6 @@ if [ "$netif" != "timeout" ] && getargbool 1 rd.iscsi.waitnet; then
|
||||
all_ifaces_setup || exit 0
|
||||
fi
|
||||
|
||||
if [ "$netif" = "timeout" ] && all_ifaces_setup; then
|
||||
# s.th. went wrong and the timeout script hits
|
||||
# restart
|
||||
systemctl restart iscsid
|
||||
# damn iscsid is not ready after unit says it's ready
|
||||
sleep 2
|
||||
fi
|
||||
|
||||
if getargbool 0 rd.iscsi.firmware -d -y iscsi_firmware ; then
|
||||
if [ "$netif" = "timeout" ] || [ "$netif" = "online" ]; then
|
||||
handle_firmware
|
||||
|
5
modules.d/95iscsi/iscsistart-flocked.sh
Executable file
5
modules.d/95iscsi/iscsistart-flocked.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
{
|
||||
flock -e 9
|
||||
iscsistart "$@"
|
||||
} 9>/tmp/.iscsi_lock
|
@@ -194,41 +194,12 @@ install() {
|
||||
[[ $_iscsiconf ]] && printf "%s\n" "$_iscsiconf" >> "${initdir}/etc/cmdline.d/95iscsi.conf"
|
||||
fi
|
||||
|
||||
inst "$moddir/iscsistart-flocked.sh" "/bin/iscsistart-flocked"
|
||||
inst_hook cmdline 90 "$moddir/parse-iscsiroot.sh"
|
||||
inst_hook cleanup 90 "$moddir/cleanup-iscsi.sh"
|
||||
inst "$moddir/iscsiroot.sh" "/sbin/iscsiroot"
|
||||
if ! dracut_module_included "systemd"; then
|
||||
inst "$moddir/mount-lun.sh" "/bin/mount-lun.sh"
|
||||
else
|
||||
inst_multiple -o \
|
||||
$systemdsystemunitdir/iscsi.service \
|
||||
$systemdsystemunitdir/iscsid.service \
|
||||
$systemdsystemunitdir/iscsid.socket \
|
||||
$systemdsystemunitdir/iscsiuio.service \
|
||||
$systemdsystemunitdir/iscsiuio.socket \
|
||||
iscsiadm iscsid
|
||||
|
||||
mkdir -p "${initdir}/$systemdsystemunitdir/sockets.target.wants"
|
||||
for i in \
|
||||
iscsiuio.socket \
|
||||
; do
|
||||
ln_r "$systemdsystemunitdir/${i}" "$systemdsystemunitdir/sockets.target.wants/${i}"
|
||||
done
|
||||
|
||||
mkdir -p "${initdir}/$systemdsystemunitdir/basic.target.wants"
|
||||
for i in \
|
||||
iscsid.service \
|
||||
; do
|
||||
ln_r "$systemdsystemunitdir/${i}" "$systemdsystemunitdir/basic.target.wants/${i}"
|
||||
done
|
||||
|
||||
# Make sure iscsid is started after dracut-cmdline and ready for the initqueue
|
||||
mkdir -p "${initdir}/$systemdsystemunitdir/iscsid.service.d"
|
||||
(
|
||||
echo "[Unit]"
|
||||
echo "After=dracut-cmdline.service"
|
||||
echo "Before=dracut-initqueue.service"
|
||||
) > "${initdir}/$systemdsystemunitdir/iscsid.service.d/dracut.conf"
|
||||
fi
|
||||
inst_dir /var/lib/iscsi
|
||||
dracut_need_initqueue
|
||||
|
@@ -116,11 +116,6 @@ if arg=$(getarg rd.iscsi.initiator -d iscsi_initiator=) && [ -n "$arg" ] && ! [
|
||||
if ! [ -e /etc/iscsi/initiatorname.iscsi ]; then
|
||||
mkdir -p /etc/iscsi
|
||||
ln -fs /run/initiatorname.iscsi /etc/iscsi/initiatorname.iscsi
|
||||
if [ -n "$DRACUT_SYSTEMD" ]; then
|
||||
systemctl try-restart iscsid
|
||||
# FIXME: iscsid is not yet ready, when the service is :-/
|
||||
sleep 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -133,11 +128,6 @@ if [ -z $iscsi_initiator ] && [ -f /sys/firmware/ibft/initiator/initiator-name ]
|
||||
mkdir -p /etc/iscsi
|
||||
ln -fs /run/initiatorname.iscsi /etc/iscsi/initiatorname.iscsi
|
||||
> /tmp/iscsi_set_initiator
|
||||
if [ -n "$DRACUT_SYSTEMD" ]; then
|
||||
systemctl try-restart iscsid
|
||||
# FIXME: iscsid is not yet ready, when the service is :-/
|
||||
sleep 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
26
modules.d/95lunmask/fc_transport_scan_lun.sh
Executable file
26
modules.d/95lunmask/fc_transport_scan_lun.sh
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# fc_transport_lun_scan
|
||||
#
|
||||
# Selectively enable individual LUNs behind an FC remote port
|
||||
#
|
||||
# ACTION=="add", SUBSYSTEM=="fc_transport", ATTR{port_name}=="wwpn", \
|
||||
# PROGRAM="fc_transport_lun_scan lun"
|
||||
#
|
||||
|
||||
[ -z $DEVPATH ] && exit 1
|
||||
|
||||
if [ -n "$1" ] ; then
|
||||
LUN=$1
|
||||
else
|
||||
LUN=-
|
||||
fi
|
||||
ID=${DEVPATH##*/rport-}
|
||||
HOST=${ID%%:*}
|
||||
CHANNEL=${ID%%-*}
|
||||
CHANNEL=${CHANNEL#*:}
|
||||
if [ -f /sys$DEVPATH/scsi_target_id ] ; then
|
||||
TARGET=$(cat /sys$DEVPATH/scsi_target_id)
|
||||
fi
|
||||
[ -z "$TARGET" ] && exit 1
|
||||
echo $CHANNEL $TARGET $LUN > /sys/class/scsi_host/host$HOST/scan
|
70
modules.d/95lunmask/module-setup.sh
Executable file
70
modules.d/95lunmask/module-setup.sh
Executable file
@@ -0,0 +1,70 @@
|
||||
#!/bin/bash
|
||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||
|
||||
# called by dracut
|
||||
cmdline() {
|
||||
get_lunmask() {
|
||||
local _dev=$1
|
||||
local _devpath=$(cd -P /sys/dev/block/$_dev ; echo $PWD)
|
||||
local _sdev _lun _rport _end_device _classdev _wwpn _sas_address
|
||||
|
||||
[ "${_devpath#*/sd}" == "$_devpath" ] && return 1
|
||||
_sdev="${_devpath%%/block/*}"
|
||||
_lun="${_sdev##*:}"
|
||||
# Check for FibreChannel
|
||||
_rport="${_devpath##*/rport-}"
|
||||
if [ "$_rport" != "$_devpath" ] ; then
|
||||
_rport="${_rport%%/*}"
|
||||
_classdev="/sys/class/fc_remote_ports/rport-${_rport}"
|
||||
[ -d "$_classdev" ] || return 1
|
||||
_wwpn=$(cat ${_classdev}/port_name)
|
||||
echo "rd.lunmask=fc,${_wwpn},${_lun}"
|
||||
return 0
|
||||
fi
|
||||
# Check for SAS
|
||||
_end_device="${_devpath##*/end_device-}"
|
||||
if [ "$_end_device" != "$_devpath" ] ; then
|
||||
_end_device="${_end_device%%/*}"
|
||||
_classdev="/sys/class/sas_device/end_device-${_end_device}"
|
||||
[ -e "$_classdev" ] || return 1
|
||||
_sas_address=$(cat ${_classdev}/sas_address)
|
||||
echo "rd.lunmask=sas,${_sas_address},${_lun}"
|
||||
return 0
|
||||
fi
|
||||
return 1
|
||||
}
|
||||
[[ $hostonly ]] || [[ $mount_needs ]] && {
|
||||
for_each_host_dev_and_slaves_all get_lunmask
|
||||
} | sort | uniq
|
||||
}
|
||||
|
||||
# called by dracut
|
||||
check() {
|
||||
[[ $hostonly ]] || [[ $mount_needs ]] && {
|
||||
[ -w /sys/module/scsi_mod/parameters/scan ] || return 255
|
||||
scan_type=$(cat /sys/module/scsi_mod/parameters/scan)
|
||||
[ "$scan_type" = "manual" ] && return 0
|
||||
return 255
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
# called by dracut
|
||||
depends() {
|
||||
return 0
|
||||
}
|
||||
|
||||
# called by dracut
|
||||
install() {
|
||||
inst_script "$moddir/fc_transport_scan_lun.sh" /usr/lib/udev/fc_transport_scan_lun.sh
|
||||
inst_script "$moddir/sas_transport_scan_lun.sh" /usr/lib/udev/sas_transport_scan_lun.sh
|
||||
inst_hook cmdline 30 "$moddir/parse-lunmask.sh"
|
||||
if [[ $hostonly_cmdline == "yes" ]] ; then
|
||||
local _lunmask
|
||||
|
||||
for _lunmask in $(cmdline) ; do
|
||||
printf "%s\n" "$_lunmask" >> "${initdir}/etc/cmdline.d/95lunmask.conf"
|
||||
done
|
||||
fi
|
||||
}
|
40
modules.d/95lunmask/parse-lunmask.sh
Executable file
40
modules.d/95lunmask/parse-lunmask.sh
Executable file
@@ -0,0 +1,40 @@
|
||||
#!/bin/sh
|
||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||
|
||||
create_udev_rule() {
|
||||
local transport=$1
|
||||
local tgtid=$2
|
||||
local lun=$3
|
||||
local _rule=/etc/udev/rules.d/51-${transport}-lunmask-${tgtid}.rules
|
||||
local _cu_type _dev_type
|
||||
|
||||
[ -e ${_rule} ] && return 0
|
||||
|
||||
if [ ! -f "$_rule" ] ; then
|
||||
if [ "$transport" = "fc" ] ; then
|
||||
cat > $_rule <<EOF
|
||||
ACTION=="add", SUBSYSTEM=="fc_remote_ports", ATTR{port_name}=="$tgtid", PROGRAM="fc_transport_scan_lun.sh $lun"
|
||||
EOF
|
||||
elif [ "$transport" = "sas" ] ; then
|
||||
cat > $_rule <<EOF
|
||||
ACTION=="add", SUBSYSTEM=="sas_device", ATTR{sas_address}=="$tgtid", PROGRAM="sas_transport_scan_lun.sh $lun"
|
||||
EOF
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
for lunmask_arg in $(getargs rd.lunmask); do
|
||||
(
|
||||
local OLDIFS="$IFS"
|
||||
local IFS=","
|
||||
set $lunmask_arg
|
||||
IFS="$OLDIFS"
|
||||
if [ -d /sys/module/scsi_mod ] ; then
|
||||
printf "manual" > /sys/module/scsi_mod/parameters/scan
|
||||
elif [ ! -f /etc/modprobe.d/95lunmask.conf ] ; then
|
||||
echo "options scsi_mod scan=manual" > /etc/modprobe.d/95lunmask.conf
|
||||
fi
|
||||
create_udev_rule $1 $2 $3
|
||||
)
|
||||
done
|
26
modules.d/95lunmask/sas_transport_scan_lun.sh
Executable file
26
modules.d/95lunmask/sas_transport_scan_lun.sh
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# sas_transport_lun_scan
|
||||
#
|
||||
# Selectively enable individual LUNs behind a SAS end device
|
||||
#
|
||||
# ACTION=="add", SUBSYSTEM=="sas_transport", ATTR{sas_address}=="sas_addr", \
|
||||
# PROGRAM="sas_transport_lun_scan lun"
|
||||
#
|
||||
|
||||
[ -z $DEVPATH ] && exit 1
|
||||
|
||||
if [ -n "$1" ] ; then
|
||||
LUN=$1
|
||||
else
|
||||
LUN=-
|
||||
fi
|
||||
ID=${DEVPATH##*/end_device-}
|
||||
HOST=${ID%%:*}
|
||||
CHANNEL=${ID%%-*}
|
||||
CHANNEL=${CHANNEL#*:}
|
||||
if [ -f /sys$DEVPATH/scsi_target_id ] ; then
|
||||
TARGET=$(cat /sys$DEVPATH/scsi_target_id)
|
||||
fi
|
||||
[ -z "$TARGET" ] && exit 1
|
||||
echo 0 $TARGET $LUN > /sys/class/scsi_host/host$HOST/scan
|
@@ -51,13 +51,16 @@ cmdline() {
|
||||
|
||||
### ip= ###
|
||||
if [[ $nfs_device = [0-9]*\.[0-9]*\.[0-9]*.[0-9]* ]] || [[ $nfs_device = \[.*\] ]]; then
|
||||
nfs_address="$nfs_device"
|
||||
nfs_address="${nfs_device%%:*}"
|
||||
else
|
||||
lookup=$(host $(echo ${nfs_device%%:*})| head -n1)
|
||||
lookup=$(host "${nfs_device%%:*}"| grep " address " | head -n1)
|
||||
nfs_address=${lookup##* }
|
||||
fi
|
||||
ifname=$(ip -o route get to $nfs_address | sed -n 's/.*dev \([^ ]*\).*/\1/p')
|
||||
if [ -e /sys/class/net/$ifname/address ] ; then
|
||||
if [ -d /sys/class/net/$ifname/bonding ]; then
|
||||
dinfo "Found bonded interface '${ifname}'. Make sure to provide an appropriate 'bond=' cmdline."
|
||||
return
|
||||
elif [ -e /sys/class/net/$ifname/address ] ; then
|
||||
ifmac=$(cat /sys/class/net/$ifname/address)
|
||||
printf 'ifname=%s:%s ' ${ifname} ${ifmac}
|
||||
fi
|
||||
|
@@ -32,6 +32,12 @@ cmdline_journal() {
|
||||
cmdline_rootfs() {
|
||||
local _dev=/dev/block/$(find_root_block_device)
|
||||
local _fstype _flags _subvol
|
||||
|
||||
# "--no-hostonly-default-device" can result in empty root_devs
|
||||
if [ "${#root_devs[@]}" -eq 0 ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
if [ -e $_dev ]; then
|
||||
printf " root=%s" "$(shorten_persistent_dev "$(get_persistent_dev "$_dev")")"
|
||||
_fstype="$(find_mp_fstype /)"
|
||||
|
@@ -63,7 +63,16 @@ inst_sshenv()
|
||||
|
||||
# called by dracut
|
||||
install() {
|
||||
local _nsslibs
|
||||
|
||||
inst_multiple ssh scp
|
||||
inst_sshenv
|
||||
|
||||
_nsslibs=$(sed -e '/^#/d' -e 's/^.*://' -e 's/\[NOTFOUND=return\]//' /etc/nsswitch.conf \
|
||||
| tr -s '[:space:]' '\n' | sort -u | tr -s '[:space:]' '|')
|
||||
_nsslibs=${_nsslibs#|}
|
||||
_nsslibs=${_nsslibs%|}
|
||||
|
||||
inst_libdir_file -n "$_nsslibs" 'libnss_*.so*'
|
||||
}
|
||||
|
||||
|
@@ -22,6 +22,7 @@ StandardOutput=inherit
|
||||
StandardError=inherit
|
||||
KillMode=process
|
||||
IgnoreSIGPIPE=no
|
||||
TasksMax=infinity
|
||||
|
||||
# Bash ignores SIGTERM, so we send SIGHUP instead, to ensure that bash
|
||||
# terminates cleanly.
|
||||
|
@@ -14,6 +14,7 @@ export _rdshell_name="dracut" action="Boot" hook="emergency"
|
||||
_emergency_action=$(getarg rd.emergency)
|
||||
|
||||
if getargbool 1 rd.shell -d -y rdshell || getarg rd.break -d rdbreak; then
|
||||
FSTXT="/run/dracut/fsck/fsck_help_$fstype.txt"
|
||||
source_hook "$hook"
|
||||
echo
|
||||
rdsosreport
|
||||
@@ -25,6 +26,7 @@ if getargbool 1 rd.shell -d -y rdshell || getarg rd.break -d rdbreak; then
|
||||
echo 'after mounting them and attach it to a bug report.'
|
||||
echo
|
||||
echo
|
||||
[ -f "$FSTXT" ] && cat "$FSTXT"
|
||||
[ -f /etc/profile ] && . /etc/profile
|
||||
[ -z "$PS1" ] && export PS1="$_name:\${PWD}# "
|
||||
exec sh -i -l
|
||||
|
@@ -10,12 +10,12 @@ Before=systemd-udevd.service dracut-pre-trigger.service
|
||||
After=dracut-cmdline.service
|
||||
Wants=dracut-cmdline.service
|
||||
ConditionPathExists=/usr/lib/initrd-release
|
||||
ConditionPathExists=|/etc/cmdline.d/20-force_drivers.conf
|
||||
ConditionDirectoryNotEmpty=|/lib/dracut/hooks/pre-udev
|
||||
ConditionKernelCommandLine=|rd.break=pre-udev
|
||||
ConditionKernelCommandLine=|rd.driver.blacklist
|
||||
ConditionKernelCommandLine=|rd.driver.pre
|
||||
ConditionKernelCommandLine=|rd.driver.post
|
||||
ConditionPathExistsGlob=|/etc/cmdline.d/*.conf
|
||||
Conflicts=shutdown.target emergency.target
|
||||
|
||||
[Service]
|
||||
|
@@ -17,12 +17,13 @@ Environment=NEWROOT=/sysroot
|
||||
WorkingDirectory=/
|
||||
ExecStart=/bin/dracut-emergency
|
||||
ExecStopPost=-/usr/bin/systemctl --fail --no-block default
|
||||
Type=oneshot
|
||||
Type=idle
|
||||
StandardInput=tty-force
|
||||
StandardOutput=inherit
|
||||
StandardError=inherit
|
||||
KillMode=process
|
||||
IgnoreSIGPIPE=no
|
||||
TasksMax=infinity
|
||||
|
||||
# Bash ignores SIGTERM, so we send SIGHUP instead, to ensure that bash
|
||||
# terminates cleanly.
|
||||
|
@@ -32,6 +32,7 @@ generator_wait_for_dev()
|
||||
{
|
||||
echo "[Unit]"
|
||||
echo "JobTimeoutSec=$_timeout"
|
||||
echo "JobRunningTimeoutSec=$_timeout"
|
||||
} > "$GENERATOR_DIR"/${_name}.device.d/timeout.conf
|
||||
fi
|
||||
}
|
||||
|
@@ -72,16 +72,29 @@ load_evm_x509()
|
||||
if [ ! -f "${EVMX509PATH}" ]; then
|
||||
if [ "${RD_DEBUG}" = "yes" ]; then
|
||||
info "integrity: EVM x509 cert file not found: ${EVMX509PATH}"
|
||||
fi
|
||||
fi
|
||||
return 1
|
||||
fi
|
||||
|
||||
local evm_pubid
|
||||
local line=$(keyctl describe %keyring:.evm)
|
||||
if [ $? -eq 0 ]; then
|
||||
# the kernel already setup a trusted .evm keyring so use that one
|
||||
evm_pubid=${line%%:*}
|
||||
else
|
||||
# look for an existing regular keyring
|
||||
evm_pubid=`keyctl search @u keyring _evm`
|
||||
if [ -z "${evm_pubid}" ]; then
|
||||
# create a new regular _evm keyring
|
||||
evm_pubid=`keyctl newring _evm @u`
|
||||
fi
|
||||
fi
|
||||
|
||||
# load the EVM public key onto the EVM keyring
|
||||
evm_pubid=`keyctl newring _evm @u`
|
||||
EVMX509ID=$(evmctl import ${EVMX509PATH} ${evm_pubid})
|
||||
[ $? -eq 0 ] || {
|
||||
info "integrity: failed to load the EVM X509 cert ${EVMX509PATH}";
|
||||
return 1;
|
||||
info "integrity: failed to load the EVM X509 cert ${EVMX509PATH}";
|
||||
return 1;
|
||||
}
|
||||
|
||||
if [ "${RD_DEBUG}" = "yes" ]; then
|
||||
@@ -112,11 +125,18 @@ enable_evm()
|
||||
return 0
|
||||
fi
|
||||
|
||||
# load the EVM encrypted key
|
||||
load_evm_key || return 1
|
||||
local evm_configured
|
||||
|
||||
# load the EVM public key, if it exists
|
||||
load_evm_x509
|
||||
# try to load the EVM encrypted key
|
||||
load_evm_key && evm_configured=1
|
||||
|
||||
# try to load the EVM public key
|
||||
load_evm_x509 && evm_configured=1
|
||||
|
||||
# only enable EVM if a key or x509 certificate could be loaded
|
||||
if [ -z "$evm_configured" ]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
# initialize EVM
|
||||
info "Enabling EVM"
|
||||
|
@@ -938,6 +938,7 @@ set_systemd_timeout_for_dev()
|
||||
{
|
||||
echo "[Unit]"
|
||||
echo "JobTimeoutSec=$_timeout"
|
||||
echo "JobRunningTimeoutSec=$_timeout"
|
||||
} > ${PREFIX}/etc/systemd/system/${_name}.device.d/timeout.conf
|
||||
type mark_hostonly >/dev/null 2>&1 && mark_hostonly /etc/systemd/system/${_name}.device.d/timeout.conf
|
||||
_needreload=1
|
||||
@@ -1083,6 +1084,7 @@ _emergency_shell()
|
||||
rm -f -- /.console_lock
|
||||
else
|
||||
debug_off
|
||||
source_hook "$hook"
|
||||
echo
|
||||
/sbin/rdsosreport
|
||||
echo 'You might want to save "/run/initramfs/rdsosreport.txt" to a USB stick or /boot'
|
||||
@@ -1135,7 +1137,6 @@ emergency_shell()
|
||||
|
||||
echo ; echo
|
||||
warn "$*"
|
||||
source_hook "$hook"
|
||||
echo
|
||||
|
||||
_emergency_action=$(getarg rd.emergency)
|
||||
@@ -1146,6 +1147,7 @@ emergency_shell()
|
||||
if getargbool 1 rd.shell -d -y rdshell || getarg rd.break -d rdbreak; then
|
||||
_emergency_shell $_rdshell_name
|
||||
else
|
||||
source_hook "$hook"
|
||||
warn "$action has failed. To debug this issue add \"rd.shell rd.debug\" to the kernel command line."
|
||||
[ -z "$_emergency_action" ] && _emergency_action=halt
|
||||
fi
|
||||
|
@@ -100,7 +100,7 @@ fsck_drv_com() {
|
||||
local _ret
|
||||
local _out
|
||||
|
||||
if ! strstr "$_fop" "-[ynap]"; then
|
||||
if ! strglobin "$_fop" "-[ynap]"; then
|
||||
_fop="-a ${_fop}"
|
||||
fi
|
||||
|
||||
|
@@ -8,12 +8,13 @@
|
||||
# works with stdin if $1 is not set.
|
||||
det_archive() {
|
||||
# NOTE: echo -e works in ash and bash, but not dash
|
||||
local bz="BZh" xz="$(echo -e '\xfd7zXZ')" gz="$(echo -e '\x1f\x8b')"
|
||||
local bz="BZh" xz="$(echo -e '\xfd7zXZ')" gz="$(echo -e '\x1f\x8b')" zs="$(echo -e '0xFD2FB528')"
|
||||
local headerblock="$(dd ${1:+if=$1} bs=262 count=1 2>/dev/null)"
|
||||
case "$headerblock" in
|
||||
$xz*) echo "xz" ;;
|
||||
$gz*) echo "gzip" ;;
|
||||
$bz*) echo "bzip2" ;;
|
||||
$zs*) echo "zstd" ;;
|
||||
07070*) echo "cpio" ;;
|
||||
*ustar) echo "tar" ;;
|
||||
esac
|
||||
@@ -33,7 +34,7 @@ unpack_archive() {
|
||||
local img="$1" outdir="$2" archiver="" decompr=""
|
||||
local ft="$(det_archive $img)"
|
||||
case "$ft" in
|
||||
xz|gzip|bzip2) decompr="$ft -dc" ;;
|
||||
xz|gzip|bzip2|zstd) decompr="$ft -dc" ;;
|
||||
cpio|tar) decompr="cat";;
|
||||
*) return 1 ;;
|
||||
esac
|
||||
|
@@ -16,7 +16,7 @@ depends() {
|
||||
install() {
|
||||
inst_multiple tar gzip dd bash
|
||||
# TODO: make this conditional on a cmdline flag / config option
|
||||
inst_multiple -o cpio xz bzip2
|
||||
inst_multiple -o cpio xz bzip2 zstd
|
||||
inst_simple "$moddir/img-lib.sh" "/lib/img-lib.sh"
|
||||
}
|
||||
|
||||
|
@@ -30,6 +30,11 @@ client_run() {
|
||||
|
||||
test_run() {
|
||||
read MD_UUID < $TESTDIR/mduuid
|
||||
if [[ -z $MD_UUID ]]; then
|
||||
echo "Setup failed"
|
||||
return 1
|
||||
fi
|
||||
|
||||
client_run rd.auto rd.md.imsm=0 || return 1
|
||||
client_run rd.md.uuid=$MD_UUID rd.dm=0 || return 1
|
||||
# This test succeeds, because the mirror parts are found without
|
||||
@@ -109,6 +114,12 @@ test_setup() {
|
||||
-initrd $TESTDIR/initramfs.makeroot || return 1
|
||||
grep -F -m 1 -q dracut-root-block-created $TESTDIR/root.ext2 || return 1
|
||||
eval $(grep -F --binary-files=text -m 1 MD_UUID $TESTDIR/root.ext2)
|
||||
|
||||
if [[ -z $MD_UUID ]]; then
|
||||
echo "Setup failed"
|
||||
return 1
|
||||
fi
|
||||
|
||||
echo $MD_UUID > $TESTDIR/mduuid
|
||||
(
|
||||
export initdir=$TESTDIR/overlay
|
||||
|
@@ -102,9 +102,9 @@ test_setup() {
|
||||
fi
|
||||
|
||||
# Create the blank file to use as a root filesystem
|
||||
dd if=/dev/null of=$TESTDIR/root.ext3 bs=1M seek=20
|
||||
dd if=/dev/null of=$TESTDIR/iscsidisk2.img bs=1M seek=20
|
||||
dd if=/dev/null of=$TESTDIR/iscsidisk3.img bs=1M seek=20
|
||||
dd if=/dev/null of=$TESTDIR/root.ext3 bs=1M seek=40
|
||||
dd if=/dev/null of=$TESTDIR/iscsidisk2.img bs=1M seek=40
|
||||
dd if=/dev/null of=$TESTDIR/iscsidisk3.img bs=1M seek=40
|
||||
|
||||
kernel=$KVERSION
|
||||
# Create what will eventually be our root filesystem onto an overlay
|
||||
|
@@ -73,6 +73,38 @@ do_test_run() {
|
||||
"rd.iscsi.initiator=$initiator" \
|
||||
|| return 1
|
||||
|
||||
run_client "netroot=iscsi target1 target2 rd.iscsi.waitnet=0" \
|
||||
"root=LABEL=sysroot" \
|
||||
"ip=192.168.50.101:::255.255.255.0::ens3:off" \
|
||||
"ip=192.168.51.101:::255.255.255.0::ens4:off" \
|
||||
"netroot=iscsi:192.168.51.1::::iqn.2009-06.dracut:target1" \
|
||||
"netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target2" \
|
||||
"rd.iscsi.firmware" \
|
||||
"rd.iscsi.initiator=$initiator" \
|
||||
"rd.iscsi.waitnet=0" \
|
||||
|| return 1
|
||||
|
||||
run_client "netroot=iscsi target1 target2 rd.iscsi.waitnet=0 rd.iscsi.testroute=0" \
|
||||
"root=LABEL=sysroot" \
|
||||
"ip=192.168.50.101:::255.255.255.0::ens3:off" \
|
||||
"ip=192.168.51.101:::255.255.255.0::ens4:off" \
|
||||
"netroot=iscsi:192.168.51.1::::iqn.2009-06.dracut:target1" \
|
||||
"netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target2" \
|
||||
"rd.iscsi.firmware" \
|
||||
"rd.iscsi.initiator=$initiator" \
|
||||
"rd.iscsi.waitnet=0 rd.iscsi.testroute=0" \
|
||||
|| return 1
|
||||
|
||||
run_client "netroot=iscsi target1 target2 rd.iscsi.waitnet=0 rd.iscsi.testroute=0 default GW" \
|
||||
"root=LABEL=sysroot" \
|
||||
"ip=192.168.50.101::192.168.50.1:255.255.255.0::ens3:off" \
|
||||
"ip=192.168.51.101::192.168.51.1:255.255.255.0::ens4:off" \
|
||||
"netroot=iscsi:192.168.51.1::::iqn.2009-06.dracut:target1" \
|
||||
"netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target2" \
|
||||
"rd.iscsi.firmware" \
|
||||
"rd.iscsi.initiator=$initiator" \
|
||||
"rd.iscsi.waitnet=0 rd.iscsi.testroute=0" \
|
||||
|| return 1
|
||||
|
||||
echo "All tests passed [OK]"
|
||||
return 0
|
||||
@@ -99,9 +131,9 @@ test_setup() {
|
||||
fi
|
||||
|
||||
# Create the blank file to use as a root filesystem
|
||||
dd if=/dev/null of=$TESTDIR/root.ext3 bs=1M seek=20
|
||||
dd if=/dev/null of=$TESTDIR/iscsidisk2.img bs=1M seek=20
|
||||
dd if=/dev/null of=$TESTDIR/iscsidisk3.img bs=1M seek=20
|
||||
dd if=/dev/null of=$TESTDIR/root.ext3 bs=1M seek=40
|
||||
dd if=/dev/null of=$TESTDIR/iscsidisk2.img bs=1M seek=40
|
||||
dd if=/dev/null of=$TESTDIR/iscsidisk3.img bs=1M seek=40
|
||||
|
||||
kernel=$KVERSION
|
||||
# Create what will eventually be our root filesystem onto an overlay
|
||||
|
@@ -10,7 +10,7 @@ echo "made it to the rootfs! Powering down."
|
||||
|
||||
(
|
||||
echo OK
|
||||
ip -o -4 address show scope global | while read n if rest; do echo $if;done
|
||||
ip -o -4 address show scope global | while read n if rest; do echo $if;done | sort
|
||||
for i in /run/initramfs/state/etc/sysconfig/network-scripts/ifcfg-*; do
|
||||
echo $i
|
||||
grep -v 'UUID=' $i
|
||||
|
@@ -235,7 +235,7 @@ test_setup() {
|
||||
export initdir="$TESTDIR"/mnt/nfs/client
|
||||
. "$basedir"/dracut-init.sh
|
||||
inst_multiple sh shutdown poweroff stty cat ps ln ip \
|
||||
mount dmesg mkdir cp ping grep ls
|
||||
mount dmesg mkdir cp ping grep ls sort
|
||||
for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
|
||||
[[ -f ${_terminfodir}/l/linux ]] && break
|
||||
done
|
||||
|
19
test/ci-matrix.txt
Normal file
19
test/ci-matrix.txt
Normal file
@@ -0,0 +1,19 @@
|
||||
01
|
||||
02
|
||||
03
|
||||
04
|
||||
10
|
||||
11
|
||||
12
|
||||
13
|
||||
14
|
||||
15
|
||||
16
|
||||
17
|
||||
20
|
||||
30
|
||||
31
|
||||
40
|
||||
50
|
||||
60
|
||||
70
|
Reference in New Issue
Block a user