Compare commits
4404 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9e8f172dc0 | ||
|
|
89dcbbe92f | ||
|
|
14310ca42f | ||
|
|
dcbc74b01b | ||
|
|
7843bc5277 | ||
|
|
81babdedec | ||
|
|
fe44aa1b14 | ||
|
|
4ef5cdc120 | ||
|
|
b59ae22885 | ||
|
|
08961eef2a | ||
|
|
96976e84e2 | ||
|
|
15ff303dde | ||
|
|
3b89c39889 | ||
|
|
4e10601254 | ||
|
|
53cece208a | ||
|
|
68fefe6f94 | ||
|
|
94c75a2a82 | ||
|
|
34011ee53e | ||
|
|
8eb08e5528 | ||
|
|
d8f0e52ac7 | ||
|
|
c60f4fc027 | ||
|
|
d9bf0c38be | ||
|
|
a34b1baa6c | ||
|
|
e35e43c1c2 | ||
|
|
0f0b8c8f90 | ||
|
|
bf69beb6f3 | ||
|
|
50192de38d | ||
|
|
e671c3a06a | ||
|
|
e3b2b02c7f | ||
|
|
d3f542cc9d | ||
|
|
95bbcaa855 | ||
|
|
3464297288 | ||
|
|
9b2497dffb | ||
|
|
1851348709 | ||
|
|
17cd55169c | ||
|
|
7ee74e539d | ||
|
|
829ed8ef5c | ||
|
|
b6d52b504f | ||
|
|
927428e6a5 | ||
|
|
d86dfcd148 | ||
|
|
31116110ff | ||
|
|
4971a2c4eb | ||
|
|
7c35556da4 | ||
|
|
a1435c3d53 | ||
|
|
9c54932f59 | ||
|
|
81b59fbbd6 | ||
|
|
c787ad30ab | ||
|
|
e44c26f0fc | ||
|
|
90054e4f1f | ||
|
|
d8386b5d8f | ||
|
|
5541b0c46f | ||
|
|
b63e0c5040 | ||
|
|
3b9b20d237 | ||
|
|
44c9d019d8 | ||
|
|
2e5265c80e | ||
|
|
3cb0f01a1e | ||
|
|
225e4b94cb | ||
|
|
3e676eb12f | ||
|
|
2257b800ac | ||
|
|
290df2e1de | ||
|
|
4be697e5c1 | ||
|
|
08bdadbf31 | ||
|
|
734739187b | ||
|
|
1c4a51c39c | ||
|
|
0aa2e5f728 | ||
|
|
5e615f4eb4 | ||
|
|
9e82732dd4 | ||
|
|
0454dc247a | ||
|
|
24f3463bff | ||
|
|
095e1f37c4 | ||
|
|
f4334e9bdf | ||
|
|
838f22259a | ||
|
|
b3480d31b0 | ||
|
|
8dd7bb48fc | ||
|
|
44d1688164 | ||
|
|
a7d8fc280c | ||
|
|
e9a84e0a21 | ||
|
|
d09218823c | ||
|
|
ae9bc0d72f | ||
|
|
09ba1b289f | ||
|
|
9f3c31cd8d | ||
|
|
eb18a1fe29 | ||
|
|
789668deb3 | ||
|
|
e791d753be | ||
|
|
e0e6d96d69 | ||
|
|
ee18dd2b88 | ||
|
|
09132c732a | ||
|
|
f19063ac71 | ||
|
|
a17440713a | ||
|
|
bd03d374b7 | ||
|
|
06e12e4ba8 | ||
|
|
f059ce7682 | ||
|
|
286685cb72 | ||
|
|
7c62555bcf | ||
|
|
2699d8ff7e | ||
|
|
5a8f1aef55 | ||
|
|
9c034dc326 | ||
|
|
f8cad00948 | ||
|
|
c128b969bb | ||
|
|
f59664a01f | ||
|
|
67f43d2124 | ||
|
|
0ae5848245 | ||
|
|
9f02b291ac | ||
|
|
2b77ba0b75 | ||
|
|
6f90be2971 | ||
|
|
110063c585 | ||
|
|
51d0a54555 | ||
|
|
c31a80c9ed | ||
|
|
79afb279c2 | ||
|
|
3c8d3a6565 | ||
|
|
01f9d0d9bf | ||
|
|
3111988680 | ||
|
|
1ebbe2eb7b | ||
|
|
65d16d1914 | ||
|
|
da5a44cfb7 | ||
|
|
75b8b144a1 | ||
|
|
1363167d65 | ||
|
|
d15c15c8f5 | ||
|
|
9288d21b9f | ||
|
|
cafe6675c2 | ||
|
|
fba4d28433 | ||
|
|
b7774da97c | ||
|
|
3c1a083e5c | ||
|
|
0f294d90b2 | ||
|
|
a2dbecfcd6 | ||
|
|
604c09b1da | ||
|
|
f9c8b3112a | ||
|
|
bb75d16521 | ||
|
|
ca8f1c1ba3 | ||
|
|
94cc856cb8 | ||
|
|
827a5b1a80 | ||
|
|
393da0c370 | ||
|
|
82fe4ea0a5 | ||
|
|
ffbd37d784 | ||
|
|
ab94a204e0 | ||
|
|
6058b06b86 | ||
|
|
26aea0299a | ||
|
|
0a80cda0ea | ||
|
|
6f0500ed4a | ||
|
|
746135dd1e | ||
|
|
a762dedb60 | ||
|
|
a0c915b1e4 | ||
|
|
99df3d22be | ||
|
|
be98291caf | ||
|
|
33782aebbf | ||
|
|
55a12055c5 | ||
|
|
25111d717e | ||
|
|
819ea38651 | ||
|
|
143420bc05 | ||
|
|
986b12d391 | ||
|
|
f81c864eed | ||
|
|
aac3a0652a | ||
|
|
a0eadcdc64 | ||
|
|
e331e06a39 | ||
|
|
7047294617 | ||
|
|
1caaeaae1e | ||
|
|
d63a4e285e | ||
|
|
9a9c67d61b | ||
|
|
bc01f822de | ||
|
|
f265cb67dc | ||
|
|
f98d3066d9 | ||
|
|
9d1b81c0d1 | ||
|
|
e3fb645821 | ||
|
|
8f77326479 | ||
|
|
ca77afdeb3 | ||
|
|
35e86ac117 | ||
|
|
058ff2f06d | ||
|
|
efecf0a95e | ||
|
|
c574c3f565 | ||
|
|
61ac90fefa | ||
|
|
432647c278 | ||
|
|
a695250ec7 | ||
|
|
6ccb58a5b6 | ||
|
|
7d0848957c | ||
|
|
6b7ffedf0d | ||
|
|
b31f3fe0d1 | ||
|
|
c1688560ad | ||
|
|
4cdee66c8e | ||
|
|
e0ec6f10d4 | ||
|
|
f4947f8793 | ||
|
|
ba26c59523 | ||
|
|
cec0d04112 | ||
|
|
f4d34357c0 | ||
|
|
eed91294f8 | ||
|
|
a73ba9a8ef | ||
|
|
4f55387829 | ||
|
|
bca1967c90 | ||
|
|
d00cfc2a7b | ||
|
|
e0758c8168 | ||
|
|
1b72c97cc5 | ||
|
|
c1c78f8a91 | ||
|
|
935dd5746a | ||
|
|
67354eebbc | ||
|
|
f6e777ec4b | ||
|
|
df6bb5e959 | ||
|
|
08e11e30e3 | ||
|
|
731b37e929 | ||
|
|
8ad3215590 | ||
|
|
b2a024991f | ||
|
|
bfa4e45fa7 | ||
|
|
c9b5165daa | ||
|
|
740e41b843 | ||
|
|
3161dea8e1 | ||
|
|
cae0004dbe | ||
|
|
3c8a69677b | ||
|
|
c4f8329cc2 | ||
|
|
654484b82b | ||
|
|
ccaf52901f | ||
|
|
384eeedd2d | ||
|
|
65cfabf7a6 | ||
|
|
2b5192c18d | ||
|
|
fe6c7e0f06 | ||
|
|
3c3b2cf093 | ||
|
|
1f50d5b86d | ||
|
|
0bb9a683d4 | ||
|
|
d23f32dd4b | ||
|
|
ebfd53e1d9 | ||
|
|
f8c24964cd | ||
|
|
f8e0c7cc62 | ||
|
|
3aa37cafde | ||
|
|
b39b8452d2 | ||
|
|
48723f28aa | ||
|
|
3ed33db54a | ||
|
|
0a68b6a518 | ||
|
|
7b3f374a82 | ||
|
|
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 | ||
|
|
a0799ffb55 | ||
|
|
65f78f3d74 | ||
|
|
2b909b9a4b | ||
|
|
ed25fb0e91 | ||
|
|
c2408eed7f | ||
|
|
1792759721 | ||
|
|
e316ae0e43 | ||
|
|
5abd692fe4 | ||
|
|
1279a9e1a0 | ||
|
|
0baf5a3e99 | ||
|
|
bdf0f9ce32 | ||
|
|
ae989390a1 | ||
|
|
81269979e6 | ||
|
|
39018c93c2 | ||
|
|
f496af50b7 | ||
|
|
c427603cd1 | ||
|
|
e2b877a18b | ||
|
|
690b24f02f | ||
|
|
98663fcaac | ||
|
|
8523ec50c2 | ||
|
|
af6eee79e3 | ||
|
|
9fd0461b7d | ||
|
|
66a3d4053b | ||
|
|
b1ae591945 | ||
|
|
017978f868 | ||
|
|
2187b3d097 | ||
|
|
c75ce02775 | ||
|
|
f24d205537 | ||
|
|
85ed04e0cf | ||
|
|
c0371761fb | ||
|
|
2ceb910a73 | ||
|
|
72c084918a | ||
|
|
ad3b209d40 | ||
|
|
1a95f1f4fc | ||
|
|
ef025dcbbe | ||
|
|
d23b0efc1a | ||
|
|
1bfa75b015 | ||
|
|
dd75a946db | ||
|
|
e95a3c36ed | ||
|
|
400a85ffaf | ||
|
|
9388d99361 | ||
|
|
5a532aa83f | ||
|
|
9cd4edb445 | ||
|
|
a1d92d8ace | ||
|
|
fac3e9d975 | ||
|
|
9b8e6e40a9 | ||
|
|
a430c3f7a6 | ||
|
|
e7b343138f | ||
|
|
4011b48c42 | ||
|
|
295194ee42 | ||
|
|
76dd870bfd | ||
|
|
3e7498ea03 | ||
|
|
62b7920ed1 | ||
|
|
5ce7cc7337 | ||
|
|
d84f4687c3 | ||
|
|
db17ef6c4f | ||
|
|
3ad12c7be8 | ||
|
|
26264af7f5 | ||
|
|
37437cac8a | ||
|
|
106255afd4 | ||
|
|
c1699b59c6 | ||
|
|
add1ea88d2 | ||
|
|
3d875f77f3 | ||
|
|
44302d6f28 | ||
|
|
38e9d6249a | ||
|
|
0a50111ab3 | ||
|
|
937cc53ecb | ||
|
|
343c74311b | ||
|
|
c3b6970394 | ||
|
|
9bf5f989ee | ||
|
|
940169e8d8 | ||
|
|
337a55eb2d | ||
|
|
c8aa1d949a | ||
|
|
5f923256e3 | ||
|
|
5e7bbe43a3 | ||
|
|
3a8ba44026 | ||
|
|
e0c3b0793f | ||
|
|
8b0791fa01 | ||
|
|
e5bf1cecd6 | ||
|
|
cf9c8c5fe3 | ||
|
|
05bf320972 | ||
|
|
2600b54c18 | ||
|
|
bd355f8643 | ||
|
|
1362641310 | ||
|
|
e5d21b80c0 | ||
|
|
5d1ea2d726 | ||
|
|
856d039ba4 | ||
|
|
55c763b1ff | ||
|
|
c8e531239b | ||
|
|
624f173cbd | ||
|
|
9be4be7aa7 | ||
|
|
bbca3891ed | ||
|
|
a0d129e33e | ||
|
|
0c4c9792c8 | ||
|
|
6ed9975c5a | ||
|
|
73e30ea106 | ||
|
|
e3189ab123 | ||
|
|
cf9a4e0c73 | ||
|
|
08e51654bf | ||
|
|
63c7b358f5 | ||
|
|
70ce5ea256 | ||
|
|
a0e3794b2a | ||
|
|
fd24c90c36 | ||
|
|
1856ae95c8 | ||
|
|
b71d162a7a | ||
|
|
3cea065819 | ||
|
|
87ddd4d9af | ||
|
|
1e00295a15 | ||
|
|
b40585e6c7 | ||
|
|
feaaee4278 | ||
|
|
892b1fe6b7 | ||
|
|
2e1861fde2 | ||
|
|
ab66ef2d4a | ||
|
|
cc4e507322 | ||
|
|
29fd71b23d | ||
|
|
bc6f06a795 | ||
|
|
7cf2c21798 | ||
|
|
11947da13f | ||
|
|
f59548aeab | ||
|
|
fafb4c0182 | ||
|
|
0096157e14 | ||
|
|
9998940493 | ||
|
|
538ff0fd80 | ||
|
|
8b6d136e62 | ||
|
|
ea765c0ee1 | ||
|
|
e190073b21 | ||
|
|
ce999bff98 | ||
|
|
031e2f7bb8 | ||
|
|
a0545765e8 | ||
|
|
96b708e178 | ||
|
|
4c3d99f966 | ||
|
|
c603419030 | ||
|
|
39c9b67f86 | ||
|
|
685d8619d0 | ||
|
|
15d103f911 | ||
|
|
a63cc421a5 | ||
|
|
b4cf58f038 | ||
|
|
0e1b686b83 | ||
|
|
a99bbe8fa8 | ||
|
|
0982fcb2e5 | ||
|
|
f0bfada399 | ||
|
|
041e49ee2a | ||
|
|
811a070d6c | ||
|
|
5401d1f86f | ||
|
|
e8dc8c4d89 | ||
|
|
65960fda7e | ||
|
|
25895a7769 | ||
|
|
144a3d85d0 | ||
|
|
e6390b5a70 | ||
|
|
c1cec35469 | ||
|
|
8078a9c8ea | ||
|
|
2931eaa800 | ||
|
|
1f1aa43573 | ||
|
|
1dd68c2f23 | ||
|
|
1d75490767 | ||
|
|
ca6be905f0 | ||
|
|
67ae4f20b8 | ||
|
|
b2f751db04 | ||
|
|
6eb80b3278 | ||
|
|
a1ba30cf4f | ||
|
|
0042f2568d | ||
|
|
b0d6254dad | ||
|
|
f3f37f3cce | ||
|
|
9ae7ed1a1d | ||
|
|
e1171941c2 | ||
|
|
98047e08d0 | ||
|
|
2a1723ed83 | ||
|
|
1fc68b989d | ||
|
|
917e1b6b5b | ||
|
|
eec49634d4 | ||
|
|
bd4aa25741 | ||
|
|
7a44fea98c | ||
|
|
53475faa81 | ||
|
|
6a6c09e33c | ||
|
|
4efe015bfb | ||
|
|
3c6337f68e | ||
|
|
f1b65e92af | ||
|
|
ea28824027 | ||
|
|
d13071d7a6 | ||
|
|
ccf948f2ab | ||
|
|
196bb03477 | ||
|
|
285495814b | ||
|
|
fd79054610 | ||
|
|
73fb5e769b | ||
|
|
37a2343509 | ||
|
|
0c5e5f271b | ||
|
|
e752d42de9 | ||
|
|
6ed73e37f2 | ||
|
|
f1c790495b | ||
|
|
4693daa5fa | ||
|
|
7c29d205f4 | ||
|
|
35bf607087 | ||
|
|
d8a01fea33 | ||
|
|
a9f04fcc4a | ||
|
|
4e669086a3 | ||
|
|
bdd626059c | ||
|
|
043d8f401b | ||
|
|
05c2080e51 | ||
|
|
e7838a8312 | ||
|
|
dec4b2cdd4 | ||
|
|
2bd8b227de | ||
|
|
2949dcba29 | ||
|
|
0cf826a11a | ||
|
|
a1595cf5f9 | ||
|
|
6aec6a7e2f | ||
|
|
647b521fc7 | ||
|
|
076fcd1652 | ||
|
|
83a6d6f928 | ||
|
|
8a32bf6107 | ||
|
|
1d832b4bf4 | ||
|
|
5ebf48d2ba | ||
|
|
be5025bf55 | ||
|
|
7e51a94f5b | ||
|
|
73b9eaab1d | ||
|
|
f13278eac2 | ||
|
|
5c57209ba5 | ||
|
|
2870b7d243 | ||
|
|
33a5586cae | ||
|
|
ffc2ca202b | ||
|
|
a6229a8f9a | ||
|
|
727e2a1d9d | ||
|
|
0676c1e0d0 | ||
|
|
b2f6409a22 | ||
|
|
39c725dc4e | ||
|
|
85c8217db0 | ||
|
|
f2c423651b | ||
|
|
a35fab2cf1 | ||
|
|
4a739be99c | ||
|
|
d4793cdbdb | ||
|
|
32f5af2f5e | ||
|
|
01030beda2 | ||
|
|
7a5949ffcd | ||
|
|
52c295c161 | ||
|
|
34986d538a | ||
|
|
e69da98de1 | ||
|
|
7957bd01b0 | ||
|
|
9ffab3f3a5 | ||
|
|
cc81672cef | ||
|
|
aa6885fbaf | ||
|
|
beaddf6881 | ||
|
|
dfb3db3dad | ||
|
|
43adba3a71 | ||
|
|
e63ac4433a | ||
|
|
d941f0e015 | ||
|
|
f81806db20 | ||
|
|
f0c9ae4d36 | ||
|
|
e35d1451f5 | ||
|
|
eac751f1e0 | ||
|
|
e80ac43710 | ||
|
|
b1a39dbcc2 | ||
|
|
0eb7a7c479 | ||
|
|
924a669a1b | ||
|
|
6ee83a0bd1 | ||
|
|
93d7b95ad4 | ||
|
|
caa6d12fd7 | ||
|
|
ffcbde7fe2 | ||
|
|
44766d1f1f | ||
|
|
86f0904004 | ||
|
|
e22e04ae15 | ||
|
|
2811e4ed22 | ||
|
|
5d274f9365 | ||
|
|
4dbb4dc5bc | ||
|
|
597b159248 | ||
|
|
0db98910a1 | ||
|
|
a5b2d8fe74 | ||
|
|
69395a528a | ||
|
|
ca31a7e368 | ||
|
|
e7f52635d9 | ||
|
|
2afd60baa6 | ||
|
|
bd98b88447 | ||
|
|
ec44ed1d9d | ||
|
|
61c761bc2c | ||
|
|
b8278a99ab | ||
|
|
7e8f8ddbf8 | ||
|
|
4a7b55ee7e | ||
|
|
ddfcfdf199 | ||
|
|
fc44fdb5ac | ||
|
|
b08ad7f7d8 | ||
|
|
b29901c083 | ||
|
|
a69d137338 | ||
|
|
479b5cd94f | ||
|
|
de7ab164dd | ||
|
|
bb47ec5499 | ||
|
|
3966a1e1ee | ||
|
|
d8c75b5f38 | ||
|
|
a1ea214a87 | ||
|
|
1d9d43713d | ||
|
|
b37b141ecc | ||
|
|
223547feab | ||
|
|
3568d947db | ||
|
|
ff6077789e | ||
|
|
bafc82e732 | ||
|
|
8205c25ef9 | ||
|
|
fea9be7ac1 | ||
|
|
c85034c91f | ||
|
|
d7c9ad504e | ||
|
|
00ca15abbf | ||
|
|
dba974844e | ||
|
|
a84c391b87 | ||
|
|
86eb0b1b83 | ||
|
|
69c6435acd | ||
|
|
b05cd20695 | ||
|
|
1090a8826a | ||
|
|
1a7b71bb14 | ||
|
|
5db79ae414 | ||
|
|
f367b73852 | ||
|
|
f47090f918 | ||
|
|
e168eeef67 | ||
|
|
c7c8c4981a | ||
|
|
1de836c763 | ||
|
|
242c03d6fb | ||
|
|
88f9d6140d | ||
|
|
740c46c022 | ||
|
|
73db316ef2 | ||
|
|
38b9558333 | ||
|
|
1c132d39a6 | ||
|
|
c45e856a65 | ||
|
|
9264b0cba6 | ||
|
|
aaaf035aed | ||
|
|
9853791d37 | ||
|
|
5a3773dbe6 | ||
|
|
24113c3a11 | ||
|
|
34a42f9f49 | ||
|
|
5d4aaaa2a3 | ||
|
|
828257dd82 | ||
|
|
f8ff380bd5 | ||
|
|
b1ec9d737f | ||
|
|
5d013e5e3c | ||
|
|
88d8ad663f | ||
|
|
4af4fe4a69 | ||
|
|
9f521f76a0 | ||
|
|
3889234f71 | ||
|
|
c98d1756f7 | ||
|
|
b039b20ec2 | ||
|
|
f8242a6a60 | ||
|
|
f6fa9ef101 | ||
|
|
7e51abc81f | ||
|
|
c000a21c25 | ||
|
|
8261d2367e | ||
|
|
18729719a7 | ||
|
|
36867f1abf | ||
|
|
0092942531 | ||
|
|
781f1971c3 | ||
|
|
3847bd450d | ||
|
|
8fce2c4d5e | ||
|
|
9e19c0512d | ||
|
|
4e882b8090 | ||
|
|
8e01095755 | ||
|
|
99b70a787c | ||
|
|
71867b665c | ||
|
|
f3355208f9 | ||
|
|
2602a74edf | ||
|
|
55b99a0e4c | ||
|
|
d4efc0aeee | ||
|
|
1901500187 | ||
|
|
292548be6e | ||
|
|
d6145ece6d | ||
|
|
016613c774 | ||
|
|
a365b67db0 | ||
|
|
699414f5a5 | ||
|
|
ab4cccf2a7 | ||
|
|
5dea430e08 | ||
|
|
e4749a35e5 | ||
|
|
ae753baec0 | ||
|
|
7b79d63fa4 | ||
|
|
bb44294b62 | ||
|
|
4fa5c235a7 | ||
|
|
cf376023e6 | ||
|
|
5f91ed0b53 | ||
|
|
bf75218e45 | ||
|
|
fe83231e30 | ||
|
|
3f60444ec1 | ||
|
|
eab32bda80 | ||
|
|
fa295f0bcd | ||
|
|
0297fdcb3e | ||
|
|
9d74747f92 | ||
|
|
74e2d1e69f | ||
|
|
ad438af207 | ||
|
|
f3f019d947 | ||
|
|
2db14045c1 | ||
|
|
db7d61cff7 | ||
|
|
b99e72427b | ||
|
|
6fcd5c8e3b | ||
|
|
b14b039e90 | ||
|
|
7ef36aef28 | ||
|
|
9bb030c5d8 | ||
|
|
fe6e0c23ad | ||
|
|
8d9ab2755d | ||
|
|
607fec3e79 | ||
|
|
794b2d2c75 | ||
|
|
ff8f702689 | ||
|
|
98fd06934c | ||
|
|
374ef3ed2b | ||
|
|
f7f5b82b43 | ||
|
|
c395993eaf | ||
|
|
06a1d07690 | ||
|
|
bcabe0fe25 | ||
|
|
dec3dfa4b3 | ||
|
|
9430ae301e | ||
|
|
97bbba6938 | ||
|
|
e343c85763 | ||
|
|
3aac682744 | ||
|
|
89da227de9 | ||
|
|
472928ec3d | ||
|
|
b127294def | ||
|
|
556ff7c76a | ||
|
|
cb6d49bc9d | ||
|
|
caf12d6717 | ||
|
|
fe6455a6e8 | ||
|
|
4d3e54e01a | ||
|
|
6a97d2fc89 | ||
|
|
4ab6447c2a | ||
|
|
eddca3c9c2 | ||
|
|
6bc2096cf5 | ||
|
|
b4dd861a0b | ||
|
|
f4f8fb5c10 | ||
|
|
43819af68c | ||
|
|
9542f2fee4 | ||
|
|
bb1b924792 | ||
|
|
24a78b2697 | ||
|
|
918fbfcf6b | ||
|
|
28058a2e37 | ||
|
|
2fd8588da5 | ||
|
|
efbc47b8e4 | ||
|
|
b019952f6d | ||
|
|
0a7d7f6310 | ||
|
|
60928f36b6 | ||
|
|
e93ff1cf9a | ||
|
|
3f5e60bfc9 | ||
|
|
07149fe6be | ||
|
|
c41df7e1db | ||
|
|
b8bccd398a | ||
|
|
b830a31331 | ||
|
|
b070c1d360 | ||
|
|
df95b1003c | ||
|
|
efd3a6db74 | ||
|
|
4bcd41389c | ||
|
|
8d26b5661e | ||
|
|
ce9a398771 | ||
|
|
54e09dfb72 | ||
|
|
88ba9372be | ||
|
|
5d8d0ac814 | ||
|
|
6ed1d9fd07 | ||
|
|
6612ae0d36 | ||
|
|
616fdae3cf | ||
|
|
eb242ada05 | ||
|
|
4916bf1a58 | ||
|
|
319867faa8 | ||
|
|
87e90d7f4a | ||
|
|
2249e7312e | ||
|
|
62c00a8896 | ||
|
|
1a2290ea79 | ||
|
|
03de49609c | ||
|
|
e330912be5 | ||
|
|
33a4198e17 | ||
|
|
8b5ee88ff6 | ||
|
|
2bcf4ffe5f | ||
|
|
a455ad1c27 | ||
|
|
c44d2252bb | ||
|
|
90ac2d2429 | ||
|
|
27d7936f0e | ||
|
|
2da041d672 | ||
|
|
63a44c8dc3 | ||
|
|
602dce9ff2 | ||
|
|
456f299ab8 | ||
|
|
7527b90c88 | ||
|
|
07a081f352 | ||
|
|
6870007674 | ||
|
|
d6dfde7830 | ||
|
|
946722e465 | ||
|
|
a95a727fdc | ||
|
|
927d1e28c9 | ||
|
|
74c9fb947b | ||
|
|
edbd9ca058 | ||
|
|
dcc2a4344b | ||
|
|
ed92ecaa3c | ||
|
|
98e9db2755 | ||
|
|
4a6c14f987 | ||
|
|
561eb42f39 | ||
|
|
10f8df1bdf | ||
|
|
35a666d02a | ||
|
|
5b43377d74 | ||
|
|
ecdee70c48 | ||
|
|
b44156c6fc | ||
|
|
a49c1f049b | ||
|
|
efba549a26 | ||
|
|
79cb273dc0 | ||
|
|
583fb23199 | ||
|
|
b73e00aff7 | ||
|
|
b5363e834a | ||
|
|
19b0065cac | ||
|
|
df087c45d8 | ||
|
|
5d90ba4fca | ||
|
|
e847a78bb6 | ||
|
|
73833796b4 | ||
|
|
e803d076f8 | ||
|
|
7d47178e0d | ||
|
|
6cfdb5aa1f | ||
|
|
29b885b46e | ||
|
|
42b4fc90f2 | ||
|
|
b519ae7008 | ||
|
|
195b5d0725 | ||
|
|
686f9675df | ||
|
|
26fbe97bbe | ||
|
|
744c65939b | ||
|
|
3632be079b | ||
|
|
782e909eef | ||
|
|
27a5aecf56 | ||
|
|
5193198dc9 | ||
|
|
c606be49d7 | ||
|
|
f939cffdac | ||
|
|
a283636b83 | ||
|
|
4483fff87c | ||
|
|
c04a321b92 | ||
|
|
4a88aaff10 | ||
|
|
dd8d161afe | ||
|
|
0c004c8e64 | ||
|
|
9ab5ddf16a | ||
|
|
93b9885a65 | ||
|
|
db7d739818 | ||
|
|
bcbcacb5d6 | ||
|
|
0a10d7fc51 | ||
|
|
f5753e1861 | ||
|
|
9af753c468 | ||
|
|
20486a16e9 | ||
|
|
848edf22f0 | ||
|
|
3913d061c4 | ||
|
|
cca313fa75 | ||
|
|
9a5bd6804a | ||
|
|
4891d9a2ce | ||
|
|
2448fbf17b | ||
|
|
6138a45dd2 | ||
|
|
7391fef29a | ||
|
|
01430d27d4 | ||
|
|
ab57132aa5 | ||
|
|
6251f82c6f | ||
|
|
3e1c531b4e | ||
|
|
64c34f3459 | ||
|
|
2cc5e92e21 | ||
|
|
875426f2fc | ||
|
|
53a7384653 | ||
|
|
c97209fe69 | ||
|
|
9befacf0c5 | ||
|
|
8019e0eef3 | ||
|
|
3177d12d2b | ||
|
|
fac92cfbad | ||
|
|
5593ee7172 | ||
|
|
fc146519f9 | ||
|
|
87894441c7 | ||
|
|
49c9d8174f | ||
|
|
97be933592 | ||
|
|
8e1c4b354c | ||
|
|
0d5c02d3ab | ||
|
|
4cca17eeec | ||
|
|
eb150a4fee | ||
|
|
3ce142861d | ||
|
|
0ea86cb727 | ||
|
|
9d2a3f80cf | ||
|
|
10d03bbfbc | ||
|
|
820f81016a | ||
|
|
eed08b6988 | ||
|
|
a9caf07fb3 | ||
|
|
fc212358da | ||
|
|
0888cf51ab | ||
|
|
5cb1e0efea | ||
|
|
ea877ac6cc | ||
|
|
5816375273 | ||
|
|
419105df27 | ||
|
|
aa169b3bd3 | ||
|
|
378ed5ecc1 | ||
|
|
9918afd244 | ||
|
|
e0a5dec4a4 | ||
|
|
110858025a | ||
|
|
0a66b74b51 | ||
|
|
6802cf2349 | ||
|
|
feb8dc685d | ||
|
|
69171aa8fa | ||
|
|
c22c43f81a | ||
|
|
52b91b6698 | ||
|
|
d94050ddae | ||
|
|
f41720c311 | ||
|
|
8ba684be1c | ||
|
|
50e86bf02b | ||
|
|
4e9ba952bf | ||
|
|
b1b704bd67 | ||
|
|
01b23b6900 | ||
|
|
3c00189988 | ||
|
|
e6a2555c7d | ||
|
|
4f50a9bfb1 | ||
|
|
41ac16b26f | ||
|
|
396d3cc7ff | ||
|
|
b05ad85b0c | ||
|
|
4135eea634 | ||
|
|
96d694c0b5 | ||
|
|
da5304aabc | ||
|
|
cce34acace | ||
|
|
607ff8204b | ||
|
|
2082cdf230 | ||
|
|
c1c96f2c47 | ||
|
|
693b7a3283 | ||
|
|
7eeaa4ab14 | ||
|
|
f4d64d55ea | ||
|
|
ff55a8939c | ||
|
|
e50f91e600 | ||
|
|
7f2ea02b4a | ||
|
|
24f32511fc | ||
|
|
5899f2f516 | ||
|
|
e47907cc6b | ||
|
|
968280e370 | ||
|
|
8c7dc032f8 | ||
|
|
df0bdd5ae9 | ||
|
|
ee44f62972 | ||
|
|
e8f19bcf26 | ||
|
|
cb0913db0d | ||
|
|
32de4eb5d3 | ||
|
|
3721635b2c | ||
|
|
694725abf0 | ||
|
|
e833e26137 | ||
|
|
5a66d51102 | ||
|
|
1cadc26fd4 | ||
|
|
78362bc5fe | ||
|
|
7ecb36aef4 | ||
|
|
3fa31c3a47 | ||
|
|
9ee2f1e235 | ||
|
|
e860ef0e30 | ||
|
|
6c9484f614 | ||
|
|
162daf0c97 | ||
|
|
01e60ca4f6 | ||
|
|
b8efaa0017 | ||
|
|
6318baa45f | ||
|
|
3d579309cd | ||
|
|
f621aeba65 | ||
|
|
59815841e9 | ||
|
|
77403e0032 | ||
|
|
8d09f493a6 | ||
|
|
777f2db037 | ||
|
|
ba665de454 | ||
|
|
57fb6e67de | ||
|
|
916559e073 | ||
|
|
3639fe543c | ||
|
|
7cca5efdce | ||
|
|
0f89ec314b | ||
|
|
cf627b20d0 | ||
|
|
90ff5ad67e | ||
|
|
08eca6756f | ||
|
|
d4b93a092d | ||
|
|
c42064a684 | ||
|
|
47ff68e78b | ||
|
|
ac13778f60 | ||
|
|
aca93e3364 | ||
|
|
231b3dd432 | ||
|
|
70de22e63b | ||
|
|
80dab03a7d | ||
|
|
eab03540cd | ||
|
|
a97787c7b5 | ||
|
|
2c66c3bccf | ||
|
|
e4e7801d29 | ||
|
|
e51e7978a8 | ||
|
|
ca96509c97 | ||
|
|
04bf862d97 | ||
|
|
3f979ee495 | ||
|
|
3944c4b136 | ||
|
|
97ff396a97 | ||
|
|
8ff624df9f | ||
|
|
5711f54312 | ||
|
|
c3cdd9f6e1 | ||
|
|
1339095dba | ||
|
|
4358ace43c | ||
|
|
8b52e96f09 | ||
|
|
0ad2471c3a | ||
|
|
b52cfbeaa5 | ||
|
|
6755c20855 | ||
|
|
7c433a0b43 | ||
|
|
d5e5855b74 | ||
|
|
3b1d78880f | ||
|
|
4d9d767da2 | ||
|
|
b562bc55a8 | ||
|
|
dfec3c2d8b | ||
|
|
8c5d18c2cb | ||
|
|
d6e23c46c2 | ||
|
|
4f0c7fc917 | ||
|
|
c4184b5cf1 | ||
|
|
1a61d85ef2 | ||
|
|
514aeec5b4 | ||
|
|
6964169368 | ||
|
|
acf82efd52 | ||
|
|
e409c9e8f8 | ||
|
|
0e5c01f8b8 | ||
|
|
311aee1bff | ||
|
|
0b7bfacfea | ||
|
|
3ac9cdb1c5 | ||
|
|
c071990c2c | ||
|
|
ee84640963 | ||
|
|
f8139a8b28 | ||
|
|
cfa365a32d | ||
|
|
a1b4efe6a7 | ||
|
|
3586a7aa77 | ||
|
|
81b67232dc | ||
|
|
27c9d1f20f | ||
|
|
10e59202c7 | ||
|
|
7b56b90582 | ||
|
|
3e3ed34f03 | ||
|
|
50f8ae457c | ||
|
|
a601870064 | ||
|
|
8cd8820547 | ||
|
|
471439f564 | ||
|
|
e668f3bc36 | ||
|
|
351de47882 | ||
|
|
07d9319d54 | ||
|
|
7c5ec0f5be | ||
|
|
79bc77d2f4 | ||
|
|
874b013573 | ||
|
|
ffa0ee5d16 | ||
|
|
a742c80778 | ||
|
|
04ba461045 | ||
|
|
6d58fa27a4 | ||
|
|
822a7ae504 | ||
|
|
b0b60c8e05 | ||
|
|
4851deca54 | ||
|
|
437dad70e9 | ||
|
|
a3e464ca43 | ||
|
|
be82884d35 | ||
|
|
180e9d7851 | ||
|
|
d3d52b20e9 | ||
|
|
23446ef1e0 | ||
|
|
ec06c5d3b5 | ||
|
|
d3be9275c7 | ||
|
|
13efce5d1b | ||
|
|
f53ede36fb | ||
|
|
97cb17c792 | ||
|
|
3b82ac1696 | ||
|
|
99ccbc30df | ||
|
|
e93d0bea38 | ||
|
|
833e0f9e83 | ||
|
|
c902aba0d4 | ||
|
|
2bc5054a64 | ||
|
|
b67d810785 | ||
|
|
bbbdba2ec3 | ||
|
|
863e18b4cd | ||
|
|
a18d5494eb | ||
|
|
cbb4b50e02 | ||
|
|
ae43adb70d | ||
|
|
ddfefd05fc | ||
|
|
25e08a0973 | ||
|
|
6f92423c89 | ||
|
|
5641b0974b | ||
|
|
5c44f43e69 | ||
|
|
3c20ac5377 | ||
|
|
afcc697cb8 | ||
|
|
636d2d46a5 | ||
|
|
21a209735a | ||
|
|
bee086532f | ||
|
|
df1e8127da | ||
|
|
481ee9e6fc | ||
|
|
9f0878540b | ||
|
|
9119059723 | ||
|
|
28eae10b70 | ||
|
|
363469d757 | ||
|
|
dea0634544 | ||
|
|
1bcb63f97c | ||
|
|
b0472eac11 | ||
|
|
d6e34d362a | ||
|
|
7075a402d7 | ||
|
|
5729ae8029 | ||
|
|
a7d3ad67c7 | ||
|
|
7e9341434f | ||
|
|
6ac2c83570 | ||
|
|
05b879ed2a | ||
|
|
38e217704a | ||
|
|
e97ed33775 | ||
|
|
04942c4569 | ||
|
|
296d013f1a | ||
|
|
64a69cb49f | ||
|
|
70598ac292 | ||
|
|
2a12e97475 | ||
|
|
8a430ab25b | ||
|
|
2a5a7fb662 | ||
|
|
f182cb9599 | ||
|
|
9dc0c244b8 | ||
|
|
b4fb539c9b | ||
|
|
18423f7951 | ||
|
|
6dcc5e1158 | ||
|
|
e3e1f406bb | ||
|
|
496e3d962d | ||
|
|
7cddd7b838 | ||
|
|
93342718cd | ||
|
|
4ba44e899c | ||
|
|
36e8ce4fb0 | ||
|
|
4089949033 | ||
|
|
eb8f202ed0 | ||
|
|
c59779cf93 | ||
|
|
1dc360790d | ||
|
|
e0dc6cd4f6 | ||
|
|
ebc82d38b7 | ||
|
|
c9364f6ea2 | ||
|
|
332ecaa900 | ||
|
|
3e7a05f2a5 | ||
|
|
733c71ce9e | ||
|
|
a17d5cf494 | ||
|
|
bea41b898a | ||
|
|
e683985d10 | ||
|
|
4b6b46bb2a | ||
|
|
fe116c1670 | ||
|
|
7700b3df4c | ||
|
|
486030575d | ||
|
|
ce8f354dbd | ||
|
|
a262ad91e8 | ||
|
|
681462eca8 | ||
|
|
9492008435 | ||
|
|
22e837b645 | ||
|
|
0a68a26cff | ||
|
|
8b257fcc86 | ||
|
|
c64a94caa9 | ||
|
|
8d40852e8c | ||
|
|
cd72830807 | ||
|
|
206345ce9b | ||
|
|
4d25892179 | ||
|
|
6df523517f | ||
|
|
118ca9ecfc | ||
|
|
3838dc47c3 | ||
|
|
5c84d51b3f | ||
|
|
517d27a75f | ||
|
|
3ae60e559f | ||
|
|
7c2311660f | ||
|
|
bd44831b82 | ||
|
|
e3eec4b8a2 | ||
|
|
fe273e3901 | ||
|
|
3244bf5981 | ||
|
|
56663e7e32 | ||
|
|
f34a2ef14d | ||
|
|
c4d8793c67 | ||
|
|
54e28d79b9 | ||
|
|
2e34f38095 | ||
|
|
9ebf4a5d3c | ||
|
|
a3a2266046 | ||
|
|
4aad3438f7 | ||
|
|
442abd16d2 | ||
|
|
8f4ee8c71b | ||
|
|
15eed1e4f1 | ||
|
|
36894743e3 | ||
|
|
ae8e6ed5af | ||
|
|
552c37e156 | ||
|
|
1f8abe81a9 | ||
|
|
25b987fed6 | ||
|
|
414dc51ca2 | ||
|
|
ca4108b78e | ||
|
|
c440d302f1 | ||
|
|
3ae03005b8 | ||
|
|
99d4fd6bb7 | ||
|
|
3a04bddeed | ||
|
|
fa45d0d9c9 | ||
|
|
3659d64df3 | ||
|
|
370035d561 | ||
|
|
2b2033e561 | ||
|
|
78a78e4239 | ||
|
|
856f8265aa | ||
|
|
cf864c1b80 | ||
|
|
26d14fb3d3 | ||
|
|
e1e4ee9d7c | ||
|
|
778b354360 | ||
|
|
af67d62151 | ||
|
|
027565d023 | ||
|
|
66fd7e4329 | ||
|
|
56d2aed1c8 | ||
|
|
27dcc3a583 | ||
|
|
5cac9e14ec | ||
|
|
d9935e4664 | ||
|
|
f95b78f3eb | ||
|
|
84125ddae1 | ||
|
|
2f0f1b0bbc | ||
|
|
34a1ec6a36 | ||
|
|
972d6b44ba | ||
|
|
3947f07d93 | ||
|
|
3c90cc2f48 | ||
|
|
1c08ad507b | ||
|
|
ab2f95e45e | ||
|
|
eda73c0ad2 | ||
|
|
f44b084660 | ||
|
|
cfd51d2be2 | ||
|
|
d829e7fce2 | ||
|
|
246d285561 | ||
|
|
192990ce85 | ||
|
|
7a3e1a0e4a | ||
|
|
3507635bc6 | ||
|
|
b4692d07ee | ||
|
|
05065741f0 | ||
|
|
b09faad877 | ||
|
|
7e50abfdb8 | ||
|
|
a49cac2e65 | ||
|
|
5058ae2d29 | ||
|
|
2f954621cc | ||
|
|
d681635512 | ||
|
|
80043e21c1 | ||
|
|
37383f7123 | ||
|
|
7e692cfd43 | ||
|
|
e3250e2055 | ||
|
|
29763cb72d | ||
|
|
d4ce0e5e09 | ||
|
|
23ad117c49 | ||
|
|
cea907f6bf | ||
|
|
5f2baf7dc6 | ||
|
|
8a203398ef | ||
|
|
967cc19ab1 | ||
|
|
6770af96d4 | ||
|
|
e7ba1392e1 | ||
|
|
c23d6ce6ea | ||
|
|
e81836f328 | ||
|
|
4f03054e54 | ||
|
|
85752f0f5f | ||
|
|
7c752ffaef | ||
|
|
e27ecc9ae8 | ||
|
|
8e3f653749 | ||
|
|
e84af01462 | ||
|
|
338bad6393 | ||
|
|
504c0a8fec | ||
|
|
bc140a0b29 | ||
|
|
ccb8ce0403 | ||
|
|
95957248a1 | ||
|
|
99128f2b64 | ||
|
|
80626ded3e | ||
|
|
9efb74a32d | ||
|
|
49fe860b22 | ||
|
|
b96ea1e196 | ||
|
|
4a3f3ba68c | ||
|
|
a628b7caf5 | ||
|
|
11b5db88c2 | ||
|
|
e02a29e7a2 | ||
|
|
ae488efa5e | ||
|
|
32125a976b | ||
|
|
068531232b | ||
|
|
2db6d71118 | ||
|
|
4e1f8d0c5f | ||
|
|
28d03673f9 | ||
|
|
ba7dab6dba | ||
|
|
caa72f8290 | ||
|
|
eab9b75c8a | ||
|
|
ece72160ce | ||
|
|
54b68829b6 | ||
|
|
7b46244bb9 | ||
|
|
ad8638e04e | ||
|
|
611c895772 | ||
|
|
4ef45f13f4 | ||
|
|
f4eb0d9804 | ||
|
|
5ea0be0a8c | ||
|
|
4adeefc4ab | ||
|
|
6cd7001b35 | ||
|
|
fecc1d69e5 | ||
|
|
8ca5e8c319 | ||
|
|
267a109a81 | ||
|
|
44537b7bf8 | ||
|
|
e54d961160 | ||
|
|
f1a38e5294 | ||
|
|
6525182bfc | ||
|
|
1ea5879085 | ||
|
|
f232f6623d | ||
|
|
30f6c80d7a | ||
|
|
54483dd773 | ||
|
|
b0d844fa74 | ||
|
|
fbc4620f05 | ||
|
|
7e59d55042 | ||
|
|
5a57582050 | ||
|
|
899f5962ac | ||
|
|
26cd262a6a | ||
|
|
05d2a14526 | ||
|
|
773d6a7ded | ||
|
|
7eb0bc7bc4 | ||
|
|
f46c2fff71 | ||
|
|
5580e4c176 | ||
|
|
8dcc483053 | ||
|
|
bb8c16d121 | ||
|
|
486a8f33e2 | ||
|
|
ba9f3d3326 | ||
|
|
78c982667a | ||
|
|
28f3f537c4 | ||
|
|
83c9ff7dbb | ||
|
|
827ec27a9c | ||
|
|
0fa5dbedc5 | ||
|
|
ce7f408dfd | ||
|
|
c4b529f503 | ||
|
|
c96f1b1e6b | ||
|
|
ed2005fa5b | ||
|
|
7a94a4326f | ||
|
|
1427102692 | ||
|
|
056a3f2427 | ||
|
|
8fa1afb65c | ||
|
|
19bb14c346 | ||
|
|
56d57a70ec | ||
|
|
1230f3bcff | ||
|
|
636cc1ef63 | ||
|
|
535f61ca4a | ||
|
|
4e58a1ffc7 | ||
|
|
48b7ab1b35 | ||
|
|
9cf339ada3 | ||
|
|
2c19a5fa78 | ||
|
|
2e094b20a6 | ||
|
|
fb0e5184a6 | ||
|
|
100d575ec9 | ||
|
|
b31250e7e6 | ||
|
|
ddfea6b54c | ||
|
|
12819a5799 | ||
|
|
d4dd3521bb | ||
|
|
e920bfb1e8 | ||
|
|
3c530fc528 | ||
|
|
37502d2733 | ||
|
|
ebe7411691 | ||
|
|
fd9f902477 | ||
|
|
2c7f7a337a | ||
|
|
3aaf6ccc83 | ||
|
|
a9f4b9cdb0 | ||
|
|
0626cbe923 | ||
|
|
96087189e6 | ||
|
|
51160a47b1 | ||
|
|
68dc90c6e9 | ||
|
|
a9d30a4066 | ||
|
|
0cb42c27f9 | ||
|
|
2bdf760fe0 | ||
|
|
ce4167060c | ||
|
|
ee4b74fb9c | ||
|
|
f60b7d8655 | ||
|
|
99edb47e85 | ||
|
|
8ee1825364 | ||
|
|
83a3cba777 | ||
|
|
cd501ff74b | ||
|
|
646e0506f6 | ||
|
|
3a62030116 | ||
|
|
be1c0381e5 | ||
|
|
6fe0abbf12 | ||
|
|
5f6a495bf4 | ||
|
|
1f680ccc9b | ||
|
|
43a85a7365 | ||
|
|
61b4afb424 | ||
|
|
2ac599dc75 | ||
|
|
7f70f81153 | ||
|
|
79b3c8bfa1 | ||
|
|
fa795f29e2 | ||
|
|
ab9457efd7 | ||
|
|
103c5e1ecb | ||
|
|
4eec1a2276 | ||
|
|
8a2db478de | ||
|
|
6e53596cec | ||
|
|
dc4c1ee39d | ||
|
|
d1c4e5c521 | ||
|
|
a324c2111e | ||
|
|
e8a7c9bc93 | ||
|
|
cb802bfbc7 | ||
|
|
a0b2c69441 | ||
|
|
9835859f21 | ||
|
|
9b5e2e8574 | ||
|
|
8da51857f0 | ||
|
|
460cddffa1 | ||
|
|
fac3275a43 | ||
|
|
30e6e809ed | ||
|
|
8d21728942 | ||
|
|
352d557d4d | ||
|
|
751c7de98a | ||
|
|
81aed4f28e | ||
|
|
c84618d7ac | ||
|
|
d61a423f7c | ||
|
|
f52759131b | ||
|
|
c860837303 | ||
|
|
1982098e00 | ||
|
|
e95e48c6ee | ||
|
|
f57850d7e8 | ||
|
|
c8a9a6b4a7 | ||
|
|
66bfe863f5 | ||
|
|
d50a99c5ce | ||
|
|
a7316ae4f7 | ||
|
|
6b449e8a6d | ||
|
|
ba9368fa4f | ||
|
|
1f28dfb2e4 | ||
|
|
41351164f8 | ||
|
|
855a549660 | ||
|
|
5c5350b30b | ||
|
|
6cc8f694b5 | ||
|
|
abdf191b64 | ||
|
|
b5b31c9589 | ||
|
|
247d6d4270 | ||
|
|
93f44f28a2 | ||
|
|
b208aad51c | ||
|
|
b9909e3341 | ||
|
|
9ea68421f6 | ||
|
|
8e5db363e8 | ||
|
|
cd08059f49 | ||
|
|
dade93b4eb | ||
|
|
f49ec88a3f | ||
|
|
ae01bd1808 | ||
|
|
659dc319d9 | ||
|
|
e3469d76c7 | ||
|
|
149965bd13 | ||
|
|
a76a22b779 | ||
|
|
64fb0900cb | ||
|
|
314929920f | ||
|
|
c7e15f0891 | ||
|
|
856d659016 | ||
|
|
80525318b7 | ||
|
|
e2ecc2d8c6 | ||
|
|
b40e38db98 | ||
|
|
21a3aab720 | ||
|
|
ee9938572e | ||
|
|
256c91f837 | ||
|
|
8229d06b05 | ||
|
|
a0cab31ab8 | ||
|
|
d0d61e44be | ||
|
|
75e4cbb7be | ||
|
|
45404a2ad8 | ||
|
|
7e916ae4e0 | ||
|
|
ef9ddb915b | ||
|
|
a956a464ef | ||
|
|
87483405a0 | ||
|
|
8c828f329b | ||
|
|
9a3676a88f | ||
|
|
53cf50e00f | ||
|
|
53c1e4834f | ||
|
|
df6e79bfd2 | ||
|
|
5db9c5c1d9 | ||
|
|
bb1ba3a1ca | ||
|
|
3ad42552ca | ||
|
|
2f461da2a0 | ||
|
|
3aa35b727f | ||
|
|
ac5bff2b6f | ||
|
|
ab6f4a825e | ||
|
|
859e3a77d0 | ||
|
|
61a02caca4 | ||
|
|
08f06c9341 | ||
|
|
831625d29e | ||
|
|
89031be373 | ||
|
|
ab173bb4c1 | ||
|
|
ded4c82ace | ||
|
|
f11712ea21 | ||
|
|
3934ca8e6c | ||
|
|
ce052202f0 | ||
|
|
11ee2ca8d4 | ||
|
|
57575f3c9c | ||
|
|
45845cb6a5 | ||
|
|
c21c4dc2b4 | ||
|
|
336bd09d2c | ||
|
|
1c89fd148d | ||
|
|
1d3496b4c1 | ||
|
|
463e13fe81 | ||
|
|
2b3e22d602 | ||
|
|
ee54b8404c | ||
|
|
d6f0467edf | ||
|
|
bfa1db78cd | ||
|
|
dda7ae7dcd | ||
|
|
61c0665dad | ||
|
|
8b2b77e460 | ||
|
|
07cacb2455 | ||
|
|
690905cea0 | ||
|
|
443fb52487 | ||
|
|
b29cb51654 | ||
|
|
64ae4e07a4 | ||
|
|
8064f68d60 | ||
|
|
40da1e5a31 | ||
|
|
b92896ece4 | ||
|
|
271cd19dbe | ||
|
|
7c8da72c11 | ||
|
|
56ee31ccfe | ||
|
|
e41f3f9025 | ||
|
|
e38e73d5a6 | ||
|
|
928da57447 | ||
|
|
297b8edc05 | ||
|
|
28609baf6e | ||
|
|
a3bfaa1919 | ||
|
|
7e4f74f504 | ||
|
|
c2ab990938 | ||
|
|
1d50dfe602 | ||
|
|
185e940e27 | ||
|
|
095fa15591 | ||
|
|
cf3fd99e72 | ||
|
|
06d418abd1 | ||
|
|
fa9384b1c0 | ||
|
|
0a8e91bb24 | ||
|
|
4d7c18c7c0 | ||
|
|
0106da599a | ||
|
|
5d623b1775 | ||
|
|
76a4478264 | ||
|
|
96c6f6f3d1 | ||
|
|
56903458d7 | ||
|
|
8795467533 | ||
|
|
8d89fc6bb1 | ||
|
|
68b736b50f | ||
|
|
aabea6f7b9 | ||
|
|
871c8e40d1 | ||
|
|
1aedbb7886 | ||
|
|
cfdec163f9 | ||
|
|
ab2676d291 | ||
|
|
3622d6d7b0 | ||
|
|
b6c8976811 | ||
|
|
05214a0bed | ||
|
|
6c8fc6e377 | ||
|
|
8bcfd683bd | ||
|
|
a3c0cef9a7 | ||
|
|
2f6ed29d04 | ||
|
|
a3044aba53 | ||
|
|
50f5bbbbaf | ||
|
|
c4c1c4f456 | ||
|
|
46cc29261f | ||
|
|
7f5701eb8d | ||
|
|
b7d1b6f904 | ||
|
|
58ef91ff50 | ||
|
|
fbf338ff98 | ||
|
|
40db1daf00 | ||
|
|
cbd1b385a2 | ||
|
|
6470e0a12b | ||
|
|
da5ef1737e | ||
|
|
ecc13ef17e | ||
|
|
5bcf262d59 | ||
|
|
d97eb42593 | ||
|
|
63330a89fc | ||
|
|
49268028b9 | ||
|
|
b874d4b5be | ||
|
|
283d385fbd | ||
|
|
96cf7270da | ||
|
|
b19bdcbea7 | ||
|
|
4e93c3f707 | ||
|
|
f3b14c2b6a | ||
|
|
d8b04dc184 | ||
|
|
b5b608e44a | ||
|
|
78d5cf7cb4 | ||
|
|
f4a942783a | ||
|
|
3b9aaaab42 | ||
|
|
fc68c87afa | ||
|
|
63f3bcd852 | ||
|
|
57f90974f9 | ||
|
|
d8cc8c0499 | ||
|
|
36b2e5e2c2 | ||
|
|
3c4315fa13 | ||
|
|
d97d130da9 | ||
|
|
e0aa98a1df | ||
|
|
84bc192946 | ||
|
|
e684eab878 | ||
|
|
debf483d4d | ||
|
|
d681df8e5f | ||
|
|
540a5169b9 | ||
|
|
12beb05a73 | ||
|
|
e6aafacb23 | ||
|
|
8d3d72a68c | ||
|
|
b2fab575dc | ||
|
|
de74e1ef41 | ||
|
|
f2cbd4cbd6 | ||
|
|
5ecc117a25 | ||
|
|
00ed3ccfd9 | ||
|
|
6a877a79c4 | ||
|
|
cb73315dd6 | ||
|
|
8552a3270c | ||
|
|
281327f72c | ||
|
|
da119ab18c | ||
|
|
87bd8907a6 | ||
|
|
a242ef13e0 | ||
|
|
2b9d8f65a6 | ||
|
|
ffc68f357e | ||
|
|
ace51ef520 | ||
|
|
93b02f502e | ||
|
|
49c062821a | ||
|
|
c504d8b435 | ||
|
|
39fe00ef60 | ||
|
|
bae44febb5 | ||
|
|
5c274467d6 | ||
|
|
c82a11334d | ||
|
|
f34e1d6b0e | ||
|
|
a073aa5a26 | ||
|
|
575733aa25 | ||
|
|
546d5dacf5 | ||
|
|
3411ad661a | ||
|
|
a2b64e30b8 | ||
|
|
50411d30d5 | ||
|
|
88c86ac7f0 | ||
|
|
55c912ae40 | ||
|
|
b7c770e186 | ||
|
|
324ea606da | ||
|
|
df478eee75 | ||
|
|
8f53670cc5 | ||
|
|
f071d5574c | ||
|
|
1743473b2b | ||
|
|
0d6d85b494 | ||
|
|
bbc9bfe16e | ||
|
|
466a59984a | ||
|
|
8df0b654dc | ||
|
|
97af51db9d | ||
|
|
69f7ed9610 | ||
|
|
67b4a9ea17 | ||
|
|
dc63e65419 | ||
|
|
62cdced342 | ||
|
|
919a7c4d6e | ||
|
|
f06c2b5852 | ||
|
|
613ed5cd76 | ||
|
|
3605b48508 | ||
|
|
4fe1bdd406 | ||
|
|
a13bf117d5 | ||
|
|
730b9b8b77 | ||
|
|
5e264a5d3e | ||
|
|
4baac4b291 | ||
|
|
1f4f8fb9e3 | ||
|
|
af75a298c1 | ||
|
|
9fc144451d | ||
|
|
861d9430c0 | ||
|
|
e8b9702c0a | ||
|
|
109283a883 | ||
|
|
e95b672376 | ||
|
|
dadd2b698e | ||
|
|
3e70a25bcf | ||
|
|
3e6c9011d0 | ||
|
|
d93fe0fa35 | ||
|
|
beb26a0847 | ||
|
|
e84d115b93 | ||
|
|
7929ec198f | ||
|
|
0b11ea7199 | ||
|
|
7deba0428a | ||
|
|
aacdba2bdb | ||
|
|
5ae33613ab | ||
|
|
8652d5493d | ||
|
|
af11946054 | ||
|
|
55a0b3abc7 | ||
|
|
a4f7b50471 | ||
|
|
226e3710b4 | ||
|
|
89f7217954 | ||
|
|
283c34fc2b | ||
|
|
1cb6524918 | ||
|
|
ff66b6dad3 | ||
|
|
64a7eace88 | ||
|
|
051de5aadc | ||
|
|
d2765b5175 | ||
|
|
d27cd4dfdd | ||
|
|
030b00b8a5 | ||
|
|
de50e9c002 | ||
|
|
868f935e23 | ||
|
|
4ba662ff90 | ||
|
|
dc7085ceeb | ||
|
|
9444bf6161 | ||
|
|
06ca27cdf5 | ||
|
|
dd82da4e27 | ||
|
|
190047f161 | ||
|
|
748867d177 | ||
|
|
b806625d41 | ||
|
|
dba2055979 | ||
|
|
aa23dcd8ae | ||
|
|
5bbbfeaf19 | ||
|
|
9b6c5fd7c7 | ||
|
|
904a76376f | ||
|
|
52814c0ee3 | ||
|
|
d124904f2b | ||
|
|
7fd850d58e | ||
|
|
71bb2ecd79 | ||
|
|
6e0348f33b | ||
|
|
27458b10ff | ||
|
|
bf27e473cb | ||
|
|
549442cc2a | ||
|
|
98836432c1 | ||
|
|
d988dc30df | ||
|
|
c5f8b69ad7 | ||
|
|
2beee35d5e | ||
|
|
1ae8b8aa02 | ||
|
|
8f092d0dda | ||
|
|
d624f60682 | ||
|
|
5decf6d813 | ||
|
|
1a1c80febe | ||
|
|
7b3ff4e055 | ||
|
|
56b58c0a94 | ||
|
|
ad2565c8ff | ||
|
|
9f3d191fce | ||
|
|
f17c5fa573 | ||
|
|
99369bea1c | ||
|
|
45ef8eb723 | ||
|
|
bc6eae15ab | ||
|
|
475f3a8128 | ||
|
|
6b1e7a6ca4 | ||
|
|
bbaa0d5917 | ||
|
|
3c4bfd685a | ||
|
|
9dde7a66b5 | ||
|
|
34b56de12a | ||
|
|
951cedf8cb | ||
|
|
0baf97618d | ||
|
|
8642792c3e | ||
|
|
5bbfd48475 | ||
|
|
c33488feb1 | ||
|
|
18e61d3d41 | ||
|
|
fbf717086e | ||
|
|
5a6a98f875 | ||
|
|
35857f556c | ||
|
|
a6865e6897 | ||
|
|
55068924f7 | ||
|
|
16addb86fc | ||
|
|
5f2c30d9bc | ||
|
|
c00f8e05a6 | ||
|
|
85231e1ff3 | ||
|
|
88396c383c | ||
|
|
df03141dbc | ||
|
|
bf9cdc472c | ||
|
|
02b5c8e3a3 | ||
|
|
f734347ae7 | ||
|
|
4aca0017e8 | ||
|
|
1e057b352a | ||
|
|
431b86c8e9 | ||
|
|
b093aa2dc7 | ||
|
|
32bd2fbb4c | ||
|
|
1d84d6940e | ||
|
|
87ae968810 | ||
|
|
f13deabd22 | ||
|
|
0d59a84b53 | ||
|
|
68cb510f18 | ||
|
|
5e60145449 | ||
|
|
282e0583b0 | ||
|
|
32d115f385 | ||
|
|
416d3d6390 | ||
|
|
8a9a5838f3 | ||
|
|
a94cd56d6f | ||
|
|
b819f519cb | ||
|
|
44d832c5ad | ||
|
|
4961910fe3 | ||
|
|
3d0da653f0 | ||
|
|
4ef0e2d92a | ||
|
|
bd0f2c034a | ||
|
|
d8a698713e | ||
|
|
57f2579281 | ||
|
|
215ff169db | ||
|
|
85b458d90d | ||
|
|
268ae2841b | ||
|
|
638cad7c97 | ||
|
|
0fbb79d54f | ||
|
|
36c34f4e71 | ||
|
|
373efa4427 | ||
|
|
cee4599131 | ||
|
|
c6011f2add | ||
|
|
f8b958dc62 | ||
|
|
036712546b | ||
|
|
391d605790 | ||
|
|
aef0f55791 | ||
|
|
66ed711ccf | ||
|
|
960b1e48e8 | ||
|
|
437a56dc6b | ||
|
|
630aed8b66 | ||
|
|
af6292f0fc | ||
|
|
b710520a3d | ||
|
|
66e092bb53 | ||
|
|
fdc1037b19 | ||
|
|
76df206685 | ||
|
|
77364fd6bb | ||
|
|
41b0e41a09 | ||
|
|
791532b0ce | ||
|
|
ad45024416 | ||
|
|
3ae5ac28af | ||
|
|
fd28794bbc | ||
|
|
d18fd0235b | ||
|
|
15c5c072f4 | ||
|
|
caf207afa7 | ||
|
|
57937cf480 | ||
|
|
feaf30ffaa | ||
|
|
dcae873414 | ||
|
|
32214acb3a | ||
|
|
e64bcf5a99 | ||
|
|
62cb52f431 | ||
|
|
cf8b1b7853 | ||
|
|
bc97e005fa | ||
|
|
679fa7ed3c | ||
|
|
4f084f3ab5 | ||
|
|
af2716626a | ||
|
|
6625c085ae | ||
|
|
af2578562c | ||
|
|
8099e7b1ba | ||
|
|
0a3e348225 | ||
|
|
b78e6ac2c3 | ||
|
|
cbfe65c2fe | ||
|
|
284d62da81 | ||
|
|
c6df70fb48 | ||
|
|
1b8616adee | ||
|
|
639bd4873b | ||
|
|
e0904b27ff | ||
|
|
d9eff33ce2 | ||
|
|
8974102f6b | ||
|
|
599182b108 | ||
|
|
6a736cc129 | ||
|
|
15b93069bb | ||
|
|
19b5c10963 | ||
|
|
bcfbddefe1 | ||
|
|
780cb33741 | ||
|
|
8d7c07f191 | ||
|
|
fefd3f66f9 | ||
|
|
d57b8833c4 | ||
|
|
9584c6ae90 | ||
|
|
021b2fddff | ||
|
|
b6f2e05819 | ||
|
|
3ed08d1e4d | ||
|
|
26a077fc7e | ||
|
|
8461734ee4 | ||
|
|
6f4c2dada4 | ||
|
|
ab42fe38fd | ||
|
|
3be5d63c2f | ||
|
|
b4dc22cab7 | ||
|
|
2b125c69cc | ||
|
|
9268366cad | ||
|
|
d0eedc4a5f | ||
|
|
4460416abc | ||
|
|
884e1cda7c | ||
|
|
46a885bf9f | ||
|
|
7dbca9be86 | ||
|
|
7d9bb76ac7 | ||
|
|
26ab7b07a6 | ||
|
|
14499534ba | ||
|
|
1540df0e79 | ||
|
|
5d68c80b16 | ||
|
|
5f8cd1a4be | ||
|
|
14201d23e7 | ||
|
|
a229b17434 | ||
|
|
ca2c693679 | ||
|
|
cdcb27a4fe | ||
|
|
0c5ccb35c7 | ||
|
|
9d787df196 | ||
|
|
0290e98271 | ||
|
|
d136ca4eeb | ||
|
|
a55f910cf6 | ||
|
|
96efbc51ac | ||
|
|
9d36d4fb1d | ||
|
|
41bfa5dad1 | ||
|
|
db9fbaf9b8 | ||
|
|
56fb5c4dbf | ||
|
|
a8986425a4 | ||
|
|
ea3c4e8273 | ||
|
|
6db8c5a5fe | ||
|
|
ab9b04f55b | ||
|
|
c4b572b5ca | ||
|
|
cc6f0925df | ||
|
|
d50cf62d62 | ||
|
|
75369f8ba0 | ||
|
|
8e2bcb4b42 | ||
|
|
bfac40665b | ||
|
|
6c6d805765 | ||
|
|
44f870be42 | ||
|
|
b37398dc1c | ||
|
|
1b0a362d83 | ||
|
|
bb425d20a1 | ||
|
|
cbd69dc6ff | ||
|
|
cb8def95c4 | ||
|
|
78d1d4f86d | ||
|
|
5bfa3b363a | ||
|
|
1d4b337543 | ||
|
|
8c67d395d4 | ||
|
|
02566acdd7 | ||
|
|
478aa7dac1 | ||
|
|
967db70090 | ||
|
|
619c1bb334 | ||
|
|
57aa1e9140 | ||
|
|
af2fcbafe8 | ||
|
|
7b6bdc3f94 | ||
|
|
db43f56d94 | ||
|
|
a1ebd77179 | ||
|
|
e26d76dca1 | ||
|
|
d59732004d | ||
|
|
a3a8f58d73 | ||
|
|
c9e5b75308 | ||
|
|
fd191a7b41 | ||
|
|
e42c7a980c | ||
|
|
85804a9197 | ||
|
|
ee2321c91e | ||
|
|
11fbde4454 | ||
|
|
fb05f9876a | ||
|
|
7e9bfdde14 | ||
|
|
7e9fc37db8 | ||
|
|
bb278147cf | ||
|
|
81b676a675 | ||
|
|
6b46e7baa0 | ||
|
|
85c85f07e2 | ||
|
|
c853dc72e9 | ||
|
|
18d0c9b858 | ||
|
|
0a5fd0dcec | ||
|
|
e0e99c59a5 | ||
|
|
d46394ad33 | ||
|
|
87dc81a1f6 | ||
|
|
ce92ca0527 | ||
|
|
c390590fac | ||
|
|
fd8e4aef90 | ||
|
|
c5a742a3bf | ||
|
|
fc4e10a859 | ||
|
|
83bb0893ed | ||
|
|
8fdcc1a9b1 | ||
|
|
a23b368c92 | ||
|
|
bbfff3e58b | ||
|
|
9c322b2f3b | ||
|
|
dff9a66c44 | ||
|
|
449b0e0707 | ||
|
|
4a5a9c6d89 | ||
|
|
917f3e4d25 | ||
|
|
7d848c55a6 | ||
|
|
7d17d6c976 | ||
|
|
b8060ef781 | ||
|
|
727543c1e6 | ||
|
|
c85cda9e2f | ||
|
|
c0c6c74d99 | ||
|
|
d26bd6ca55 | ||
|
|
e22eb857be | ||
|
|
2fa6fd3aaa | ||
|
|
dd5875499e | ||
|
|
d351541ee6 | ||
|
|
d928724c3c | ||
|
|
727e68d0b5 | ||
|
|
8d28614e4f | ||
|
|
fba5fbbdad | ||
|
|
d008b6b89f | ||
|
|
aede120c92 | ||
|
|
cc2303001e | ||
|
|
54e7d7c32d | ||
|
|
bcd352dfa1 | ||
|
|
d837ac3984 | ||
|
|
900e15da34 | ||
|
|
19d69051a3 | ||
|
|
31737a05e1 | ||
|
|
1161f03777 | ||
|
|
cf24ac8c19 | ||
|
|
af3ef92a6b | ||
|
|
c46cda8260 | ||
|
|
34bd2be23f | ||
|
|
c3dd68fcf1 | ||
|
|
3e35441f18 | ||
|
|
dde2db3da9 | ||
|
|
cbc21754e5 | ||
|
|
eb2dc8c34b | ||
|
|
c4e098a514 | ||
|
|
72875215a3 | ||
|
|
335bc217b3 | ||
|
|
510aecdbd8 | ||
|
|
9dd9d81fc6 | ||
|
|
a5b48ce798 | ||
|
|
59afbd8e73 | ||
|
|
348baca3e4 | ||
|
|
83691c413f | ||
|
|
ca36b9b8f8 | ||
|
|
a9c7dc74c4 | ||
|
|
ce862de624 | ||
|
|
500861cd05 | ||
|
|
44d26d9209 | ||
|
|
35270e34d0 | ||
|
|
fe654ff0aa | ||
|
|
5e1e1ec060 | ||
|
|
2673ff1932 | ||
|
|
e8f7ea6794 | ||
|
|
3899211bfc | ||
|
|
6e0c1c448d | ||
|
|
6ae68b4674 | ||
|
|
41eba87b32 | ||
|
|
a1084c02fd | ||
|
|
5ac8420abc | ||
|
|
24d009507f | ||
|
|
e9020221a7 | ||
|
|
b59e9e5724 | ||
|
|
b5859d6359 | ||
|
|
dbfaae0e34 | ||
|
|
8d85429a44 | ||
|
|
3e4ab73cd4 | ||
|
|
4e32b2e916 | ||
|
|
356333b331 | ||
|
|
f62f3a2191 | ||
|
|
389333396a | ||
|
|
cfb7410cd0 | ||
|
|
f672b1c399 | ||
|
|
f12f694355 | ||
|
|
9a9c6e1256 | ||
|
|
9c65c125a9 | ||
|
|
7d4d3f8da6 | ||
|
|
569ffe77bf | ||
|
|
a42b2b8133 | ||
|
|
31ba4de21d | ||
|
|
a005c47763 | ||
|
|
5db6ca5a4b | ||
|
|
1a6fdf2417 | ||
|
|
27a2c3a406 | ||
|
|
b347edfa23 | ||
|
|
3ed09d970e | ||
|
|
a28e2aeefe | ||
|
|
c6a71c7b8a | ||
|
|
6ecb9a2d68 | ||
|
|
918a6874df | ||
|
|
2663232a01 | ||
|
|
cebab07e68 | ||
|
|
a04f3077cd | ||
|
|
04b873598b | ||
|
|
22137f9cac | ||
|
|
54665349ec | ||
|
|
f251a89772 | ||
|
|
fbdfa57746 | ||
|
|
6b095274fb | ||
|
|
11174408e8 | ||
|
|
c2117747fd | ||
|
|
4f6e293308 | ||
|
|
d9076cac19 | ||
|
|
ff52ca1b57 | ||
|
|
8a3c4957fc | ||
|
|
3f54a83ca8 | ||
|
|
7fa3b9e376 | ||
|
|
39135af155 | ||
|
|
02640e8e65 | ||
|
|
579f385384 | ||
|
|
56d60c4b2d | ||
|
|
62fd2b3644 | ||
|
|
cd9072d342 | ||
|
|
19bab59c48 | ||
|
|
d8b627b9dc | ||
|
|
6320d072a1 | ||
|
|
7abeb49878 | ||
|
|
14fcfbec3e | ||
|
|
fa9f15e3be | ||
|
|
ae4758ce0d | ||
|
|
66f01450a8 | ||
|
|
e5786ed1b7 | ||
|
|
b47517140b | ||
|
|
3de6001e1e | ||
|
|
c8d685c9d3 | ||
|
|
d6d3173916 | ||
|
|
8b6bf0ef57 | ||
|
|
7bd8f23303 | ||
|
|
a08ea34aba | ||
|
|
6cb77ea91f | ||
|
|
c586b033a7 | ||
|
|
a9f634f815 | ||
|
|
551c2dd71f | ||
|
|
ffc4f173b6 | ||
|
|
ebd1d65a1b | ||
|
|
5b68300899 | ||
|
|
2b6dd6a1fc | ||
|
|
1d22c670b0 | ||
|
|
0ae480dcbf | ||
|
|
256cba18c3 | ||
|
|
e6fcec9173 | ||
|
|
1db3d2615d | ||
|
|
5204d1d36d | ||
|
|
3fa59d171d | ||
|
|
d7264a3cc0 | ||
|
|
9078167927 | ||
|
|
3bd7fba7af | ||
|
|
b455451f49 | ||
|
|
efa5eb424d | ||
|
|
3baa150bd4 | ||
|
|
43cc4d84bc | ||
|
|
6b84015e67 | ||
|
|
60bbb8fcc9 | ||
|
|
16c84f2873 | ||
|
|
579238a3ac | ||
|
|
2b5cd3dbf8 | ||
|
|
3d8a164d0e | ||
|
|
00ae54f00a | ||
|
|
488d55c546 | ||
|
|
9d6165f235 | ||
|
|
2258f00e91 | ||
|
|
2bac2d6d76 | ||
|
|
b6b895bab5 | ||
|
|
fdeae2a3ac | ||
|
|
040f388331 | ||
|
|
7990578443 | ||
|
|
528ae4f46c | ||
|
|
0fb7b847c5 | ||
|
|
a67a6f957d | ||
|
|
965edeb63b | ||
|
|
329bbd797f | ||
|
|
065fc56ab2 | ||
|
|
64d144aece | ||
|
|
2d9b156e9e | ||
|
|
2b9be6f707 | ||
|
|
b26897fb60 | ||
|
|
8bf25df640 | ||
|
|
e743cfdd4b | ||
|
|
636e5cd2d5 | ||
|
|
f046336c44 | ||
|
|
665b7e58ba | ||
|
|
1391a06d80 | ||
|
|
404815eaf0 | ||
|
|
6c128565b1 | ||
|
|
e1cb85802b | ||
|
|
cbd60fcaaf | ||
|
|
28a88b6886 | ||
|
|
7081e99735 | ||
|
|
dc67eda6bf | ||
|
|
b85f723535 | ||
|
|
9ff9dde8d7 | ||
|
|
8714280104 | ||
|
|
6d70aa7836 | ||
|
|
14986b9d58 | ||
|
|
e5c9bc1198 | ||
|
|
fc9bc6f8db | ||
|
|
c62b94614d | ||
|
|
833685ded5 | ||
|
|
3cff5fb56f | ||
|
|
3e6dad37c4 | ||
|
|
600c876968 | ||
|
|
cc68f78d92 | ||
|
|
48ca487621 | ||
|
|
13cb578a37 | ||
|
|
df2afa9ff4 | ||
|
|
76d5c79e9c | ||
|
|
fdf2b152e5 | ||
|
|
178c189b0b | ||
|
|
14be3b16cd | ||
|
|
2e111dd57a | ||
|
|
06e9f8870a | ||
|
|
7e0d508002 | ||
|
|
585b3b37c0 | ||
|
|
167a320e5f | ||
|
|
2242cd92ee | ||
|
|
d20fb951fa | ||
|
|
e0a393361d | ||
|
|
da9c518116 | ||
|
|
4d51eff05f | ||
|
|
a6c718ce8e | ||
|
|
43a050e542 | ||
|
|
25787f8071 | ||
|
|
ecfa02bdc8 | ||
|
|
080d1b718d | ||
|
|
8ea8d6de80 | ||
|
|
4dbc1d1bb3 | ||
|
|
3b9669cff4 | ||
|
|
a6332e6980 | ||
|
|
9037b63eb2 | ||
|
|
308015bc4d | ||
|
|
2692a42231 | ||
|
|
e064127729 | ||
|
|
103281f3b6 | ||
|
|
69ba546721 | ||
|
|
d65638dacb | ||
|
|
a0be1eddcf | ||
|
|
e1b48995c2 | ||
|
|
194e074764 | ||
|
|
7f1d77d9fb | ||
|
|
3722020071 | ||
|
|
f7235c223d | ||
|
|
868eba13f2 | ||
|
|
2cae00be9e | ||
|
|
69eba8c40a | ||
|
|
17b01c5b13 | ||
|
|
a0508937fc | ||
|
|
bc07024624 | ||
|
|
907f75447b | ||
|
|
500d8e6002 | ||
|
|
3d12d7a2cc | ||
|
|
886b9afcc5 | ||
|
|
f3f9777497 | ||
|
|
5596b70bd0 | ||
|
|
4211605000 | ||
|
|
aa09b74a41 | ||
|
|
d9a7ea5b43 | ||
|
|
914f531f39 | ||
|
|
0fc0dcff60 | ||
|
|
0e32ce3219 | ||
|
|
ff0636635a | ||
|
|
ba111df2b9 | ||
|
|
dff1671f8f | ||
|
|
44f77ac1b0 | ||
|
|
641a8558f4 | ||
|
|
3bff70ef15 | ||
|
|
d672bf167c | ||
|
|
ea62729238 | ||
|
|
32ec0a762d | ||
|
|
ca121b1a5c | ||
|
|
0db77f5a2b | ||
|
|
cc4037d120 | ||
|
|
a999414eaf | ||
|
|
00083a0909 | ||
|
|
8a7f561ee5 | ||
|
|
32b2fb8a27 | ||
|
|
104727ad6e | ||
|
|
cce471c9ce | ||
|
|
353e7a7ec3 | ||
|
|
73088e46f7 | ||
|
|
52f1b04183 | ||
|
|
83e0dc7a3d | ||
|
|
c4bb88715c | ||
|
|
54c7ace145 | ||
|
|
c1b8934faa | ||
|
|
5746f04994 | ||
|
|
f9452c94c0 | ||
|
|
68c49db952 | ||
|
|
f9c7788ba5 | ||
|
|
68318328f1 | ||
|
|
c9a9968dfc | ||
|
|
48dba7f9ac | ||
|
|
bdf1f472b4 | ||
|
|
e4297a66b1 | ||
|
|
ec6d8eab69 | ||
|
|
dece5ee1f5 | ||
|
|
a41dc8f969 | ||
|
|
aa11b710ce | ||
|
|
6af5a4accf | ||
|
|
ec8974914f | ||
|
|
b9775297cd | ||
|
|
4a6b33f1ee | ||
|
|
7dd7ff0f33 | ||
|
|
126732bcc1 | ||
|
|
23d6dcd125 | ||
|
|
9fd9e96130 | ||
|
|
f0a7fc5b43 | ||
|
|
d82e0d7dd8 | ||
|
|
5545fc3046 | ||
|
|
a638056838 | ||
|
|
1f524c4544 | ||
|
|
47b8f66ced | ||
|
|
52da8a514a | ||
|
|
5cd7c104bd | ||
|
|
173edca09e | ||
|
|
506b219237 | ||
|
|
6c83d7d5bf | ||
|
|
a059f72b09 | ||
|
|
afcebd136f | ||
|
|
3d3c192621 | ||
|
|
92b3ee855f | ||
|
|
650ab3b077 | ||
|
|
474cca1e9d | ||
|
|
c0cae7f702 | ||
|
|
3f7e5358e5 | ||
|
|
3d352f5228 | ||
|
|
540eca9d9d | ||
|
|
19cd47fd26 | ||
|
|
cf62cc435f | ||
|
|
8b6bdafc39 | ||
|
|
27790828d1 | ||
|
|
d782ffb822 | ||
|
|
5a84ac3fe3 | ||
|
|
343b7d7488 | ||
|
|
aefea76cf8 | ||
|
|
4976edb1a6 | ||
|
|
171ba532bc | ||
|
|
bfd2e8c25f | ||
|
|
b2d225a669 | ||
|
|
a5f01bbfb5 | ||
|
|
7e2285a48a | ||
|
|
3e964eeb96 | ||
|
|
aec9f902f0 | ||
|
|
764eb40cc9 | ||
|
|
95a5b23a38 | ||
|
|
5d833a9f5b | ||
|
|
3e51b2f6fc | ||
|
|
852105dc44 | ||
|
|
a7473ef379 | ||
|
|
f7f3792390 | ||
|
|
2d674a9336 | ||
|
|
24a38bc1cb | ||
|
|
82b1739dce | ||
|
|
fc6b272f41 | ||
|
|
c9baff669d | ||
|
|
72ee74b9be | ||
|
|
cc21808764 | ||
|
|
78021eace1 | ||
|
|
65d1a8a4ae | ||
|
|
187a8e08d5 | ||
|
|
c9a81c1f91 | ||
|
|
d580636e97 | ||
|
|
6ca264a151 | ||
|
|
aa505d588f | ||
|
|
96c6fa9202 | ||
|
|
25706eafac | ||
|
|
8aa9926839 | ||
|
|
ff3953efe1 | ||
|
|
ec5e5ae27a | ||
|
|
3cc4c8ba9b | ||
|
|
81672479af | ||
|
|
6a5170a15f | ||
|
|
1f4aaaeb5e | ||
|
|
79148c2945 | ||
|
|
5767201eaf | ||
|
|
221c342d50 | ||
|
|
b56e174322 | ||
|
|
5afa957915 | ||
|
|
af3b67b213 | ||
|
|
93d7b823b4 | ||
|
|
4a1255bc38 | ||
|
|
15976a0670 | ||
|
|
24ba78cb77 | ||
|
|
15f0b1f624 | ||
|
|
823311ea3b | ||
|
|
f67a1f7f64 | ||
|
|
e625eea4f9 | ||
|
|
f6297ebe73 | ||
|
|
372c9b9647 | ||
|
|
63c65b984a | ||
|
|
06c6ea654f | ||
|
|
ab8bfca794 | ||
|
|
386579a45a | ||
|
|
f1040fc470 | ||
|
|
585fd00624 | ||
|
|
e045e1f386 | ||
|
|
bf7883ebca | ||
|
|
a844fb1552 | ||
|
|
35022f987c | ||
|
|
8a240aca9e | ||
|
|
68e7661ca7 | ||
|
|
e88e3b2797 | ||
|
|
df68781fca | ||
|
|
f855f9daaf | ||
|
|
c5758f2090 | ||
|
|
3e9b4330a9 | ||
|
|
c072e13162 | ||
|
|
f2271428d4 | ||
|
|
cef379bb03 | ||
|
|
3e624cd9dc | ||
|
|
5297d4f5b2 | ||
|
|
b7c8f59fef | ||
|
|
13f77e9fd5 | ||
|
|
472189da15 | ||
|
|
e5ec81a354 | ||
|
|
4c3be42cdf | ||
|
|
24450a5ab7 | ||
|
|
df7be11b38 | ||
|
|
52f74c8010 | ||
|
|
ddf818dad5 | ||
|
|
e65caf3696 | ||
|
|
a0af318a8d | ||
|
|
c008b0ce10 | ||
|
|
258de82819 | ||
|
|
c243105e6b | ||
|
|
3bb4700f98 | ||
|
|
6bd4ca5644 | ||
|
|
a01cf5d782 | ||
|
|
7292a59593 | ||
|
|
765d8408e9 | ||
|
|
6da9cb4ba7 | ||
|
|
3780d7e449 | ||
|
|
a43f97c4e3 | ||
|
|
4ee59ab3ed | ||
|
|
0f283709c9 | ||
|
|
7a1f355fb5 | ||
|
|
030ade7590 | ||
|
|
1ddc789f5a | ||
|
|
3d115217e4 | ||
|
|
f31049c17f | ||
|
|
e6bec9b793 | ||
|
|
982032fd26 | ||
|
|
2499c305f9 | ||
|
|
f6c2faebfa | ||
|
|
98eb6d57df | ||
|
|
f60cd2593f | ||
|
|
2723ebba9a | ||
|
|
badda27f61 | ||
|
|
0d57270395 | ||
|
|
3e1d48fd12 | ||
|
|
83a420674b | ||
|
|
9f5c98a76a | ||
|
|
fc5b6b0328 | ||
|
|
4dda0095a1 | ||
|
|
bef2fd9722 | ||
|
|
ad401d1eaf | ||
|
|
a92311074b | ||
|
|
9ede75b1ce | ||
|
|
fe5f8d0074 | ||
|
|
0028ffac74 | ||
|
|
792b189317 | ||
|
|
43bac63e33 | ||
|
|
450b5f336d | ||
|
|
4eafdbdbe8 | ||
|
|
27fa604418 | ||
|
|
3c1feedfd1 | ||
|
|
2023d8eb5b | ||
|
|
a17fc9902e | ||
|
|
d6e8280cd8 | ||
|
|
cbefa47006 | ||
|
|
b4e20a898e | ||
|
|
6795dcc4fc | ||
|
|
fbf658fece | ||
|
|
593b315c70 | ||
|
|
56ed92922e | ||
|
|
9954876417 | ||
|
|
d96c3254e8 | ||
|
|
e1619ee151 | ||
|
|
e09048aaf5 | ||
|
|
a421016671 | ||
|
|
f1e7add2bf | ||
|
|
528864e460 | ||
|
|
1760dfc051 | ||
|
|
5d0404e3b3 | ||
|
|
18595cede8 | ||
|
|
e5efb6a798 | ||
|
|
f1e9f613d9 | ||
|
|
e7dc1e42cd | ||
|
|
d04f16f600 | ||
|
|
338b43cd6a | ||
|
|
394ffc1d97 | ||
|
|
0251fcd400 | ||
|
|
eaf4cb6bbb | ||
|
|
a85ee030ab | ||
|
|
d8caa679e0 | ||
|
|
f7bccf3724 | ||
|
|
38bbec3731 | ||
|
|
a128f03b30 | ||
|
|
f0e10d9351 | ||
|
|
ffa71b4afa | ||
|
|
9f355169f4 | ||
|
|
0e14946a20 | ||
|
|
c204501e3e | ||
|
|
194b80f974 | ||
|
|
ec61f0a3af | ||
|
|
f225f180e3 | ||
|
|
e74944eee5 | ||
|
|
eaa924b69e | ||
|
|
1d59e3e592 | ||
|
|
5113a3efff | ||
|
|
1594d0bf9c | ||
|
|
47057875e7 | ||
|
|
ef9b54cfe6 | ||
|
|
04d18f5587 | ||
|
|
73575f11a9 | ||
|
|
998bf6e088 | ||
|
|
34e43ceb0d | ||
|
|
7209df9e91 | ||
|
|
0e95d84892 | ||
|
|
965c2d8760 | ||
|
|
9fb01d49d6 | ||
|
|
e42b6f9e15 | ||
|
|
2ee48b4b4b | ||
|
|
f4031e8a9a | ||
|
|
85854b245e | ||
|
|
09eaf9f5b3 | ||
|
|
89d44e720b | ||
|
|
7224913d16 | ||
|
|
026b81e980 | ||
|
|
6571cd4073 | ||
|
|
67ab4f7718 | ||
|
|
f71145d20d | ||
|
|
407fbc9e13 | ||
|
|
5ffa0114c0 | ||
|
|
08084370fd | ||
|
|
70c6b773ca | ||
|
|
0d339e7ffb | ||
|
|
f0558da598 | ||
|
|
ec1aa3bc48 | ||
|
|
26c231f13b | ||
|
|
99c7b70d1d | ||
|
|
92f26b6202 | ||
|
|
0c6565c810 | ||
|
|
d8aeb3a72a | ||
|
|
2cf987f5c3 | ||
|
|
53fe81e752 | ||
|
|
e716c0f121 | ||
|
|
1048124120 | ||
|
|
84a12fbc21 | ||
|
|
1d97bb8b39 | ||
|
|
4ea629b9e1 | ||
|
|
ad200fbc8c | ||
|
|
b47d7a5fd4 | ||
|
|
5d897c82b9 | ||
|
|
4d0f1d7b28 | ||
|
|
2d2c8c2078 | ||
|
|
8bc04b98c7 | ||
|
|
71947dcb91 | ||
|
|
9c2a1d0de6 | ||
|
|
94165394ff | ||
|
|
3aa221aa1d | ||
|
|
a0df73b493 | ||
|
|
5bccc94598 | ||
|
|
a5f44604f7 | ||
|
|
8c6151bd63 | ||
|
|
d531a0a307 | ||
|
|
3639d2431f | ||
|
|
44cf581732 | ||
|
|
b65bde04e7 | ||
|
|
28a6eef3be | ||
|
|
69b35075f3 | ||
|
|
744054779f | ||
|
|
b19c5d51f8 | ||
|
|
22048b44db | ||
|
|
1488a9b34d | ||
|
|
d5b5bb3103 | ||
|
|
f8be752874 | ||
|
|
520047c3c4 | ||
|
|
ae2d48a366 | ||
|
|
472edf825e | ||
|
|
cc51bc6fdb | ||
|
|
55cb17c677 | ||
|
|
ee876e03b9 | ||
|
|
579ca216b4 | ||
|
|
a20d24ded2 | ||
|
|
1e2673fd98 | ||
|
|
16c88e493f | ||
|
|
1e570bf8e3 | ||
|
|
d9087a2d85 | ||
|
|
e08710a289 | ||
|
|
b03e991113 | ||
|
|
a51aa0d0e2 | ||
|
|
f82659c552 | ||
|
|
f653c86229 | ||
|
|
edcbd379d5 | ||
|
|
3d3ddf082b | ||
|
|
f6eb1f1d1f | ||
|
|
b47e023767 | ||
|
|
529f7bf358 | ||
|
|
9f037266ee | ||
|
|
c7896f1251 | ||
|
|
361306c131 | ||
|
|
f48f9341a5 | ||
|
|
d686298315 | ||
|
|
9f88b0370d | ||
|
|
2dbd71b77a | ||
|
|
483b1e3aa8 | ||
|
|
c8f3a1c057 | ||
|
|
ef914f7d83 | ||
|
|
0efc6c716a | ||
|
|
4f9f76cd62 | ||
|
|
8d95b8b338 | ||
|
|
7abd426438 | ||
|
|
8fab6e0463 | ||
|
|
c9aa3cc950 | ||
|
|
f9ad49c2a5 | ||
|
|
3eca0cc846 | ||
|
|
9f6baa127a | ||
|
|
f79e587cf3 | ||
|
|
1d2c070071 | ||
|
|
7828692f97 | ||
|
|
cacaa90c63 | ||
|
|
b23a2837db | ||
|
|
30430fbe30 | ||
|
|
50b08e7b85 | ||
|
|
43fed15129 | ||
|
|
bebb12fd0e | ||
|
|
b4692ce388 | ||
|
|
df96787019 | ||
|
|
d2a9c4a8e7 | ||
|
|
fbaf1517c3 | ||
|
|
57038a41fa | ||
|
|
521c57aca5 | ||
|
|
ede0532c58 | ||
|
|
547bbe4876 | ||
|
|
fe1484f3db | ||
|
|
d161561290 | ||
|
|
2cf4f4fb74 | ||
|
|
b6fd45163a | ||
|
|
4d76a85df1 | ||
|
|
d77540c8e4 | ||
|
|
784df1e4e3 | ||
|
|
6d82d7bcd5 | ||
|
|
2614421601 | ||
|
|
200e235dee | ||
|
|
0636ce1a7f | ||
|
|
6042b30c58 | ||
|
|
604d1eb21a | ||
|
|
14b43bcaee | ||
|
|
c79f3883cd | ||
|
|
df42cd3dbd | ||
|
|
01bbe8311a | ||
|
|
21928b97b0 | ||
|
|
e82e54df2c | ||
|
|
ecc6da6bf5 | ||
|
|
b35ff065ec | ||
|
|
187c355bf4 | ||
|
|
70516a04fe | ||
|
|
fcd65d2418 | ||
|
|
9073ff54c1 | ||
|
|
840d8e4733 | ||
|
|
5ad3803dac | ||
|
|
e04d02cc3a | ||
|
|
51153fb18c | ||
|
|
2268e3a32a | ||
|
|
8b88dc7f71 | ||
|
|
eecb3d5552 | ||
|
|
f629355b2f | ||
|
|
78274fe2b4 | ||
|
|
4744e27350 | ||
|
|
31cfc9aa5e | ||
|
|
a2ead9a486 | ||
|
|
db2b12fa91 | ||
|
|
cbf66c5f06 | ||
|
|
037984c80e | ||
|
|
9337c692bc | ||
|
|
c438bdb0d2 | ||
|
|
144787fe30 | ||
|
|
8eb81d482c | ||
|
|
0363998d0a | ||
|
|
806572d058 | ||
|
|
81ea383998 | ||
|
|
8442dc45b6 | ||
|
|
cfede42fc3 | ||
|
|
982d59afea | ||
|
|
ca024e3378 | ||
|
|
dbf8f6ba0e | ||
|
|
02805bd1fc | ||
|
|
965d14726a | ||
|
|
b0772db56a | ||
|
|
d695143329 | ||
|
|
59aa65c9b2 | ||
|
|
ffc5bf686d | ||
|
|
ec3c59518d | ||
|
|
cfe32ef5ba | ||
|
|
8be5a0fa94 | ||
|
|
bd4be59fb2 | ||
|
|
a6d3be9dd5 | ||
|
|
40913ad219 | ||
|
|
afd1fd8d41 | ||
|
|
38111b9622 | ||
|
|
41153ca4f2 | ||
|
|
3df2306981 | ||
|
|
022c5a802f | ||
|
|
832d85cbbc | ||
|
|
f72318243c | ||
|
|
a82d207b8d | ||
|
|
53e3244dba | ||
|
|
37427748d1 | ||
|
|
6e26f9b447 | ||
|
|
5bfbfbfc22 | ||
|
|
2c431e8ec4 | ||
|
|
8aeec251e3 | ||
|
|
f2d887d7d5 | ||
|
|
fe98cfee37 | ||
|
|
cad10a7f80 | ||
|
|
3734f4ae48 | ||
|
|
4b13b2e2bf | ||
|
|
f6a58604a0 | ||
|
|
65ceb56dd5 | ||
|
|
cce69be668 | ||
|
|
a54658c158 | ||
|
|
335bb5a35b | ||
|
|
982161e062 | ||
|
|
5a81678219 | ||
|
|
168952cea6 | ||
|
|
5dc1be1df8 | ||
|
|
cb08b0132f | ||
|
|
eb6e141adb | ||
|
|
c6c704fda6 | ||
|
|
eef7649e71 | ||
|
|
f8d50f60b3 | ||
|
|
476eb1b345 | ||
|
|
c32908cee3 | ||
|
|
dc1504121b | ||
|
|
c6a91ec992 | ||
|
|
689c3e1fcd | ||
|
|
1bd76bf981 | ||
|
|
2e7257a2e3 | ||
|
|
76b83902dc | ||
|
|
2de297334b | ||
|
|
b4664769dc | ||
|
|
7f217d7726 | ||
|
|
8a1a2f6ca4 | ||
|
|
bd66d2b59a | ||
|
|
9f630a1889 | ||
|
|
04ab68a4dd | ||
|
|
a7c9cbe1a2 | ||
|
|
97903dfc47 | ||
|
|
25ff71b0c7 | ||
|
|
324be70f80 | ||
|
|
b8a81fb885 | ||
|
|
0a35a80b93 | ||
|
|
c9143a63fe | ||
|
|
6625b74e90 | ||
|
|
bd3bf2ce41 | ||
|
|
f7cadaa843 | ||
|
|
e173f0b384 | ||
|
|
1e4a880125 | ||
|
|
d8f0e320c2 | ||
|
|
76c14799da | ||
|
|
ef5c6eb927 | ||
|
|
50bc2253d3 | ||
|
|
f5af0df821 | ||
|
|
b80078af39 | ||
|
|
990e945ffd | ||
|
|
8a5456e872 | ||
|
|
46a1738161 | ||
|
|
6c3b8e2c17 | ||
|
|
b48f5e847c | ||
|
|
bdb818997d | ||
|
|
fc87119069 | ||
|
|
078acb598b | ||
|
|
030b8a160f | ||
|
|
0e979d4829 | ||
|
|
66b750a08e | ||
|
|
31b6f4a3ae | ||
|
|
a5cde2dd18 | ||
|
|
2f6fe2ec79 | ||
|
|
e03c77cb5b | ||
|
|
b5c2fc1141 | ||
|
|
513d26f7b7 | ||
|
|
f1354b8af9 | ||
|
|
b2de89c5dc | ||
|
|
8d51acbbe9 | ||
|
|
ac3f1c6e87 | ||
|
|
61c4c83235 | ||
|
|
85f8bb16b2 | ||
|
|
6dd4370eaa | ||
|
|
0441230c51 | ||
|
|
26433e9c1f | ||
|
|
4dd68ca415 | ||
|
|
882c4c5a48 | ||
|
|
2b59885976 | ||
|
|
cb74b38247 | ||
|
|
e7da9734d8 | ||
|
|
0cec230406 | ||
|
|
f06905139f | ||
|
|
56bf6156d6 | ||
|
|
317191848a | ||
|
|
3d3f32aea3 | ||
|
|
b7b062ba79 | ||
|
|
4e25cf6edf | ||
|
|
5055abb615 | ||
|
|
abbb76fe93 | ||
|
|
478314a90e | ||
|
|
8cd592dfcb | ||
|
|
d8eb522e80 | ||
|
|
c3d81de59b | ||
|
|
02aa795514 | ||
|
|
0884261283 | ||
|
|
f94ceb13b8 | ||
|
|
4ce3a1b1bb | ||
|
|
888d53f270 | ||
|
|
dc824f1994 | ||
|
|
3a00cf9ecc | ||
|
|
803be5aa50 | ||
|
|
52c4c9484d | ||
|
|
7e60091c6b | ||
|
|
04febed782 | ||
|
|
2ff3fc73c8 | ||
|
|
d33d60774f | ||
|
|
f8208d682f | ||
|
|
0635530dda | ||
|
|
6e3cc00f48 | ||
|
|
25aa3c5a6e | ||
|
|
4d518aec86 | ||
|
|
74db72dd0b | ||
|
|
4fed3ddf16 | ||
|
|
b8a9dc2d3f | ||
|
|
2c0317213e | ||
|
|
5861184e87 | ||
|
|
6a2c23d125 | ||
|
|
af8c8ed9f6 | ||
|
|
b43d651511 | ||
|
|
66666c670a | ||
|
|
d37ad6aea0 | ||
|
|
a3f00efc99 | ||
|
|
8a0d2fc56f | ||
|
|
ffcc64bdea | ||
|
|
778f767bcc | ||
|
|
e12c1a8da1 | ||
|
|
8d021e4b8a | ||
|
|
95268ffed3 | ||
|
|
9eded206c9 | ||
|
|
b642ce5340 | ||
|
|
34769a1445 | ||
|
|
b7ddf6c1d8 | ||
|
|
cf38fc7389 | ||
|
|
ddd01008ff | ||
|
|
7a5f1ee46a | ||
|
|
379c34d2cf | ||
|
|
334cc28327 | ||
|
|
edea870c3c | ||
|
|
86191581d1 | ||
|
|
07f3e4f168 | ||
|
|
b6f0dcbda1 | ||
|
|
5e5f3d5e6c | ||
|
|
25b36ef124 | ||
|
|
f5a9e45923 | ||
|
|
1701d7adc8 | ||
|
|
d18bc9070d | ||
|
|
86bf239ede | ||
|
|
d433da4473 | ||
|
|
3249c257a0 | ||
|
|
a6b63f9192 | ||
|
|
b019d405d9 | ||
|
|
004fd0557d | ||
|
|
2efa546f26 | ||
|
|
0330b91987 | ||
|
|
e0a38de881 | ||
|
|
d06580986b | ||
|
|
03a44f0bf0 | ||
|
|
8b6e099892 | ||
|
|
34248c926c | ||
|
|
14c47b0ee4 | ||
|
|
edd3262efd | ||
|
|
9cb8447c90 | ||
|
|
cc227886c6 | ||
|
|
6d2a7942aa | ||
|
|
43dfbeec7b | ||
|
|
3335ed0ef4 | ||
|
|
b6e244f794 | ||
|
|
14669e3a86 | ||
|
|
552ecca6db | ||
|
|
9373aec650 | ||
|
|
30befb85e3 | ||
|
|
ed293f6d0c | ||
|
|
cd9592385d | ||
|
|
7e2bca4820 | ||
|
|
c4e48eaea1 | ||
|
|
3905f6695e | ||
|
|
2a3faa2df9 | ||
|
|
86de902e35 | ||
|
|
c1df00d2c6 | ||
|
|
75cade1216 | ||
|
|
a2c631c0a3 | ||
|
|
6bee336909 | ||
|
|
5c4bb360e3 | ||
|
|
969394f503 | ||
|
|
4977febf46 | ||
|
|
285e81c9e2 | ||
|
|
d663f5aeb0 | ||
|
|
370329ca3b | ||
|
|
5978983b30 | ||
|
|
753c82d0e6 | ||
|
|
9fcfa04ca9 | ||
|
|
9c463909d6 | ||
|
|
9d169a07ce | ||
|
|
dee929cded | ||
|
|
e0e2fb26c9 | ||
|
|
fcbcb2521c | ||
|
|
28f0b27fb9 | ||
|
|
0ddc098eb0 | ||
|
|
11c0e7d44e | ||
|
|
dfb08e9f1c | ||
|
|
e539fa9980 | ||
|
|
e76921a58e | ||
|
|
96d22bd7d6 | ||
|
|
927d9273c4 | ||
|
|
56a4cffd30 | ||
|
|
682a2a9d1a | ||
|
|
0b1296aa4f | ||
|
|
fb67e4aa36 | ||
|
|
4cfd24d179 | ||
|
|
81dcf7c90a | ||
|
|
075de7be45 | ||
|
|
7b2d3d995c | ||
|
|
d20d307d69 | ||
|
|
12018c91ea | ||
|
|
68910ba4a5 | ||
|
|
a74eae77ac | ||
|
|
ce18bc4e97 | ||
|
|
567cc5d814 | ||
|
|
56ac6c7e76 | ||
|
|
59feafc6c7 | ||
|
|
5ccc88a742 | ||
|
|
de247618e7 | ||
|
|
c6c6a08850 | ||
|
|
204db8a134 | ||
|
|
96b8d60a9b | ||
|
|
4951a1199d | ||
|
|
76a80dff18 | ||
|
|
9ea901191e | ||
|
|
3bdc01c9a5 | ||
|
|
e29d0b8b85 | ||
|
|
65fe8ae8a5 | ||
|
|
4b691cccbe | ||
|
|
935b37ee8b | ||
|
|
fe266c6c69 | ||
|
|
c6655c4115 | ||
|
|
65bb31a405 | ||
|
|
cc78087b83 | ||
|
|
0fc2080294 | ||
|
|
957bc5c92f | ||
|
|
418febfc44 | ||
|
|
6aafdc5c04 | ||
|
|
a178ca6b5c | ||
|
|
9d5e3ed740 | ||
|
|
415d268051 | ||
|
|
43a8f6133d | ||
|
|
437cecb967 | ||
|
|
61ad49e7d3 | ||
|
|
2cf328ad0a | ||
|
|
dfbb922ddb | ||
|
|
fe51c4ab3c | ||
|
|
e684ee786a | ||
|
|
c416b1de5a | ||
|
|
e4d85a77aa | ||
|
|
5ebad51b84 | ||
|
|
6334ffdbb0 | ||
|
|
4cbc0c79ac | ||
|
|
ae8b82e395 | ||
|
|
38164332e1 | ||
|
|
92dc0adca2 | ||
|
|
7f347723d8 | ||
|
|
a2a74022e2 | ||
|
|
ba7fa583bf | ||
|
|
5f282199c8 | ||
|
|
74132a10f3 | ||
|
|
4f10ae2b86 | ||
|
|
4fcd5409e0 | ||
|
|
a29cf54c02 | ||
|
|
c254ac796f | ||
|
|
1b91369455 | ||
|
|
ccaa9bee2e | ||
|
|
6769292c0d | ||
|
|
da55af4763 | ||
|
|
39339512e2 | ||
|
|
c96425c364 | ||
|
|
1fcf2d2f4a | ||
|
|
3ea5d2e28f | ||
|
|
7fffc9f11f | ||
|
|
e38fcc8608 | ||
|
|
b93aaba84f | ||
|
|
cdfeb278ab | ||
|
|
85bb744dfe | ||
|
|
4401925c82 | ||
|
|
59ee80764e | ||
|
|
8e1ffb1859 | ||
|
|
e7cbf8fd30 | ||
|
|
b3d838e5d0 | ||
|
|
acfab3733f | ||
|
|
2e7b661681 | ||
|
|
027dbc9f85 | ||
|
|
e263867f6b | ||
|
|
0de93fa1da | ||
|
|
a996d703e9 | ||
|
|
a75c3afe68 | ||
|
|
1cc57edaf5 | ||
|
|
ce32e32f2a | ||
|
|
a72cae66dc | ||
|
|
eead773204 | ||
|
|
d0096de764 | ||
|
|
426b68b20a | ||
|
|
1b7fd0fa3e | ||
|
|
cd7ff122a4 | ||
|
|
cf5229190d | ||
|
|
345f9fa77e | ||
|
|
62073c3048 | ||
|
|
54f1a77fb6 | ||
|
|
09ee7234b6 | ||
|
|
f65b874bda | ||
|
|
5d55ceb75c | ||
|
|
fa20c18525 | ||
|
|
5fae9d9a20 | ||
|
|
482c573d9e | ||
|
|
7835e1465f | ||
|
|
95023eb325 | ||
|
|
39f87ab2ab | ||
|
|
dcba56cafa | ||
|
|
5e90d26658 | ||
|
|
14599cd760 | ||
|
|
e74167bd6a | ||
|
|
70cb8a686f | ||
|
|
bb61d657c1 | ||
|
|
5112bfc8cc | ||
|
|
828feae4f1 | ||
|
|
4d63882615 | ||
|
|
43f2185221 | ||
|
|
480d772f22 | ||
|
|
7ae5d9d11d | ||
|
|
ef8b121e2c | ||
|
|
76bba2a1fc | ||
|
|
45abddb069 | ||
|
|
f74775ba1c | ||
|
|
1939a4f96e | ||
|
|
452e46dbfc | ||
|
|
7eb8797b81 | ||
|
|
ed919de0a7 | ||
|
|
c5a6599080 | ||
|
|
a9e8ca4ab4 | ||
|
|
a1abd64aff | ||
|
|
2799897ad8 | ||
|
|
191f6945ac | ||
|
|
0be1785aea | ||
|
|
bf7487ab18 | ||
|
|
4e05cb4023 | ||
|
|
dd03dea22e | ||
|
|
0ec40e08d5 | ||
|
|
d1b7efd578 | ||
|
|
d00f97a7db | ||
|
|
7e800bfffc | ||
|
|
f6783bee07 | ||
|
|
760dcc6a65 | ||
|
|
2e1b9171bf | ||
|
|
ef6900eb79 | ||
|
|
3fa9d4d717 | ||
|
|
ecf9496d17 | ||
|
|
50acb19719 | ||
|
|
745af91663 | ||
|
|
87af1cba3c | ||
|
|
ce335a0d5c | ||
|
|
01f896d38e | ||
|
|
9af39cbe31 | ||
|
|
1133b5e07a | ||
|
|
470ee2d214 | ||
|
|
b0692d0311 | ||
|
|
9549014694 | ||
|
|
e696ade15d | ||
|
|
03cec38834 | ||
|
|
03b5494ca1 | ||
|
|
028a79b8a1 | ||
|
|
7c3a7bd1f0 | ||
|
|
85cda6ae16 | ||
|
|
f60995adb4 | ||
|
|
4637c5c242 | ||
|
|
624c70d763 | ||
|
|
bfdc0eba0b | ||
|
|
4f6eb791b4 | ||
|
|
b01885338b | ||
|
|
44cef0d563 | ||
|
|
d73bbd57ee | ||
|
|
5259da1043 | ||
|
|
c2801d0938 | ||
|
|
15a5dc5b89 | ||
|
|
e2d92b5adf | ||
|
|
6f00044317 | ||
|
|
d3be5a89e5 | ||
|
|
f8342dd5f2 | ||
|
|
54ba7acba1 | ||
|
|
2cd4a8065a | ||
|
|
7e8228cf5a | ||
|
|
d239b550ce | ||
|
|
c32bda6bb9 | ||
|
|
61bc3bbc0e | ||
|
|
450f5d6694 | ||
|
|
ffcfc0e432 | ||
|
|
c44e3cb4e5 | ||
|
|
4c5da0157f | ||
|
|
25b45979f2 | ||
|
|
77270329ba | ||
|
|
c1609dd497 | ||
|
|
88b3e00515 | ||
|
|
0c3a8dea88 | ||
|
|
e0f9ecc6a4 | ||
|
|
54ffd5447d | ||
|
|
e0e9221e23 | ||
|
|
77a57d5eaf | ||
|
|
d23159a69c | ||
|
|
9e103df45e | ||
|
|
9fc3f04520 | ||
|
|
ae816bb6aa | ||
|
|
db9b9f396e | ||
|
|
08769b7f8a | ||
|
|
f07aaccd06 | ||
|
|
7c14b3688c | ||
|
|
69063507d4 | ||
|
|
cb28815405 | ||
|
|
76f5fa549c | ||
|
|
662ed0a13f | ||
|
|
75e8f476e7 | ||
|
|
a025cc17f0 | ||
|
|
cf5891424e | ||
|
|
66426469d0 | ||
|
|
9383421c1c | ||
|
|
5f6a71b38a | ||
|
|
e3e5128cf2 | ||
|
|
6d385c7111 | ||
|
|
16457c869d | ||
|
|
d63fdc1198 | ||
|
|
ca8d4e8933 | ||
|
|
6d82a0470e | ||
|
|
e41e5b78c6 | ||
|
|
baa5c11363 | ||
|
|
380b8b516e | ||
|
|
86880b8ff7 | ||
|
|
59f288ce63 | ||
|
|
dffb93feaf | ||
|
|
f9708da223 | ||
|
|
0024702fe7 | ||
|
|
881eda695e | ||
|
|
e6024e0030 | ||
|
|
ceebd9ac76 | ||
|
|
3f590c7840 | ||
|
|
f063d0e89f | ||
|
|
5f06f0c367 | ||
|
|
1e2f60993f | ||
|
|
ed42e64cfc | ||
|
|
2c0b5281f5 | ||
|
|
f4ca564ba6 | ||
|
|
ab55a117e2 | ||
|
|
a3381af1de | ||
|
|
82dfee9960 | ||
|
|
1073b9f93a | ||
|
|
8cf621ffd9 | ||
|
|
2e0c003435 | ||
|
|
1f735f82cc | ||
|
|
c70f6415f8 | ||
|
|
07aeaae356 | ||
|
|
3378a54f15 | ||
|
|
641d84a4ec | ||
|
|
581dd40e73 | ||
|
|
a76dc27801 | ||
|
|
bc313467bd | ||
|
|
d619fb5e1c | ||
|
|
d670e21998 | ||
|
|
ea8e543bb8 | ||
|
|
e7b8fe03e8 | ||
|
|
fb216d1a7c | ||
|
|
566dab2ac1 | ||
|
|
4a049ce556 | ||
|
|
e9519a397f | ||
|
|
2ae52e649b | ||
|
|
57258a2c64 | ||
|
|
1610a566c6 | ||
|
|
7ef8ff9a2e | ||
|
|
e59f58f854 | ||
|
|
4073c8159c | ||
|
|
02a0c05bf7 | ||
|
|
016c3cfed2 | ||
|
|
5e802b113a | ||
|
|
f116ca115c | ||
|
|
a12db35efa | ||
|
|
48205bb064 | ||
|
|
ac965cd828 | ||
|
|
e22ad50953 | ||
|
|
d128791b84 | ||
|
|
1afa0cb674 | ||
|
|
d6770cf001 | ||
|
|
bcf94bba99 | ||
|
|
de0b239907 | ||
|
|
459bfe02f9 | ||
|
|
cee3b8966c | ||
|
|
40e27f1bf0 | ||
|
|
31f1c02dda | ||
|
|
0c7112fcff | ||
|
|
588c362362 | ||
|
|
bdf96a5d25 | ||
|
|
5ce355f6c0 | ||
|
|
3f02ed32a7 | ||
|
|
e23f46e86f | ||
|
|
6b592c1487 | ||
|
|
e7b877427b | ||
|
|
f295392724 | ||
|
|
814fa9a58f | ||
|
|
3236e662d4 | ||
|
|
8ec1562355 | ||
|
|
37ee12b0f3 | ||
|
|
c60dbcc0aa | ||
|
|
21b691152c | ||
|
|
fefab84fff | ||
|
|
1ddaffda88 | ||
|
|
6d2a79432b | ||
|
|
031bf1d0fa | ||
|
|
1eb8e9217f | ||
|
|
9a716018be | ||
|
|
a9fa6d265d | ||
|
|
d765a3e71b | ||
|
|
6a3c2215bb | ||
|
|
e51260e4fe | ||
|
|
d727c5ae7b | ||
|
|
aaced3f990 | ||
|
|
6c706227f5 | ||
|
|
949a077a58 | ||
|
|
0c71fb672f | ||
|
|
e1ed2a207b | ||
|
|
a6c418ee43 | ||
|
|
b6632d616f | ||
|
|
626d9eba9c | ||
|
|
6f09acf855 | ||
|
|
5a10d93d29 | ||
|
|
7b07f4e83f | ||
|
|
a8eecab079 | ||
|
|
d4bb431621 | ||
|
|
3cd98a6094 | ||
|
|
7641c73dec | ||
|
|
40ee8c1814 | ||
|
|
a4c235ed3a | ||
|
|
82eea29797 | ||
|
|
09e0549d51 | ||
|
|
c029f4c1da | ||
|
|
4a855e6beb | ||
|
|
8570b544e9 | ||
|
|
b1b678427e | ||
|
|
9e7f495589 | ||
|
|
f47e023498 | ||
|
|
00d89f5170 | ||
|
|
ceaf49d735 | ||
|
|
8e448cadf9 | ||
|
|
4456861f7e | ||
|
|
2560da6be2 | ||
|
|
34b22d6049 | ||
|
|
e45ffb5d1f | ||
|
|
8a29368bf1 | ||
|
|
54703a719f | ||
|
|
8e702c3d0f | ||
|
|
7893469fca | ||
|
|
4765889b2e | ||
|
|
b038e0aac9 | ||
|
|
d8bf119dd2 | ||
|
|
d083dd4c39 | ||
|
|
b52294d00b | ||
|
|
802e7e1c2e | ||
|
|
be1762caff | ||
|
|
6a2a1ea75f | ||
|
|
565f6fb675 | ||
|
|
f2c6909468 | ||
|
|
0e6a94b329 | ||
|
|
cae57c60a1 | ||
|
|
657d68cfff | ||
|
|
20636ce09f | ||
|
|
168fa7e571 | ||
|
|
55468fb9b3 | ||
|
|
7ed1de2f1d | ||
|
|
c30c65c1b2 | ||
|
|
2627d8a345 | ||
|
|
5fe5c7d0b1 | ||
|
|
0d8c1d7fa1 | ||
|
|
0216d1cda3 | ||
|
|
8b2896f9fa | ||
|
|
e2c5015713 | ||
|
|
e639630da4 | ||
|
|
ce4359ea85 | ||
|
|
9b30d4793d | ||
|
|
dd483f4f42 | ||
|
|
543f39cb52 | ||
|
|
4826b9b0d5 | ||
|
|
683db19a7d | ||
|
|
1021371daf | ||
|
|
6a0b3ccf4e | ||
|
|
b938443e2f | ||
|
|
7db18ccd13 | ||
|
|
c3b0d83ddf | ||
|
|
785a6cd21c | ||
|
|
6f22336784 | ||
|
|
3da7836035 | ||
|
|
23b28c0ab5 | ||
|
|
7573ac58f2 | ||
|
|
6787b8ccee | ||
|
|
00dd4db5d2 | ||
|
|
7417574cdb | ||
|
|
f7c05c5514 | ||
|
|
29b10e65b1 | ||
|
|
982e78234c | ||
|
|
c09a9932b8 | ||
|
|
7aa622cd14 | ||
|
|
37b73a235a | ||
|
|
beb015706b | ||
|
|
6e43debe67 | ||
|
|
09a19bb1ba | ||
|
|
0279111026 | ||
|
|
f58c3ccf44 | ||
|
|
3b403b32fc | ||
|
|
e2cdb570ae | ||
|
|
9a5393ac7e | ||
|
|
da5f8554a4 | ||
|
|
ba902275d5 | ||
|
|
3909d7edfc | ||
|
|
2f95d699dc | ||
|
|
d04de5fdd0 | ||
|
|
f584c502a6 | ||
|
|
3cf14ae1ae | ||
|
|
7c18802966 | ||
|
|
424ecce632 | ||
|
|
6019e1053c | ||
|
|
aad6898fe4 | ||
|
|
44110df25a | ||
|
|
c99014d5ef | ||
|
|
a7ee1cd7f6 | ||
|
|
c3f7567a65 | ||
|
|
ba7457ee00 | ||
|
|
7b069d5ea7 | ||
|
|
c34130f705 | ||
|
|
cc8f077e9f | ||
|
|
ccacb45c52 | ||
|
|
1325cddee9 | ||
|
|
80df37f475 | ||
|
|
979c4a9304 | ||
|
|
4257798f8a | ||
|
|
12b9736228 | ||
|
|
64fcb3cce7 | ||
|
|
336eb5b04c | ||
|
|
f024bf0dcd | ||
|
|
fd786adcf5 | ||
|
|
0743486127 | ||
|
|
bf512ee2e0 | ||
|
|
b99dc517d6 | ||
|
|
6a168568a5 | ||
|
|
dbad9f4661 | ||
|
|
7eb40c488c | ||
|
|
2a9b703903 | ||
|
|
65e0dd452c | ||
|
|
5d7cdc38d0 | ||
|
|
e1f68dc6a0 | ||
|
|
06ae51be51 | ||
|
|
8a6ecb19b9 | ||
|
|
1254925f1e | ||
|
|
a6c34848eb | ||
|
|
182660d864 | ||
|
|
3fc621ee45 | ||
|
|
8234b92d85 | ||
|
|
6822764f25 | ||
|
|
0d837ebf2a | ||
|
|
8f5d36896d | ||
|
|
e365864bbc | ||
|
|
df60555037 | ||
|
|
6730280c5b | ||
|
|
fb59f4c967 | ||
|
|
77e2cadd88 | ||
|
|
a2cb4dbc82 | ||
|
|
36e30eb096 | ||
|
|
03f405bc04 | ||
|
|
4abb498d79 | ||
|
|
ef85627e93 | ||
|
|
486ec65745 | ||
|
|
dd26a551c2 | ||
|
|
93724aa28f | ||
|
|
4c2a28c64b | ||
|
|
2a72df9cf0 | ||
|
|
6600691ff1 | ||
|
|
d125a47061 | ||
|
|
8daaa46478 | ||
|
|
0a9d5422c6 | ||
|
|
02c1bd6bb6 | ||
|
|
1cd1da13da | ||
|
|
ea8ca78af0 | ||
|
|
dc4fc03e4b | ||
|
|
76353076c0 | ||
|
|
829c258554 | ||
|
|
5dcd565dab | ||
|
|
7838d85351 | ||
|
|
db59288d79 | ||
|
|
82794b4b90 | ||
|
|
b4fbdbbe1e | ||
|
|
9853774351 | ||
|
|
79471f365e | ||
|
|
98b108284c | ||
|
|
8ee30d09a4 | ||
|
|
01583ae4ad | ||
|
|
249f8b5bfc | ||
|
|
561d7f4d7c | ||
|
|
4ad453445a | ||
|
|
e620bb01da | ||
|
|
7931bf0420 | ||
|
|
c174aea07d | ||
|
|
85323dcbb9 | ||
|
|
8bc650d9dc | ||
|
|
ea216a650e | ||
|
|
a16ebfd56a | ||
|
|
2aad23443e | ||
|
|
8a5354a9a5 | ||
|
|
dbf381f7fb | ||
|
|
1080ce600a | ||
|
|
0dd37f13c5 | ||
|
|
6981a0bfe7 | ||
|
|
e232c168d8 | ||
|
|
66259efc14 | ||
|
|
dc36969ae1 | ||
|
|
ec88eb91d6 | ||
|
|
9a54908fd7 | ||
|
|
5b2cc025f4 | ||
|
|
1489c9b1af | ||
|
|
86d404513f | ||
|
|
adcccd187d | ||
|
|
956af8f26e | ||
|
|
d60b71e8e8 | ||
|
|
d1ef3951f3 | ||
|
|
e27770e10c | ||
|
|
0b70674329 | ||
|
|
b991617f19 | ||
|
|
9ebc51100b | ||
|
|
0874654c78 | ||
|
|
d6d53f60b2 | ||
|
|
e94f4cce47 | ||
|
|
07fa164e16 | ||
|
|
9e7a3bf242 | ||
|
|
0b53ca70b6 | ||
|
|
c9f1e3d1f4 | ||
|
|
c97e1a76f3 | ||
|
|
94f4923039 | ||
|
|
e86a6d390d | ||
|
|
4af5e99124 | ||
|
|
7bfacf2f21 | ||
|
|
e43df9e342 | ||
|
|
52eed26853 | ||
|
|
4b3124ae85 | ||
|
|
3a71443953 | ||
|
|
5e6c3b035d | ||
|
|
e5e5c8952d | ||
|
|
19f3a804e7 | ||
|
|
519d339233 | ||
|
|
1e64e4939f | ||
|
|
da22a02130 | ||
|
|
432196aef8 | ||
|
|
46265a9d3e | ||
|
|
1953052994 | ||
|
|
0afae1c7ce | ||
|
|
e7b1b342bf | ||
|
|
f709fa439b | ||
|
|
510ef3af84 | ||
|
|
bb08c7632a | ||
|
|
200c7fd4b2 | ||
|
|
4f7654715f | ||
|
|
7fc4fb0131 | ||
|
|
e103615be2 | ||
|
|
d486e8f607 | ||
|
|
66fe35eb3e | ||
|
|
29cfd6c80b | ||
|
|
fe17f4e86b | ||
|
|
6927f09e1c | ||
|
|
96d1d01572 | ||
|
|
b151c3b1fe | ||
|
|
28eb2436c8 | ||
|
|
4877bb510e | ||
|
|
2aee7e16ac | ||
|
|
52881470ee | ||
|
|
77e607a3a7 | ||
|
|
1e2a167fe6 | ||
|
|
2d7fe72bbb | ||
|
|
661f9a3451 | ||
|
|
8466db967e | ||
|
|
486a1b9324 | ||
|
|
4fea3ea6f1 | ||
|
|
529349c66d | ||
|
|
80bafe6d36 | ||
|
|
7838ab5010 | ||
|
|
5078c98abe | ||
|
|
4c4c8b7239 | ||
|
|
b177e9133e | ||
|
|
9fe4f5ff25 | ||
|
|
0ddd68f7e6 | ||
|
|
533318113b | ||
|
|
a5e33c7d6f | ||
|
|
dfec8467b9 | ||
|
|
44159d0598 | ||
|
|
fe9cdf741f | ||
|
|
3d88d27810 | ||
|
|
d8e8e14e0b | ||
|
|
fa79f00803 | ||
|
|
b20ff981c4 | ||
|
|
535ad9d1fb | ||
|
|
a382492bf3 | ||
|
|
8be12be16a | ||
|
|
6fecffaab5 | ||
|
|
6767fdaaed | ||
|
|
fcbcc89bb2 | ||
|
|
38ba0d7a62 | ||
|
|
10b5dca0f7 | ||
|
|
b60d5e90a5 | ||
|
|
674bdee804 | ||
|
|
62d0c4e7c1 | ||
|
|
0b440844bd | ||
|
|
724b87a6f8 | ||
|
|
5242d8fb57 | ||
|
|
1a0d82a3dd | ||
|
|
ebaee770ac | ||
|
|
ee89f47453 | ||
|
|
58dad7025b | ||
|
|
5d72984a01 | ||
|
|
f90fd5b34b | ||
|
|
9d49507f80 | ||
|
|
e38e9e3f5e | ||
|
|
6f590cd1c5 | ||
|
|
41f90cbe50 | ||
|
|
7d4f1101bc | ||
|
|
8ce58f1f42 | ||
|
|
2826a877af | ||
|
|
53570e16c3 | ||
|
|
94cce410aa | ||
|
|
06e07df001 | ||
|
|
9edf1b206b | ||
|
|
440a4cc247 | ||
|
|
b282107fa9 | ||
|
|
0ce274f02b | ||
|
|
c0a82e271e | ||
|
|
ebaed7d51f | ||
|
|
172d85b9c9 | ||
|
|
81c6e7fb69 | ||
|
|
f63c30d89b | ||
|
|
1cedde0681 | ||
|
|
c965ed2db4 | ||
|
|
52889453c1 | ||
|
|
534b0525a5 | ||
|
|
051501eea6 | ||
|
|
71df3c4329 | ||
|
|
6ae5caf008 | ||
|
|
b9d7fda0e1 | ||
|
|
e6752f1a6c | ||
|
|
46bc0593ac | ||
|
|
76c4613abc | ||
|
|
7238aa0cf0 | ||
|
|
95d2dabc25 | ||
|
|
07caee2662 | ||
|
|
b43f4df540 | ||
|
|
a2b5bb004d | ||
|
|
444061de67 | ||
|
|
ee1fa07f3d | ||
|
|
cf3bc080c1 | ||
|
|
2ca68bb82b | ||
|
|
e2d86d001a | ||
|
|
8082a0946e | ||
|
|
79799c954f | ||
|
|
1b434f1ba9 | ||
|
|
3003cfdf9e | ||
|
|
7c6eb15280 | ||
|
|
ab9b7eee0a | ||
|
|
3f003263d2 | ||
|
|
b9cc6f7ca9 | ||
|
|
5b928ffade | ||
|
|
ae202ef02e | ||
|
|
7f7a91b75f | ||
|
|
770b796e52 | ||
|
|
b2415f4414 | ||
|
|
2eea164db7 | ||
|
|
7a8a33b6cd | ||
|
|
325d491360 | ||
|
|
91f4d45f93 | ||
|
|
c7e72136b2 | ||
|
|
8844cd6b6c | ||
|
|
ccb0ab7348 | ||
|
|
5023964844 | ||
|
|
4af673c3f8 | ||
|
|
5dc6f24085 | ||
|
|
e53fdd1c35 | ||
|
|
040f3d2ffc | ||
|
|
d884af8077 | ||
|
|
a4f88b8a49 | ||
|
|
3d7c58ca1e | ||
|
|
ce51f3be11 | ||
|
|
4cba811f6c | ||
|
|
85de3d281a | ||
|
|
3817c2f138 | ||
|
|
13af399f65 | ||
|
|
2cbcbd7532 | ||
|
|
c2c3108882 | ||
|
|
cd7ee4913d | ||
|
|
856285aa90 | ||
|
|
0e08f1de8d | ||
|
|
161da365e2 | ||
|
|
dbcc4e94c5 | ||
|
|
d118a5990a | ||
|
|
498a131239 | ||
|
|
9840eaade6 | ||
|
|
f8fcc56ed9 | ||
|
|
1c290032a4 | ||
|
|
1fbe575888 | ||
|
|
6545b9d792 | ||
|
|
67bde9f067 | ||
|
|
921f4b5b52 | ||
|
|
7853bbfa7d | ||
|
|
c79517b4d9 | ||
|
|
5e1898fa5a | ||
|
|
11a2ab6228 | ||
|
|
c56e44a63a | ||
|
|
3871942d13 | ||
|
|
07ecac56da | ||
|
|
5ce6642fed | ||
|
|
fb4ba86f44 | ||
|
|
353ef76019 | ||
|
|
44b013967a | ||
|
|
67c0c1847b | ||
|
|
544de3c87f | ||
|
|
1be365c500 | ||
|
|
13f91fc78d | ||
|
|
256a816c9f | ||
|
|
ee6fa3240d | ||
|
|
9b79345001 | ||
|
|
51c977d1ff | ||
|
|
577b1fc833 | ||
|
|
6ef8e5b4d3 | ||
|
|
9bfff3746f | ||
|
|
b2559a8895 | ||
|
|
51b28ba9c4 | ||
|
|
c8584872be | ||
|
|
387bf82e30 | ||
|
|
11adeb7c01 | ||
|
|
3afca618da | ||
|
|
2c1f37d45c | ||
|
|
fa7ada31d0 | ||
|
|
54b01e99d3 | ||
|
|
75bb595c6c | ||
|
|
490f98aa6c | ||
|
|
e6b637b067 | ||
|
|
453fd25152 | ||
|
|
228694e5a9 | ||
|
|
c54f73a2ff | ||
|
|
d9416c0df5 | ||
|
|
771c215192 | ||
|
|
0a70f452bb | ||
|
|
bfd602f849 | ||
|
|
8541b35ed7 | ||
|
|
57a49c6727 | ||
|
|
96fb9c8dd7 | ||
|
|
6daac70e55 | ||
|
|
d4916e36d0 | ||
|
|
1b4a9d8ad8 | ||
|
|
6bde7a17be | ||
|
|
9d1015b646 | ||
|
|
2ca35ac7ee | ||
|
|
4bacdf2811 | ||
|
|
94388aaffa | ||
|
|
a8a949d9e5 | ||
|
|
1b29b0f7cf | ||
|
|
ecefdfc280 | ||
|
|
b2dff45423 | ||
|
|
1f9de919e0 | ||
|
|
0437ced41d | ||
|
|
90ccb5efe7 | ||
|
|
647bef8ca6 | ||
|
|
2d9f5858bc | ||
|
|
5b11bb734a | ||
|
|
430bfefda3 | ||
|
|
3636d59e38 | ||
|
|
9346982f22 | ||
|
|
48d2199e94 | ||
|
|
f8bc899063 | ||
|
|
cc02093d69 | ||
|
|
d95d2f3b44 | ||
|
|
a79f11d254 | ||
|
|
89fb4162e3 | ||
|
|
dab1a1dc99 | ||
|
|
4c77612245 | ||
|
|
5acc508cae | ||
|
|
f844e7dc8f | ||
|
|
620d031534 | ||
|
|
e4e3b4c821 | ||
|
|
094d9cae63 | ||
|
|
eaa62cd541 | ||
|
|
ae24b1146b | ||
|
|
0a325a917d | ||
|
|
7254c24a76 | ||
|
|
55309e7800 | ||
|
|
fa5cd2bf50 | ||
|
|
1ad309fbc6 | ||
|
|
f3af7bd66b | ||
|
|
5fce1ef0c9 | ||
|
|
85ab21a6e0 | ||
|
|
1de37e808c | ||
|
|
b2ff4317f1 | ||
|
|
690396a5b1 | ||
|
|
5bc545ed79 | ||
|
|
644c5241d2 | ||
|
|
937f678ef6 | ||
|
|
5b158ad3a9 | ||
|
|
afbeadb9da | ||
|
|
8a4745694b | ||
|
|
ebfdb219c6 | ||
|
|
6438b4fedf | ||
|
|
eebc929abb | ||
|
|
0e4fee3d5a | ||
|
|
3478b3146f | ||
|
|
cfa5a0da6d | ||
|
|
c033d96e49 | ||
|
|
59a232ddcd | ||
|
|
01816f2bb1 | ||
|
|
0d86614794 | ||
|
|
8821f4109e | ||
|
|
783721b34b | ||
|
|
f6c76abe8e | ||
|
|
41bad60c82 | ||
|
|
9c7f67a94d | ||
|
|
26df1299cb | ||
|
|
1f03abefad | ||
|
|
f2db681002 | ||
|
|
5bb59e428f | ||
|
|
a1ef436531 | ||
|
|
c865ecbf32 | ||
|
|
2576bec68f | ||
|
|
7c1796860f | ||
|
|
d350ae6966 | ||
|
|
9b3d462b68 | ||
|
|
5150d44a7e | ||
|
|
30cd3616e9 | ||
|
|
609d00c467 | ||
|
|
27e15000d0 | ||
|
|
029f2691f8 | ||
|
|
0493f9c849 | ||
|
|
3eccdb5289 | ||
|
|
17cb0e3fe8 | ||
|
|
cdc8d9c403 | ||
|
|
719cc30626 | ||
|
|
0ca3a5ee84 | ||
|
|
62f8a2b63c | ||
|
|
a0342347e9 | ||
|
|
076bab08c1 | ||
|
|
578c24a473 | ||
|
|
c492fe12c0 | ||
|
|
e0c1d4e79f | ||
|
|
0b2ddf8f69 | ||
|
|
80a18b8bef | ||
|
|
3a4d0c9c14 | ||
|
|
3122e93350 | ||
|
|
21a7b84486 | ||
|
|
4b0a61c586 | ||
|
|
cc97412c32 | ||
|
|
aceaf13b44 | ||
|
|
d7cc3f2ef5 | ||
|
|
db3641a2ea | ||
|
|
8e102a2487 | ||
|
|
4c2d8f5816 | ||
|
|
d6351b36b8 | ||
|
|
d752c51b90 | ||
|
|
f007e84e8e | ||
|
|
9c111e59c9 | ||
|
|
4754226a1a | ||
|
|
606852a4a6 | ||
|
|
8220945b2c | ||
|
|
6292ee9d18 | ||
|
|
dd2c34a82b | ||
|
|
1246703bb4 | ||
|
|
d2a535855b | ||
|
|
ddd109bdf9 | ||
|
|
3f62b2637c | ||
|
|
08852c50b9 | ||
|
|
bb7645459e | ||
|
|
e5c6cb2a8c | ||
|
|
3272ed884f | ||
|
|
3ad4f77cef | ||
|
|
e001359311 | ||
|
|
dcdca91d91 | ||
|
|
6baa63110e | ||
|
|
93ad8c19bb | ||
|
|
2926b5b35d | ||
|
|
76514565c0 | ||
|
|
bd324b9d94 | ||
|
|
a10a1416c1 | ||
|
|
e13918d24a | ||
|
|
466f36159d | ||
|
|
2245f3723b | ||
|
|
dde97b301f | ||
|
|
6f9d69c95a | ||
|
|
adde3a7a27 | ||
|
|
ed61aae141 | ||
|
|
26257a5cf4 | ||
|
|
0e1d2c3efa | ||
|
|
b8a2f174d7 | ||
|
|
e9ef52b460 | ||
|
|
3a4989cae2 | ||
|
|
ecee64bffa | ||
|
|
540eb97162 | ||
|
|
013986a8ad | ||
|
|
a0af4fa5ea | ||
|
|
5cae1fe179 | ||
|
|
91bb250aed | ||
|
|
40d69001ac | ||
|
|
06f91665df | ||
|
|
8442b51e20 | ||
|
|
e9a9c8bb7e | ||
|
|
847b618b4c | ||
|
|
fd2312e03d | ||
|
|
5f70a1bd06 | ||
|
|
876bd1a2be | ||
|
|
87122afcda | ||
|
|
78cd3b9824 | ||
|
|
185468f57d | ||
|
|
45b5a4e142 | ||
|
|
e4ebd474ec | ||
|
|
ae5ec68355 | ||
|
|
95c1941ce5 | ||
|
|
59a083d8d1 | ||
|
|
be217dc4d4 | ||
|
|
e8e4b28dfa | ||
|
|
1c894acb42 | ||
|
|
7d86d90d11 | ||
|
|
532b8c7a43 | ||
|
|
22ecea456b | ||
|
|
5f927f201d | ||
|
|
b48d98dda3 | ||
|
|
4eab305062 | ||
|
|
edcd2c5eb7 | ||
|
|
2c24ee9a72 | ||
|
|
169f167151 | ||
|
|
08e10f05f6 | ||
|
|
bd987e3036 | ||
|
|
be0921a413 | ||
|
|
f01d965f0e | ||
|
|
ecf42850c3 | ||
|
|
2974f382f8 | ||
|
|
6a4f980921 | ||
|
|
5a4bbf1bda | ||
|
|
123e24a3b5 | ||
|
|
dcdf5c8801 | ||
|
|
ed8c7bf5c2 | ||
|
|
70503db416 | ||
|
|
a2929f90ff | ||
|
|
9cdde06d50 | ||
|
|
b6a7c09070 | ||
|
|
680ac04370 | ||
|
|
e54a84113e | ||
|
|
91d8394093 | ||
|
|
e02c2d5c43 | ||
|
|
7c0aa2a2ea | ||
|
|
9ab1426534 | ||
|
|
647035f9aa | ||
|
|
a3afcf2a5a | ||
|
|
7e33fa5b52 | ||
|
|
d0ced35fc6 | ||
|
|
a8ca68a91e | ||
|
|
5be225d299 | ||
|
|
a8a103e093 | ||
|
|
d7a272a95e | ||
|
|
c198a4bc8c | ||
|
|
13289be133 | ||
|
|
3df3a99759 | ||
|
|
270ba358fa | ||
|
|
d87c2708ec | ||
|
|
d8b9844c61 | ||
|
|
1d323cd938 | ||
|
|
8f74a60ced | ||
|
|
127fb81754 | ||
|
|
ebcfda6c61 | ||
|
|
bdcb63b0e6 | ||
|
|
8f4c066020 | ||
|
|
1fca65c576 | ||
|
|
da4e644327 | ||
|
|
c5ef4b63a3 | ||
|
|
6c980807d0 | ||
|
|
97add1b383 | ||
|
|
3de984ba7f | ||
|
|
85fd75f91f | ||
|
|
0c88742669 | ||
|
|
709302e3cc | ||
|
|
3e96d7aa33 | ||
|
|
3409c2377f | ||
|
|
4058d85cb6 | ||
|
|
2937028c54 | ||
|
|
56f184310a | ||
|
|
1d149cd039 | ||
|
|
dafa4f621f | ||
|
|
0679a6d24e | ||
|
|
8ded2a65c0 | ||
|
|
400723054c | ||
|
|
7f00669875 | ||
|
|
c91570782c | ||
|
|
fede5bbcda | ||
|
|
e9e93e2ec6 | ||
|
|
d4abad2288 | ||
|
|
ddbdebb9c8 | ||
|
|
4828beb949 | ||
|
|
9b17b085f3 | ||
|
|
d293133982 | ||
|
|
cd83e4c54d | ||
|
|
fbf1b5b138 | ||
|
|
58ffd15bff | ||
|
|
0e0bf83057 | ||
|
|
d693f34afb | ||
|
|
d1bae3cd17 | ||
|
|
7ea25f3a34 | ||
|
|
e876763655 | ||
|
|
ab56546dc7 | ||
|
|
3592d8683b | ||
|
|
c55b20803a | ||
|
|
7095aab4a2 | ||
|
|
8ef5ade737 | ||
|
|
b3561ee15f | ||
|
|
16b046d5da | ||
|
|
37b14e7295 | ||
|
|
f6458b80ef | ||
|
|
3b0f71921d | ||
|
|
df54ef1390 | ||
|
|
16add2aac7 | ||
|
|
501cc2458c | ||
|
|
ee7eb10523 | ||
|
|
232c082cbc | ||
|
|
58659bf221 | ||
|
|
8a08012764 | ||
|
|
fdc421dbac | ||
|
|
70aaa95d52 | ||
|
|
80a6943fc4 | ||
|
|
72011255e0 | ||
|
|
de50046cd7 | ||
|
|
e606012ce6 | ||
|
|
b63fd4d905 | ||
|
|
01b8cdffca | ||
|
|
aab70adc0b | ||
|
|
7baade2b87 | ||
|
|
b686095f99 | ||
|
|
a56e93c10c | ||
|
|
465f223905 | ||
|
|
3121677949 | ||
|
|
a65914b4a2 | ||
|
|
cff621603c | ||
|
|
259872feac | ||
|
|
43f2533977 | ||
|
|
454771cd86 | ||
|
|
0ec519f8a4 | ||
|
|
d793fc2e8b | ||
|
|
26999d6ddb | ||
|
|
9232cab470 | ||
|
|
a15935c143 | ||
|
|
11ce36d78e | ||
|
|
4819ae98ac | ||
|
|
8c8cd69d32 | ||
|
|
7800cc247e | ||
|
|
21a74b32b2 | ||
|
|
1cf0b1750b | ||
|
|
94d2148707 | ||
|
|
2c2c45800c | ||
|
|
edb511860c | ||
|
|
a39ea24f10 | ||
|
|
93bc3d440c | ||
|
|
7e22ab0891 | ||
|
|
c98bcec89c | ||
|
|
b456ab777d | ||
|
|
d43036ffeb | ||
|
|
54aaad9dad | ||
|
|
c88b219410 | ||
|
|
bab749e23e | ||
|
|
d54a0e5ae8 | ||
|
|
4dc4cc3fc6 | ||
|
|
3d45f9bba9 | ||
|
|
97c97ff6d5 | ||
|
|
d8231fa5c2 | ||
|
|
5db587d7c1 | ||
|
|
3ee26913e7 | ||
|
|
4bb570c9a4 | ||
|
|
0e8b76a57e | ||
|
|
2dfdcbf4e7 | ||
|
|
1b3bdcc1a6 | ||
|
|
dc5bb506ff | ||
|
|
074d12c1fa | ||
|
|
80deff7c4b | ||
|
|
b7b6c6e1c6 | ||
|
|
651f3f3d1a | ||
|
|
0bc4ef1caf | ||
|
|
dc0a0f6c93 | ||
|
|
63d8d27b03 | ||
|
|
dc40ea7fa1 | ||
|
|
0fae59d6eb | ||
|
|
5c7821b6c5 | ||
|
|
f5745ec58b | ||
|
|
b21d5cb2dc | ||
|
|
74c5dd2158 | ||
|
|
b5664d5d02 | ||
|
|
506c7f2ab0 | ||
|
|
17dcc1a801 | ||
|
|
9b37edbff5 | ||
|
|
e22cdb9ef8 | ||
|
|
636fa8bea8 | ||
|
|
9799e0ad8e | ||
|
|
6ca1d346be | ||
|
|
e1603bf7e4 | ||
|
|
5c554bd278 | ||
|
|
71cfa2e225 | ||
|
|
bb2200ffca | ||
|
|
66e45737e1 | ||
|
|
695de8493d | ||
|
|
c5488692d4 | ||
|
|
0a19e31886 | ||
|
|
2c2e3ad860 | ||
|
|
938dbad1e8 | ||
|
|
ff0bfa28d3 | ||
|
|
d3e11cf813 | ||
|
|
9993392f6d | ||
|
|
e891618572 | ||
|
|
96f8e314b3 | ||
|
|
0edcf5fa8b | ||
|
|
0cd23d778e | ||
|
|
14f6ad921b | ||
|
|
8e93970944 | ||
|
|
b65f499f60 | ||
|
|
c2bcc5be2f | ||
|
|
ba67b9239b | ||
|
|
f4f45af792 | ||
|
|
9cce5af5af | ||
|
|
2e6b98c7f6 | ||
|
|
a8dbfbb8ce | ||
|
|
a68c99c94e | ||
|
|
00da3293e2 | ||
|
|
6a0ce0a518 | ||
|
|
7ce55fd6b7 | ||
|
|
6cc96b358a | ||
|
|
4d6660c2ed | ||
|
|
f5b01e3c57 | ||
|
|
57c6b805ce | ||
|
|
17ed15182a | ||
|
|
77eaa2fea1 | ||
|
|
3c56f37265 | ||
|
|
4073e3a325 | ||
|
|
48df9fcc11 | ||
|
|
bad6113059 | ||
|
|
9e7ac6982a | ||
|
|
47ab3b6c5e | ||
|
|
c761b26aef | ||
|
|
4ee9ce444b | ||
|
|
01ba5f2192 | ||
|
|
b869710aff | ||
|
|
323428ced5 | ||
|
|
8f99a7f6e3 | ||
|
|
aff873923c | ||
|
|
4d1661d39a | ||
|
|
a34a0df207 | ||
|
|
5841610c7f | ||
|
|
557ea7a8da | ||
|
|
7f1282834f | ||
|
|
4e0ef1d982 | ||
|
|
734a0d9ebc | ||
|
|
4d66861107 | ||
|
|
44a6a0d941 | ||
|
|
95940758e9 | ||
|
|
bfd98ad44b | ||
|
|
b59d3549fd | ||
|
|
5f7149068e | ||
|
|
8ec6bfcbe7 | ||
|
|
200e59149c | ||
|
|
978d78f7b2 | ||
|
|
03d8ec2601 | ||
|
|
b941e8fb9f | ||
|
|
394f30d8d4 | ||
|
|
1e0eb68b69 | ||
|
|
f791957ae3 | ||
|
|
f21b3f874f | ||
|
|
8fa510d483 | ||
|
|
ff777576d8 | ||
|
|
3b6c1c661e | ||
|
|
8686bd554b | ||
|
|
62cfb5c161 | ||
|
|
349bac4214 | ||
|
|
c3844cbf4a | ||
|
|
556e4ccb42 | ||
|
|
116cb137fe | ||
|
|
d7b97367b2 | ||
|
|
b82e22dcaf | ||
|
|
95bde7588c | ||
|
|
13425eb243 | ||
|
|
5bde13f927 | ||
|
|
78b52181bd | ||
|
|
a790547896 | ||
|
|
fe32b77f87 | ||
|
|
dd854ea985 | ||
|
|
121e7b3e2d | ||
|
|
15c82415c2 | ||
|
|
5d791c0ea9 | ||
|
|
07db0defa7 | ||
|
|
41f8a4f14f | ||
|
|
778d2ba28b | ||
|
|
dc490a0f08 | ||
|
|
641eae0f5a | ||
|
|
2cc8cbeaf4 | ||
|
|
24dcacc78f | ||
|
|
157a8ddf5c | ||
|
|
08d82be71d | ||
|
|
ba54a4c747 | ||
|
|
b26260a0b9 | ||
|
|
ffd0861b7c | ||
|
|
e5ccf5eb93 | ||
|
|
67307075d1 | ||
|
|
42c719474e | ||
|
|
4d9b6060d4 | ||
|
|
2331d1ff15 | ||
|
|
218292f6b1 | ||
|
|
95c07b4659 | ||
|
|
186b9c9aac | ||
|
|
1ccc0fad27 | ||
|
|
3e0f415fc6 | ||
|
|
5af0cf0ce6 | ||
|
|
8aa36728f5 | ||
|
|
f2a716d47c | ||
|
|
4431431c23 | ||
|
|
13ef589dc8 | ||
|
|
ac36d5db7e | ||
|
|
cdc74b198e | ||
|
|
8d0a55cfac | ||
|
|
3f793c91f4 | ||
|
|
2dc4a31b6c | ||
|
|
40ef4325d9 | ||
|
|
16da29bf9d | ||
|
|
9fbe8a001b | ||
|
|
f12b432efd | ||
|
|
e71a5ca5f2 | ||
|
|
837a5a6021 | ||
|
|
7a6e646c83 | ||
|
|
a71f1b4917 | ||
|
|
5fb4ac2286 | ||
|
|
98f25e9694 | ||
|
|
d92ca28b16 | ||
|
|
d1dd6bb746 | ||
|
|
bf87d252f3 | ||
|
|
8f397a9be7 | ||
|
|
ca270f7c17 | ||
|
|
a8a3ca5102 | ||
|
|
2c78a5a5a0 | ||
|
|
2521f714f9 | ||
|
|
95b4875c8a | ||
|
|
ec01ab23fb | ||
|
|
34debf18bf | ||
|
|
4592b6983a | ||
|
|
a0e44f97bd | ||
|
|
de439e24d7 | ||
|
|
187d04ccb0 | ||
|
|
f214273fd6 | ||
|
|
52aeb3f312 | ||
|
|
d84c1df906 | ||
|
|
a1dd79d4fe | ||
|
|
0519556070 | ||
|
|
d64d04df39 | ||
|
|
cf476dbc41 | ||
|
|
8bfed103d8 | ||
|
|
e9b6e4e839 | ||
|
|
1dc53cfd1e | ||
|
|
f57b5bc735 | ||
|
|
d46c2e8b0a | ||
|
|
f6d1cb89de | ||
|
|
0e0031dc61 | ||
|
|
2168327bfa | ||
|
|
5cf5569d6e | ||
|
|
b4391067ff | ||
|
|
1961248339 | ||
|
|
13d942e163 | ||
|
|
99fd62e3be | ||
|
|
0cded44025 | ||
|
|
a8aad9de61 | ||
|
|
ffe53c91c5 | ||
|
|
9a2860a3ee | ||
|
|
896199c652 | ||
|
|
5fcc6b4a0a | ||
|
|
678b3605e8 | ||
|
|
b9c4654a63 | ||
|
|
845dd50275 | ||
|
|
23aa204856 | ||
|
|
8eb16b0827 | ||
|
|
fc1abcfa1f | ||
|
|
c53acc3015 | ||
|
|
7a34efa5c4 | ||
|
|
2727e45b43 | ||
|
|
5e5ec023be | ||
|
|
d6a5b04043 | ||
|
|
1de9edc06e | ||
|
|
9a99c974a4 | ||
|
|
bf84ee3c7c | ||
|
|
f8545d04b7 | ||
|
|
e73c975bad | ||
|
|
0f7e10cef4 | ||
|
|
689f9b8af7 | ||
|
|
654cbf0687 | ||
|
|
041b0d76ca | ||
|
|
24bac034d1 | ||
|
|
094097fab3 | ||
|
|
26fbe9a101 | ||
|
|
f8ddafcca2 | ||
|
|
04a8f224c1 | ||
|
|
597839331c | ||
|
|
26b72485cf | ||
|
|
7dbaf59ccf | ||
|
|
95cf0a8803 | ||
|
|
1dd5bc3fba | ||
|
|
bf55e2c5d3 | ||
|
|
4d92475240 | ||
|
|
a52586e8ea | ||
|
|
5759574b26 | ||
|
|
56580efe68 | ||
|
|
68f28d6976 | ||
|
|
5c3f5746bb | ||
|
|
54a73cbb2b | ||
|
|
ab0f04844b | ||
|
|
ad8f03af22 | ||
|
|
3329f92136 | ||
|
|
c27ec060da | ||
|
|
82b2189d01 | ||
|
|
4ce52970c0 | ||
|
|
99433dd289 | ||
|
|
b94c520660 | ||
|
|
2f02ae9d45 | ||
|
|
11fcc8c8f9 | ||
|
|
e8cf498dcc | ||
|
|
2178a00eea | ||
|
|
33ff830c1b | ||
|
|
5a8d8dfbb6 | ||
|
|
8238850caa | ||
|
|
fc3c64c8d4 | ||
|
|
1888e57bf9 | ||
|
|
94dcc5b8d8 | ||
|
|
4839a7995e | ||
|
|
1aca526cb4 | ||
|
|
9541165d33 | ||
|
|
600131fe85 | ||
|
|
8c45b484ce | ||
|
|
650da7bada | ||
|
|
247c9f70bf | ||
|
|
233f79df99 | ||
|
|
236852c109 | ||
|
|
6f0e469d79 | ||
|
|
f9749f368f | ||
|
|
f165864f09 | ||
|
|
dc077a52c9 | ||
|
|
0b2de1f895 | ||
|
|
94eb3cf222 | ||
|
|
cb47caf786 | ||
|
|
d9f0633878 | ||
|
|
71094bee63 | ||
|
|
f5c4374d2c | ||
|
|
aa297ca6b6 | ||
|
|
4712e4ece6 | ||
|
|
e51b607189 | ||
|
|
fdf2a763d4 | ||
|
|
f25c9697f8 | ||
|
|
7e282f5df1 | ||
|
|
0e9bb3f30c | ||
|
|
3bb5b261c7 | ||
|
|
273b197d75 | ||
|
|
906dedf4d5 | ||
|
|
4f4a79b1a1 | ||
|
|
587b3497c1 | ||
|
|
1753a63081 | ||
|
|
96f3cf1d27 | ||
|
|
e4dec3d6b6 | ||
|
|
429aa1a2c2 | ||
|
|
d889c019e7 | ||
|
|
52168b7b9d | ||
|
|
d6462323d6 | ||
|
|
1d368457e3 | ||
|
|
7c3fe07ac0 | ||
|
|
194f7d125f | ||
|
|
8ef0be5671 | ||
|
|
b809e77f54 | ||
|
|
780afa9876 | ||
|
|
5ebc1acb7f | ||
|
|
59580f28a1 | ||
|
|
533d7dc4ab | ||
|
|
ec74fa8789 | ||
|
|
988061a5ee | ||
|
|
c10d53bf0c | ||
|
|
54b87586aa | ||
|
|
461ff22cd5 | ||
|
|
b1a4919cb2 | ||
|
|
c1d670a893 | ||
|
|
b6bf29b054 | ||
|
|
5c6a593f2e | ||
|
|
f4c36b28f6 | ||
|
|
73e649b5f5 | ||
|
|
ba72631039 | ||
|
|
a89fb6daa5 | ||
|
|
6568d86aec | ||
|
|
3508cc816e | ||
|
|
ffa264f077 | ||
|
|
84c2266f1a | ||
|
|
973c23b0d6 | ||
|
|
9ede1929b2 | ||
|
|
054e038512 | ||
|
|
fb8923f681 | ||
|
|
240cc7c480 | ||
|
|
8d04a1287d | ||
|
|
16df64ef1f | ||
|
|
f76ef3aa3d | ||
|
|
59c88f499f | ||
|
|
afe25d0ccc | ||
|
|
bdccc34e7e | ||
|
|
495a964322 | ||
|
|
9defc609e8 | ||
|
|
68b26290f0 | ||
|
|
d41f7ae750 | ||
|
|
e15bc1f330 | ||
|
|
a607b7d4b8 | ||
|
|
1a4c4015bc | ||
|
|
d7df77d172 | ||
|
|
7e2b4f8367 | ||
|
|
bc9ae19deb | ||
|
|
17829e94aa | ||
|
|
e0dca0e43c | ||
|
|
4e207ec862 | ||
|
|
b5ccf21d2b | ||
|
|
62bde8ed7e | ||
|
|
dc670134f8 | ||
|
|
39d6cb5df4 | ||
|
|
ddfd1d10a0 | ||
|
|
0c1a8ebc37 | ||
|
|
bd4c4bcb76 | ||
|
|
161efa1f40 | ||
|
|
ebdddd29d3 | ||
|
|
2790d5b2ed | ||
|
|
98adb06ea3 | ||
|
|
0b90cfaa9f | ||
|
|
ded38dbfbd | ||
|
|
5d12f1a485 | ||
|
|
7addf9d430 | ||
|
|
6d0480426d | ||
|
|
5a8b143888 | ||
|
|
5bf0b329c9 | ||
|
|
51123629d7 | ||
|
|
0ad78ae8e7 | ||
|
|
1c6e9e5c0a | ||
|
|
0b610a002c | ||
|
|
0f1361ee1c | ||
|
|
b806825d2a | ||
|
|
f905c1d7d6 | ||
|
|
926b2c3337 | ||
|
|
fc900b8be4 | ||
|
|
88838bf238 | ||
|
|
ed2de829e1 | ||
|
|
ff34c9dcd4 | ||
|
|
3d4641fd98 | ||
|
|
860ace56f8 | ||
|
|
ed6220fd25 | ||
|
|
be9ca6c8a8 | ||
|
|
148284ced6 | ||
|
|
1def132d53 | ||
|
|
0de910602c | ||
|
|
3714170f33 | ||
|
|
c6ca79eb4e | ||
|
|
a15ad925e9 | ||
|
|
13d5225fc8 | ||
|
|
e3052553cf | ||
|
|
cc0e7a369b | ||
|
|
7f819d7041 | ||
|
|
dfba82b3d3 | ||
|
|
3ae2f09a04 | ||
|
|
a2a2a956dd | ||
|
|
fa9d7304bf | ||
|
|
c56b63d1bd | ||
|
|
2e44f115b9 | ||
|
|
0c296f15b1 | ||
|
|
345f573546 | ||
|
|
69288348dd | ||
|
|
9babe97e6f | ||
|
|
863fa9c295 | ||
|
|
766968bb6f | ||
|
|
123e04b23e | ||
|
|
9d2eb35d7a | ||
|
|
67a38adacf | ||
|
|
80aa303c29 | ||
|
|
5ea16f2790 | ||
|
|
2f24b79ddd | ||
|
|
d9f8feb04a | ||
|
|
bb57587b42 | ||
|
|
b61ca28260 | ||
|
|
a3f4e7709b | ||
|
|
984a819b92 | ||
|
|
edae4b5efb | ||
|
|
2098ebf712 | ||
|
|
f72c10f657 | ||
|
|
645bde35d3 | ||
|
|
0c39f9f6f6 |
7
.dir-locals.el
Normal file
7
.dir-locals.el
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
;;; Directory Local Variables
|
||||||
|
;;; For more information see (info "(emacs) Directory Variables")
|
||||||
|
|
||||||
|
((sh-mode
|
||||||
|
(indent-tabs-mode)
|
||||||
|
(sh-basic-offset . 4)))
|
||||||
|
|
||||||
24
.gitignore
vendored
24
.gitignore
vendored
@@ -1,3 +1,23 @@
|
|||||||
|
/Makefile.inc
|
||||||
|
/dracut.8
|
||||||
|
/dracut-catimages.8
|
||||||
|
/dracut.conf.5
|
||||||
|
/dracut.conf.d/*.conf
|
||||||
|
/dracut-gencmdline.8
|
||||||
|
/dracut.html
|
||||||
|
/dracut.kernel.7
|
||||||
|
/dracut.pc
|
||||||
|
/dracut-install
|
||||||
|
/modules.d/99base/switch_root
|
||||||
|
/test/*/test.log
|
||||||
test*.img
|
test*.img
|
||||||
modules.d/99base/switch_root
|
/.buildpath
|
||||||
*~
|
/.project
|
||||||
|
/dracut-version.sh
|
||||||
|
/install/dracut-install
|
||||||
|
/*.rpm
|
||||||
|
/*.[0-9]
|
||||||
|
/modules.d/98dracut-systemd/*.service.8
|
||||||
|
/*.sign
|
||||||
|
*.o
|
||||||
|
skipcpio/skipcpio
|
||||||
|
|||||||
1
.kateconfig
Normal file
1
.kateconfig
Normal file
@@ -0,0 +1 @@
|
|||||||
|
kate: space-indent on; tab-width 4; indent-width 4; replace-tabs on; eol unix;
|
||||||
9
.kateproject
Normal file
9
.kateproject
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"name": "Dracut"
|
||||||
|
, "files": [ { "git": 1 } ]
|
||||||
|
, "build": {
|
||||||
|
"directory": "./"
|
||||||
|
, "build": "make -j $(getconf _NPROCESSORS_ONLN) all"
|
||||||
|
, "clean": "make clean"
|
||||||
|
}
|
||||||
|
}
|
||||||
33
.mailmap
Normal file
33
.mailmap
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
Philippe Seewer <philippe.seewer@bfh.ch> <philippe.seewer-omB+W0Dpw2o@public.gmane.org>
|
||||||
|
Seewer Philippe <philippe.seewer@bfh.ch> <philippe.seewer@bfh.ch>
|
||||||
|
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>
|
||||||
|
Dan Horák <dhorak@redhat.com> <dan@danny.cz>
|
||||||
|
John Reiser <jreiser@bitwagon.com> <jreiser@BitWagon.com>
|
||||||
|
Luca Berra <bluca@vodka.it> <bluca@comedia.it>
|
||||||
|
Dave Young <dyoung@redhat.com> <dyoung@redhat.com>
|
||||||
|
Dave Young <dyoung@redhat.com> <dave@redhat.com>
|
||||||
|
Frederick Grose <fgrose@sugarlabs.org> <fgrose@gmail.com>
|
||||||
|
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>
|
||||||
48
.travis.yml
Normal file
48
.travis.yml
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
language: generic
|
||||||
|
sudo: required
|
||||||
|
services:
|
||||||
|
- docker
|
||||||
|
env:
|
||||||
|
matrix:
|
||||||
|
- IMAGE=latest
|
||||||
|
- IMAGE=latest TESTS=01
|
||||||
|
- IMAGE=latest TESTS=12
|
||||||
|
- IMAGE=latest TESTS=20
|
||||||
|
- IMAGE=latest TESTS=50
|
||||||
|
- IMAGE=latest TESTS=30
|
||||||
|
- IMAGE=latest TESTS=31
|
||||||
|
- IMAGE=latest TESTS=60
|
||||||
|
- IMAGE=latest TESTS=70
|
||||||
|
- IMAGE=latest TESTS=99
|
||||||
|
- IMAGE=latest TESTS=02
|
||||||
|
- IMAGE=latest TESTS=03
|
||||||
|
- IMAGE=latest TESTS=04
|
||||||
|
- IMAGE=latest TESTS=10
|
||||||
|
- IMAGE=latest TESTS=11
|
||||||
|
- IMAGE=29 TESTS=13
|
||||||
|
- IMAGE=29 TESTS=14
|
||||||
|
- IMAGE=latest TESTS=15
|
||||||
|
- IMAGE=latest TESTS=17
|
||||||
|
|
||||||
|
before_script:
|
||||||
|
- docker pull fedora:$IMAGE
|
||||||
|
- |
|
||||||
|
sudo modprobe kvm-intel nested=1 || :
|
||||||
|
sudo modprobe kvm-amd nested=1 || :
|
||||||
|
dmesg | tail || :
|
||||||
|
- git fetch --tags --unshallow
|
||||||
|
- |
|
||||||
|
git describe --abbrev=0 --tags || :
|
||||||
|
git describe --tags || :
|
||||||
|
|
||||||
|
script:
|
||||||
|
- docker run --privileged -it -v $(pwd)/:/dracut fedora:$IMAGE /dracut/fedora-test.sh $IMAGE-$$ "$TESTS"
|
||||||
|
|
||||||
|
notifications:
|
||||||
|
webhooks:
|
||||||
|
urls:
|
||||||
|
- https://webhooks.gitter.im/e/effa917ca3e0ed5fd00e
|
||||||
|
on_success: change # options: [always|never|change] default: always
|
||||||
|
on_failure: always # options: [always|never|change] default: always
|
||||||
|
on_start: never # options: [always|never|change] default: always
|
||||||
|
|
||||||
60
50-dracut.install
Executable file
60
50-dracut.install
Executable file
@@ -0,0 +1,60 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
COMMAND="$1"
|
||||||
|
KERNEL_VERSION="$2"
|
||||||
|
BOOT_DIR_ABS="$3"
|
||||||
|
KERNEL_IMAGE="$4"
|
||||||
|
|
||||||
|
# If KERNEL_INSTALL_MACHINE_ID is defined but empty, BOOT_DIR_ABS is a fake directory.
|
||||||
|
# So, let's skip to create initrd.
|
||||||
|
if ! [[ ${KERNEL_INSTALL_MACHINE_ID-x} ]]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -d "$BOOT_DIR_ABS" ]]; then
|
||||||
|
INITRD="initrd"
|
||||||
|
else
|
||||||
|
BOOT_DIR_ABS="/boot"
|
||||||
|
INITRD="initramfs-${KERNEL_VERSION}.img"
|
||||||
|
fi
|
||||||
|
|
||||||
|
ret=0
|
||||||
|
case "$COMMAND" in
|
||||||
|
add)
|
||||||
|
INITRD_IMAGE_PREGENERATED=${KERNEL_IMAGE%/*}/initrd
|
||||||
|
if [[ -f ${INITRD_IMAGE_PREGENERATED} ]]; then
|
||||||
|
# we found an initrd at the same place as the kernel
|
||||||
|
# use this and don't generate a new one
|
||||||
|
cp "$INITRD_IMAGE_PREGENERATED" "$BOOT_DIR_ABS/$INITRD" \
|
||||||
|
&& chown root:root "$BOOT_DIR_ABS/$INITRD" \
|
||||||
|
&& chmod 0600 "$BOOT_DIR_ABS/$INITRD" \
|
||||||
|
&& exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -f /etc/kernel/cmdline ]]; then
|
||||||
|
read -r -d '' -a BOOT_OPTIONS < /etc/kernel/cmdline
|
||||||
|
elif [[ -f /usr/lib/kernel/cmdline ]]; then
|
||||||
|
read -r -d '' -a BOOT_OPTIONS < /usr/lib/kernel/cmdline
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! [[ ${BOOT_OPTIONS[*]} ]]; then
|
||||||
|
read -r -d '' -a BOOT_OPTIONS < /proc/cmdline
|
||||||
|
fi
|
||||||
|
|
||||||
|
unset noimageifnotneeded
|
||||||
|
|
||||||
|
for ((i=0; i < "${#BOOT_OPTIONS[@]}"; i++)); do
|
||||||
|
if [[ ${BOOT_OPTIONS[$i]} == root\=PARTUUID\=* ]]; then
|
||||||
|
noimageifnotneeded="yes"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
dracut -f ${noimageifnotneeded:+--noimageifnotneeded} "$BOOT_DIR_ABS/$INITRD" "$KERNEL_VERSION"
|
||||||
|
ret=$?
|
||||||
|
;;
|
||||||
|
remove)
|
||||||
|
rm -f -- "$BOOT_DIR_ABS/$INITRD"
|
||||||
|
ret=$?
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
exit $ret
|
||||||
68
51-dracut-rescue-postinst.sh
Executable file
68
51-dracut-rescue-postinst.sh
Executable file
@@ -0,0 +1,68 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
export LANG=C
|
||||||
|
|
||||||
|
KERNEL_VERSION="$1"
|
||||||
|
KERNEL_IMAGE="$2"
|
||||||
|
|
||||||
|
[[ -f /etc/os-release ]] && . /etc/os-release
|
||||||
|
|
||||||
|
if [[ ! -f /etc/machine-id ]] || [[ ! -s /etc/machine-id ]]; then
|
||||||
|
systemd-machine-id-setup
|
||||||
|
fi
|
||||||
|
|
||||||
|
[[ -f /etc/machine-id ]] && read MACHINE_ID < /etc/machine-id
|
||||||
|
|
||||||
|
[[ $MACHINE_ID ]] || exit 1
|
||||||
|
[[ -f $KERNEL_IMAGE ]] || exit 1
|
||||||
|
|
||||||
|
INITRDFILE="/boot/initramfs-0-rescue-${MACHINE_ID}.img"
|
||||||
|
NEW_KERNEL_IMAGE="${KERNEL_IMAGE%/*}/vmlinuz-0-rescue-${MACHINE_ID}"
|
||||||
|
|
||||||
|
[[ -f $INITRDFILE ]] && [[ -f $NEW_KERNEL_IMAGE ]] && exit 0
|
||||||
|
|
||||||
|
dropindirs_sort()
|
||||||
|
{
|
||||||
|
suffix=$1; shift
|
||||||
|
args=("$@")
|
||||||
|
files=$(
|
||||||
|
while (( $# > 0 )); do
|
||||||
|
for i in ${1}/*${suffix}; do
|
||||||
|
[[ -f $i ]] && echo ${i##*/}
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
done | sort -Vu
|
||||||
|
)
|
||||||
|
|
||||||
|
for f in $files; do
|
||||||
|
for d in "${args[@]}"; do
|
||||||
|
if [[ -f "$d/$f" ]]; then
|
||||||
|
echo "$d/$f"
|
||||||
|
continue 2
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
# source our config dir
|
||||||
|
for f in $(dropindirs_sort ".conf" "/etc/dracut.conf.d" "/usr/lib/dracut/dracut.conf.d"); do
|
||||||
|
[[ -e $f ]] && . "$f"
|
||||||
|
done
|
||||||
|
|
||||||
|
[[ $dracut_rescue_image != "yes" ]] && exit 0
|
||||||
|
|
||||||
|
if [[ ! -f $INITRDFILE ]]; then
|
||||||
|
dracut --no-hostonly -a "rescue" "$INITRDFILE" "$KERNEL_VERSION"
|
||||||
|
((ret+=$?))
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ! -f $NEW_KERNEL_IMAGE ]]; then
|
||||||
|
cp "$KERNEL_IMAGE" "$NEW_KERNEL_IMAGE"
|
||||||
|
((ret+=$?))
|
||||||
|
fi
|
||||||
|
|
||||||
|
new-kernel-pkg --install "$KERNEL_VERSION" --kernel-image "$NEW_KERNEL_IMAGE" --initrdfile "$INITRDFILE" --banner "$NAME $VERSION_ID Rescue $MACHINE_ID"
|
||||||
|
|
||||||
|
((ret+=$?))
|
||||||
|
|
||||||
|
exit $ret
|
||||||
131
51-dracut-rescue.install
Executable file
131
51-dracut-rescue.install
Executable file
@@ -0,0 +1,131 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
export LANG=C
|
||||||
|
|
||||||
|
COMMAND="$1"
|
||||||
|
KERNEL_VERSION="$2"
|
||||||
|
BOOT_DIR_ABS="${3%/*}/0-rescue"
|
||||||
|
KERNEL_IMAGE="$4"
|
||||||
|
|
||||||
|
|
||||||
|
dropindirs_sort()
|
||||||
|
{
|
||||||
|
suffix=$1; shift
|
||||||
|
args=("$@")
|
||||||
|
files=$(
|
||||||
|
while (( $# > 0 )); do
|
||||||
|
for i in ${1}/*${suffix}; do
|
||||||
|
[[ -f $i ]] && echo ${i##*/}
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
done | sort -Vu
|
||||||
|
)
|
||||||
|
|
||||||
|
for f in $files; do
|
||||||
|
for d in "${args[@]}"; do
|
||||||
|
if [[ -f "$d/$f" ]]; then
|
||||||
|
echo "$d/$f"
|
||||||
|
continue 2
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
[[ -f /etc/os-release ]] && . /etc/os-release
|
||||||
|
|
||||||
|
if [[ ${KERNEL_INSTALL_MACHINE_ID+x} ]]; then
|
||||||
|
MACHINE_ID=$KERNEL_INSTALL_MACHINE_ID
|
||||||
|
elif [[ -f /etc/machine-id ]] ; then
|
||||||
|
read MACHINE_ID < /etc/machine-id
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! [[ $MACHINE_ID ]]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -f /etc/kernel/cmdline ]]; then
|
||||||
|
read -r -d '' -a BOOT_OPTIONS < /etc/kernel/cmdline
|
||||||
|
elif [[ -f /usr/lib/kernel/cmdline ]]; then
|
||||||
|
read -r -d '' -a BOOT_OPTIONS < /usr/lib/kernel/cmdline
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! [[ "${BOOT_OPTIONS[@]}" ]]; then
|
||||||
|
read -r -d '' -a line < /proc/cmdline
|
||||||
|
for i in "${line[@]}"; do
|
||||||
|
[[ "${i#initrd=*}" != "$i" ]] && continue
|
||||||
|
BOOT_OPTIONS+=("$i")
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! [[ ${BOOT_OPTIONS[*]} ]]; then
|
||||||
|
echo "Could not determine the kernel command line parameters." >&2
|
||||||
|
echo "Please specify the kernel command line in /etc/kernel/cmdline!" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -d "${BOOT_DIR_ABS%/*}" ]]; then
|
||||||
|
BOOT_DIR="/${MACHINE_ID}/0-rescue"
|
||||||
|
BOOT_ROOT=${BOOT_DIR_ABS%$BOOT_DIR}
|
||||||
|
LOADER_ENTRY="$BOOT_ROOT/loader/entries/${MACHINE_ID}-0-rescue.conf"
|
||||||
|
KERNEL="linux"
|
||||||
|
INITRD="initrd"
|
||||||
|
else
|
||||||
|
BLS_DIR="/boot/loader/entries"
|
||||||
|
BOOT_DIR_ABS="/boot"
|
||||||
|
LOADER_ENTRY="$BLS_DIR/${MACHINE_ID}-0-rescue.conf"
|
||||||
|
KERNEL="vmlinuz-0-rescue-${MACHINE_ID}"
|
||||||
|
INITRD="initramfs-0-rescue-${MACHINE_ID}.img"
|
||||||
|
fi
|
||||||
|
|
||||||
|
ret=0
|
||||||
|
|
||||||
|
case "$COMMAND" in
|
||||||
|
add)
|
||||||
|
[[ -f "$LOADER_ENTRY" ]] && [[ -f "$BOOT_DIR_ABS/$KERNEL" ]] \
|
||||||
|
&& [[ -f "$BOOT_DIR_ABS/$INITRD" ]] && exit 0
|
||||||
|
|
||||||
|
# source our config dir
|
||||||
|
for f in $(dropindirs_sort ".conf" "/etc/dracut.conf.d" "/usr/lib/dracut/dracut.conf.d"); do
|
||||||
|
[[ -e $f ]] && . "$f"
|
||||||
|
done
|
||||||
|
|
||||||
|
[[ $dracut_rescue_image != "yes" ]] && exit 0
|
||||||
|
|
||||||
|
[[ -d "$BOOT_DIR_ABS" ]] || mkdir -p "$BOOT_DIR_ABS"
|
||||||
|
|
||||||
|
if ! cp "$KERNEL_IMAGE" "$BOOT_DIR_ABS/$KERNEL"; then
|
||||||
|
echo "Can't copy '$KERNEL_IMAGE to '$BOOT_DIR_ABS/$KERNEL'!" >&2
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ! -f "$BOOT_DIR_ABS/$INITRD" ]]; then
|
||||||
|
dracut -f --no-hostonly -a "rescue" "$BOOT_DIR_ABS/$INITRD" "$KERNEL_VERSION"
|
||||||
|
((ret+=$?))
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${BOOT_DIR_ABS}" != "/boot" ]]; then
|
||||||
|
{
|
||||||
|
echo "title $PRETTY_NAME - Rescue Image"
|
||||||
|
echo "version $KERNEL_VERSION"
|
||||||
|
echo "machine-id $MACHINE_ID"
|
||||||
|
echo "options ${BOOT_OPTIONS[@]} rd.auto=1"
|
||||||
|
echo "linux $BOOT_DIR/linux"
|
||||||
|
echo "initrd $BOOT_DIR/initrd"
|
||||||
|
} > $LOADER_ENTRY
|
||||||
|
else
|
||||||
|
cp -aT "${KERNEL_IMAGE%/*}/bls.conf" $LOADER_ENTRY
|
||||||
|
sed -i 's/'$KERNEL_VERSION'/0-rescue-'${MACHINE_ID}'/' $LOADER_ENTRY
|
||||||
|
fi
|
||||||
|
|
||||||
|
((ret+=$?))
|
||||||
|
;;
|
||||||
|
|
||||||
|
remove)
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
usage
|
||||||
|
ret=1;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit $ret
|
||||||
233
AUTHORS
233
AUTHORS
@@ -1,11 +1,228 @@
|
|||||||
Andreas Thienemann <andreas@bawue.net>
|
|
||||||
Bill Nottingham <notting@redhat.com>
|
|
||||||
Dave Jones <davej@redhat.com>
|
|
||||||
David Dillow <dave@thedillows.org>
|
|
||||||
Harald Hoyer <harald@redhat.com>
|
Harald Hoyer <harald@redhat.com>
|
||||||
Jeremy Katz <katzj@redhat.com>
|
|
||||||
Peter Jones <pjones@redhat.com>
|
|
||||||
Seewer Philippe <philippe.seewer@bfh.ch>
|
|
||||||
Victor Lowther <victor.lowther@gmail.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>
|
Warren Togami <wtogami@redhat.com>
|
||||||
|
Dave Young <dyoung@redhat.com>
|
||||||
|
Jeremy Katz <katzj@redhat.com>
|
||||||
|
David Dillow <dave@thedillows.org>
|
||||||
|
Michal Soltys <soltys@ziu.info>
|
||||||
|
Colin Guthrie <colin@mageia.org>
|
||||||
|
Daniel Molkentin <dmolkentin@suse.com>
|
||||||
|
Amerigo Wang <amwang@redhat.com>
|
||||||
|
Thomas Renninger <trenn@suse.com>
|
||||||
|
Lukas Nykryn <lnykryn@redhat.com>
|
||||||
|
Alexander Tsoy <alexander@tsoy.me>
|
||||||
|
Frederick Grose <fgrose@sugarlabs.org>
|
||||||
|
WANG Chao <chaowang@redhat.com>
|
||||||
|
Yu Watanabe <watanabe.yu+github@gmail.com>
|
||||||
|
Andrey Borzenkov <arvidjaar@gmail.com>
|
||||||
|
Hans de Goede <hdegoede@redhat.com>
|
||||||
|
Peter Jones <pjones@redhat.com>
|
||||||
|
Andreas Thienemann <andreas@bawue.net>
|
||||||
|
Peter Robinson <pbrobinson@fedoraproject.org>
|
||||||
|
Fabian Vogt <fvogt@suse.com>
|
||||||
|
Kairui Song <kasong@redhat.com>
|
||||||
|
John Reiser <jreiser@bitwagon.com>
|
||||||
|
Luca Berra <bluca@vodka.it>
|
||||||
|
Xunlei Pang <xlpang@redhat.com>
|
||||||
|
Daniel Drake <drake@endlessm.com>
|
||||||
|
Lubomir Rintel <lkundrak@v3.sk>
|
||||||
|
Angelo "pallotron" Failla <pallotron@fb.com>
|
||||||
|
Brian C. Lane <bcl@redhat.com>
|
||||||
|
Ville Skyttä <ville.skytta@iki.fi>
|
||||||
|
Cristian Rodríguez <crrodriguez@opensuse.org>
|
||||||
|
Dan Horák <dhorak@redhat.com>
|
||||||
|
Baoquan He <bhe@redhat.com>
|
||||||
|
Brendan Germain <brendan.germain@nasdaqomx.com>
|
||||||
|
Colin Walters <walters@verbum.org>
|
||||||
|
Leho Kraav <leho@kraav.com>
|
||||||
|
Moritz Maxeiner <moritz@ucworks.org>
|
||||||
|
Nicolas Chauvet <kwizart@gmail.com>
|
||||||
|
Ondrej Mosnacek <omosnace@redhat.com>
|
||||||
|
Fabian Deutsch <fabiand@fedoraproject.org>
|
||||||
|
Javier Martinez Canillas <javierm@redhat.com>
|
||||||
|
Kamil Rytarowski <n54@gmx.com>
|
||||||
|
Lidong Zhong <lidong.zhong@suse.com>
|
||||||
|
Marc Grimme <grimme@atix.de>
|
||||||
|
NeilBrown <neilb@suse.de>
|
||||||
|
Peter Rajnoha <prajnoha@redhat.com>
|
||||||
|
Radek Vykydal <rvykydal@redhat.com>
|
||||||
|
Thorsten Behrens <tbehrens@suse.com>
|
||||||
|
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>
|
||||||
|
Mike Gilbert <floppym@gentoo.org>
|
||||||
|
Milan Broz <mbroz@redhat.com>
|
||||||
|
Mimi Zohar <zohar@linux.vnet.ibm.com>
|
||||||
|
Roberto Sassu <roberto.sassu@polito.it>
|
||||||
|
Stefan Reimer <it@startux.de>
|
||||||
|
Adam Williamson <awilliam@redhat.com>
|
||||||
|
Anton Blanchard <anton@samba.org>
|
||||||
|
Bill Nottingham <notting@redhat.com>
|
||||||
|
Chapman Flack <g2@anastigmatix.net>
|
||||||
|
Chris Leech <cleech@redhat.com>
|
||||||
|
David Cantrell <dcantrell@redhat.com>
|
||||||
|
Dennis Gilmore <dennis@ausil.us>
|
||||||
|
Jan Synacek <jsynacek@redhat.com>
|
||||||
|
Jon Ander Hernandez <jonan.h@gmail.com>
|
||||||
|
Juan RP <xtraeme@gmail.com>
|
||||||
|
Lance Albertson <lance@osuosl.org>
|
||||||
|
Marcos Mello <marcosfrm@gmail.com>
|
||||||
|
Marian Ganisin <mganisin@redhat.com>
|
||||||
|
Matthias Gerstner <matthias.gerstner@suse.de>
|
||||||
|
Michael Ploujnikov <plouj@somanetworks.com>
|
||||||
|
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>
|
||||||
|
tpgxyz <tpgxyz@gmail.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>
|
||||||
|
Daniel Schaal <farbing@web.de>
|
||||||
|
Denis Silakov <dsilakov@virtuozzo.com>
|
||||||
|
Dimitri John Ledkov <dimitri.j.ledkov@intel.com>
|
||||||
|
Erwan Velu <erwan.velu@enovance.com>
|
||||||
|
Evgeny Vereshchagin <evvers@ya.ru>
|
||||||
|
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>
|
||||||
|
Lukas Wunner <lukas@wunner.de>
|
||||||
|
Mike Snitzer <snitzer@redhat.com>
|
||||||
|
Minfei Huang <mhuang@redhat.com>
|
||||||
|
Nikoli <nikoli@gmx.us>
|
||||||
|
Pingfan Liu <piliu@redhat.com>
|
||||||
|
Przemysław Rudy <prudy1@o2.pl>
|
||||||
|
Robert LeBlanc <robert@leblancnet.us>
|
||||||
|
Robert Scheck <robert@fedoraproject.org>
|
||||||
|
Stefan Berger <stefanb@us.ibm.com>
|
||||||
|
Thomas Lange <lange@informatik.uni-koeln.de>
|
||||||
|
Till Maas <opensource@till.name>
|
||||||
|
Tony Asleson <tasleson@redhat.com>
|
||||||
|
Vivek Goyal <vgoyal@redhat.com>
|
||||||
|
Vladislav Bogdanov <bubble@hoster-ok.com>
|
||||||
|
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
|
||||||
|
Alexander Kurtz <alexander@kurtz.be>
|
||||||
|
Alexander Todorov <atodorov@redhat.com>
|
||||||
|
Andreas Stieger <astieger@suse.com>
|
||||||
|
Andy Lutomirski <luto@mit.edu>
|
||||||
|
Anssi Hannula <anssi@mageia.org>
|
||||||
|
Artem Savkov <asavkov@redhat.com>
|
||||||
|
B. Wilson <x@wilsonb.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>
|
||||||
|
Cong Wang <amwang@redhat.com>
|
||||||
|
Dan Fuhry <dfuhry@datto.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>
|
||||||
|
Enno Boland <g@s01.de>
|
||||||
|
Eugene Syromiatnikov <esyr@redhat.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>
|
||||||
|
Hendrik Brueckner <brueckner@linux.ibm.com>
|
||||||
|
Hermann Gausterer <git-dracut-2012@mrq1.org>
|
||||||
|
Hiroaki Mizuguchi <hiroaki-m@iij.ad.jp>
|
||||||
|
Hui Wang <john.wanghui@huawei.com>
|
||||||
|
Ignaz Forster <iforster@suse.com>
|
||||||
|
James Laska <jlaska@redhat.com>
|
||||||
|
Jan Stodola <jstodola@redhat.com>
|
||||||
|
Jason Dana <jasondana@quarksecurity.com>
|
||||||
|
Jeremy Linton <lintonrjeremy@gmail.com>
|
||||||
|
Jiri Pirko <jiri@resnulli.us>
|
||||||
|
Joe Lawrence <Joe.Lawrence@stratus.com>
|
||||||
|
Johannes Thumshirn <jthumshirn@suse.com>
|
||||||
|
Jonas Jonsson <jonas@websystem.se>
|
||||||
|
Kevin Yung <Kevin.Yung@myob.com>
|
||||||
|
Lars R. Damerow <lars@pixar.com>
|
||||||
|
Lennert Buytenhek <buytenh@wantstofly.org>
|
||||||
|
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>
|
||||||
|
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>
|
||||||
|
Michael McCracken <michael.mccracken@gmail.com>
|
||||||
|
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>
|
||||||
|
Nicolas Porcel <nicolasporcel06@gmail.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>
|
||||||
|
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>
|
||||||
|
Renaud Métrich <rmetrich@redhat.com>
|
||||||
|
Robert Buchholz <rbu@goodpoint.de>
|
||||||
|
Ruben Kerkhof <ruben@rubenkerkhof.com>
|
||||||
|
Rusty Bird <rustybird@openmailbox.org>
|
||||||
|
Sergey Fionov <fionov@gmail.com>
|
||||||
|
Shawn W Dunn <sfalken@opensuse.org>
|
||||||
|
Srinivasa T N <seenutn@linux.vnet.ibm.com>
|
||||||
|
Stijn Hoop <stijn@sandcat.nl>
|
||||||
|
Sullivan (CTR), Austin <austin.sullivan.ctr@progeny.net>
|
||||||
|
Thilo Bangert <thilo.bangert@gmx.net>
|
||||||
|
Thomas Blume <thomas.blume@suse.com>
|
||||||
|
Tobias Geerinckx <tobias.geerinckx@gmail.com>
|
||||||
|
Tobias Klauser <tklauser@distanz.ch>
|
||||||
|
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>
|
||||||
|
Yanko Kaneti <yaneti@declera.com>
|
||||||
|
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>
|
||||||
|
|||||||
30
COPYING
30
COPYING
@@ -1,8 +1,8 @@
|
|||||||
GNU GENERAL PUBLIC LICENSE
|
GNU GENERAL PUBLIC LICENSE
|
||||||
Version 2, June 1991
|
Version 2, June 1991
|
||||||
|
|
||||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||||
675 Mass Ave, Cambridge, MA 02139, USA
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
of this license document, but changing it is not allowed.
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
@@ -15,7 +15,7 @@ software--to make sure the software is free for all its users. This
|
|||||||
General Public License applies to most of the Free Software
|
General Public License applies to most of the Free Software
|
||||||
Foundation's software and to any other program whose authors commit to
|
Foundation's software and to any other program whose authors commit to
|
||||||
using it. (Some other Free Software Foundation software is covered by
|
using it. (Some other Free Software Foundation software is covered by
|
||||||
the GNU Library General Public License instead.) You can apply it to
|
the GNU Lesser General Public License instead.) You can apply it to
|
||||||
your programs, too.
|
your programs, too.
|
||||||
|
|
||||||
When we speak of free software, we are referring to freedom, not
|
When we speak of free software, we are referring to freedom, not
|
||||||
@@ -55,7 +55,7 @@ patent must be licensed for everyone's free use or not licensed at all.
|
|||||||
|
|
||||||
The precise terms and conditions for copying, distribution and
|
The precise terms and conditions for copying, distribution and
|
||||||
modification follow.
|
modification follow.
|
||||||
|
|
||||||
GNU GENERAL PUBLIC LICENSE
|
GNU GENERAL PUBLIC LICENSE
|
||||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
@@ -110,7 +110,7 @@ above, provided that you also meet all of these conditions:
|
|||||||
License. (Exception: if the Program itself is interactive but
|
License. (Exception: if the Program itself is interactive but
|
||||||
does not normally print such an announcement, your work based on
|
does not normally print such an announcement, your work based on
|
||||||
the Program is not required to print an announcement.)
|
the Program is not required to print an announcement.)
|
||||||
|
|
||||||
These requirements apply to the modified work as a whole. If
|
These requirements apply to the modified work as a whole. If
|
||||||
identifiable sections of that work are not derived from the Program,
|
identifiable sections of that work are not derived from the Program,
|
||||||
and can be reasonably considered independent and separate works in
|
and can be reasonably considered independent and separate works in
|
||||||
@@ -168,7 +168,7 @@ access to copy from a designated place, then offering equivalent
|
|||||||
access to copy the source code from the same place counts as
|
access to copy the source code from the same place counts as
|
||||||
distribution of the source code, even though third parties are not
|
distribution of the source code, even though third parties are not
|
||||||
compelled to copy the source along with the object code.
|
compelled to copy the source along with the object code.
|
||||||
|
|
||||||
4. You may not copy, modify, sublicense, or distribute the Program
|
4. You may not copy, modify, sublicense, or distribute the Program
|
||||||
except as expressly provided under this License. Any attempt
|
except as expressly provided under this License. Any attempt
|
||||||
otherwise to copy, modify, sublicense or distribute the Program is
|
otherwise to copy, modify, sublicense or distribute the Program is
|
||||||
@@ -225,7 +225,7 @@ impose that choice.
|
|||||||
|
|
||||||
This section is intended to make thoroughly clear what is believed to
|
This section is intended to make thoroughly clear what is believed to
|
||||||
be a consequence of the rest of this License.
|
be a consequence of the rest of this License.
|
||||||
|
|
||||||
8. If the distribution and/or use of the Program is restricted in
|
8. If the distribution and/or use of the Program is restricted in
|
||||||
certain countries either by patents or by copyrighted interfaces, the
|
certain countries either by patents or by copyrighted interfaces, the
|
||||||
original copyright holder who places the Program under this License
|
original copyright holder who places the Program under this License
|
||||||
@@ -278,8 +278,8 @@ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
|||||||
POSSIBILITY OF SUCH DAMAGES.
|
POSSIBILITY OF SUCH DAMAGES.
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
Appendix: How to Apply These Terms to Your New Programs
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
If you develop a new program, and you want it to be of the greatest
|
If you develop a new program, and you want it to be of the greatest
|
||||||
possible use to the public, the best way to achieve this is to make it
|
possible use to the public, the best way to achieve this is to make it
|
||||||
@@ -291,7 +291,7 @@ convey the exclusion of warranty; and each file should have at least
|
|||||||
the "copyright" line and a pointer to where the full notice is found.
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
<one line to give the program's name and a brief idea of what it does.>
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
Copyright (C) 19yy <name of author>
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@@ -303,16 +303,16 @@ the "copyright" line and a pointer to where the full notice is found.
|
|||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License along
|
||||||
along with this program; if not, write to the Free Software
|
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
If the program is interactive, make it output a short notice like this
|
If the program is interactive, make it output a short notice like this
|
||||||
when it starts in an interactive mode:
|
when it starts in an interactive mode:
|
||||||
|
|
||||||
Gnomovision version 69, Copyright (C) 19yy name of author
|
Gnomovision version 69, Copyright (C) year name of author
|
||||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
This is free software, and you are welcome to redistribute it
|
This is free software, and you are welcome to redistribute it
|
||||||
under certain conditions; type `show c' for details.
|
under certain conditions; type `show c' for details.
|
||||||
@@ -335,5 +335,5 @@ necessary. Here is a sample; alter the names:
|
|||||||
This General Public License does not permit incorporating your program into
|
This General Public License does not permit incorporating your program into
|
||||||
proprietary programs. If your program is a subroutine library, you may
|
proprietary programs. If your program is a subroutine library, you may
|
||||||
consider it more useful to permit linking proprietary applications with the
|
consider it more useful to permit linking proprietary applications with the
|
||||||
library. If this is what you want to do, use the GNU Library General
|
library. If this is what you want to do, use the GNU Lesser General
|
||||||
Public License instead of this License.
|
Public License instead of this License.
|
||||||
|
|||||||
302
Makefile
302
Makefile
@@ -1,77 +1,281 @@
|
|||||||
VERSION=0.7
|
-include dracut-version.sh
|
||||||
GITVERSION=$(shell [ -d .git ] && git rev-list --abbrev-commit -n 1 HEAD |cut -b 1-8)
|
|
||||||
|
|
||||||
prefix = /usr
|
VERSION ?= $(shell [ -d .git ] && git describe --abbrev=0 --tags --always 2>/dev/null || echo $(DRACUT_VERSION))
|
||||||
datadir = ${prefix}/share
|
GITVERSION ?= $(shell [ -d .git ] && { v=$$(git describe --tags --always 2>/dev/null); [ -n "$$v" ] && [ $${v\#*-} != $$v ] && echo -$${v\#*-}; } )
|
||||||
pkglibdir = ${datadir}/dracut
|
|
||||||
sysconfdir = ${prefix}/etc
|
|
||||||
sbindir = ${prefix}/sbin
|
|
||||||
mandir = ${prefix}/share/man
|
|
||||||
|
|
||||||
modules.d/99base/switch_root: switch_root.c
|
-include Makefile.inc
|
||||||
gcc -D _GNU_SOURCE -D 'PACKAGE_STRING="dracut"' -std=gnu99 -fsigned-char -g -O2 -o modules.d/99base/switch_root switch_root.c
|
|
||||||
|
|
||||||
all: modules.d/99base/switch_root
|
prefix ?= /usr
|
||||||
|
libdir ?= ${prefix}/lib
|
||||||
|
datadir ?= ${prefix}/share
|
||||||
|
pkglibdir ?= ${libdir}/dracut
|
||||||
|
sysconfdir ?= ${prefix}/etc
|
||||||
|
bindir ?= ${prefix}/bin
|
||||||
|
mandir ?= ${prefix}/share/man
|
||||||
|
CFLAGS ?= -O2 -g -Wall
|
||||||
|
CFLAGS += -std=gnu99 -D_FILE_OFFSET_BITS=64 -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 $(KMOD_CFLAGS)
|
||||||
|
bashcompletiondir ?= ${datadir}/bash-completion/completions
|
||||||
|
pkgconfigdatadir ?= $(datadir)/pkgconfig
|
||||||
|
|
||||||
.PHONY: install clean archive rpm testimage test all check
|
man1pages = lsinitrd.1
|
||||||
|
|
||||||
install:
|
man5pages = dracut.conf.5
|
||||||
|
|
||||||
|
man7pages = dracut.cmdline.7 \
|
||||||
|
dracut.bootup.7 \
|
||||||
|
dracut.modules.7
|
||||||
|
|
||||||
|
man8pages = dracut.8 \
|
||||||
|
dracut-catimages.8 \
|
||||||
|
mkinitrd.8 \
|
||||||
|
mkinitrd-suse.8 \
|
||||||
|
modules.d/98dracut-systemd/dracut-cmdline.service.8 \
|
||||||
|
modules.d/98dracut-systemd/dracut-initqueue.service.8 \
|
||||||
|
modules.d/98dracut-systemd/dracut-mount.service.8 \
|
||||||
|
modules.d/98dracut-systemd/dracut-shutdown.service.8 \
|
||||||
|
modules.d/98dracut-systemd/dracut-pre-mount.service.8 \
|
||||||
|
modules.d/98dracut-systemd/dracut-pre-pivot.service.8 \
|
||||||
|
modules.d/98dracut-systemd/dracut-pre-trigger.service.8 \
|
||||||
|
modules.d/98dracut-systemd/dracut-pre-udev.service.8
|
||||||
|
|
||||||
|
manpages = $(man1pages) $(man5pages) $(man7pages) $(man8pages)
|
||||||
|
|
||||||
|
.PHONY: install clean archive rpm srpm testimage test all check AUTHORS doc dracut-version.sh
|
||||||
|
|
||||||
|
all: dracut-version.sh dracut.pc dracut-install skipcpio/skipcpio
|
||||||
|
|
||||||
|
DRACUT_INSTALL_OBJECTS = \
|
||||||
|
install/dracut-install.o \
|
||||||
|
install/hashmap.o\
|
||||||
|
install/log.o \
|
||||||
|
install/strv.o \
|
||||||
|
install/util.o
|
||||||
|
|
||||||
|
# deps generated with gcc -MM
|
||||||
|
install/dracut-install.o: install/dracut-install.c install/log.h install/macro.h \
|
||||||
|
install/hashmap.h install/util.h
|
||||||
|
install/hashmap.o: install/hashmap.c install/util.h install/macro.h install/log.h \
|
||||||
|
install/hashmap.h
|
||||||
|
install/log.o: install/log.c install/log.h install/macro.h install/util.h
|
||||||
|
install/util.o: install/util.c install/util.h install/macro.h install/log.h
|
||||||
|
install/strv.o: install/strv.c install/strv.h install/util.h install/macro.h install/log.h
|
||||||
|
|
||||||
|
install/dracut-install: $(DRACUT_INSTALL_OBJECTS)
|
||||||
|
$(CC) $(LDFLAGS) -o $@ $(DRACUT_INSTALL_OBJECTS) $(LDLIBS) $(KMOD_LIBS)
|
||||||
|
|
||||||
|
logtee: logtee.c
|
||||||
|
$(CC) $(LDFLAGS) -o $@ $<
|
||||||
|
|
||||||
|
dracut-install: install/dracut-install
|
||||||
|
ln -fs $< $@
|
||||||
|
|
||||||
|
SKIPCPIO_OBJECTS= \
|
||||||
|
skipcpio/skipcpio.o
|
||||||
|
|
||||||
|
skipcpio/skipcpio.o: skipcpio/skipcpio.c
|
||||||
|
skipcpio/skipcpio: skipcpio/skipcpio.o
|
||||||
|
|
||||||
|
indent:
|
||||||
|
indent -i8 -nut -br -linux -l120 install/dracut-install.c
|
||||||
|
indent -i8 -nut -br -linux -l120 skipcpio/skipcpio.c
|
||||||
|
|
||||||
|
doc: $(manpages) dracut.html
|
||||||
|
|
||||||
|
ifneq ($(enable_documentation),no)
|
||||||
|
all: doc
|
||||||
|
endif
|
||||||
|
|
||||||
|
%: %.xml
|
||||||
|
@rm -f -- "$@"
|
||||||
|
xsltproc -o "$@" -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
|
||||||
|
|
||||||
|
%.xml: %.asc
|
||||||
|
@rm -f -- "$@"
|
||||||
|
asciidoc -d manpage -b docbook -o "$@" $<
|
||||||
|
|
||||||
|
dracut.8: dracut.usage.asc dracut.8.asc
|
||||||
|
|
||||||
|
dracut.html: dracut.asc $(manpages) dracut.css dracut.usage.asc
|
||||||
|
@rm -f -- dracut.xml
|
||||||
|
asciidoc -a numbered -d book -b docbook -o dracut.xml dracut.asc
|
||||||
|
@rm -f -- dracut.html
|
||||||
|
xsltproc -o dracut.html --xinclude -nonet \
|
||||||
|
--stringparam custom.css.source dracut.css \
|
||||||
|
--stringparam generate.css.header 1 \
|
||||||
|
http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl dracut.xml
|
||||||
|
@rm -f -- dracut.xml
|
||||||
|
|
||||||
|
dracut.pc: Makefile.inc Makefile
|
||||||
|
@echo "Name: dracut" > dracut.pc
|
||||||
|
@echo "Description: dracut" >> dracut.pc
|
||||||
|
@echo "Version: $(VERSION)$(GITVERSION)" >> dracut.pc
|
||||||
|
@echo "dracutdir=$(pkglibdir)" >> dracut.pc
|
||||||
|
@echo "dracutmodulesdir=$(pkglibdir)/modules.d" >> dracut.pc
|
||||||
|
@echo "dracutconfdir=$(pkglibdir)/dracut.conf.d" >> dracut.pc
|
||||||
|
|
||||||
|
install: all
|
||||||
mkdir -p $(DESTDIR)$(pkglibdir)
|
mkdir -p $(DESTDIR)$(pkglibdir)
|
||||||
mkdir -p $(DESTDIR)$(sbindir)
|
mkdir -p $(DESTDIR)$(bindir)
|
||||||
mkdir -p $(DESTDIR)$(sysconfdir)
|
mkdir -p $(DESTDIR)$(sysconfdir)
|
||||||
mkdir -p $(DESTDIR)$(pkglibdir)/modules.d
|
mkdir -p $(DESTDIR)$(pkglibdir)/modules.d
|
||||||
mkdir -p $(DESTDIR)$(mandir)/man8
|
mkdir -p $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(mandir)/man5 $(DESTDIR)$(mandir)/man7 $(DESTDIR)$(mandir)/man8
|
||||||
install -m 0755 dracut $(DESTDIR)$(sbindir)/dracut
|
install -m 0755 dracut.sh $(DESTDIR)$(bindir)/dracut
|
||||||
install -m 0755 dracut-gencmdline $(DESTDIR)$(sbindir)/dracut-gencmdline
|
install -m 0755 dracut-catimages.sh $(DESTDIR)$(bindir)/dracut-catimages
|
||||||
install -m 0755 dracut-catimages $(DESTDIR)$(sbindir)/dracut-catimages
|
install -m 0755 mkinitrd-dracut.sh $(DESTDIR)$(bindir)/mkinitrd
|
||||||
install -m 0755 modules.d/99base/switch_root $(DESTDIR)$(sbindir)/switch_root
|
install -m 0755 lsinitrd.sh $(DESTDIR)$(bindir)/lsinitrd
|
||||||
install -m 0644 dracut.conf $(DESTDIR)$(sysconfdir)/dracut.conf
|
install -m 0644 dracut.conf $(DESTDIR)$(sysconfdir)/dracut.conf
|
||||||
install -m 0755 dracut-functions $(DESTDIR)$(pkglibdir)/dracut-functions
|
mkdir -p $(DESTDIR)$(sysconfdir)/dracut.conf.d
|
||||||
|
mkdir -p $(DESTDIR)$(pkglibdir)/dracut.conf.d
|
||||||
|
install -m 0755 dracut-init.sh $(DESTDIR)$(pkglibdir)/dracut-init.sh
|
||||||
|
install -m 0755 dracut-functions.sh $(DESTDIR)$(pkglibdir)/dracut-functions.sh
|
||||||
|
install -m 0755 dracut-version.sh $(DESTDIR)$(pkglibdir)/dracut-version.sh
|
||||||
|
ln -fs dracut-functions.sh $(DESTDIR)$(pkglibdir)/dracut-functions
|
||||||
|
install -m 0755 dracut-logger.sh $(DESTDIR)$(pkglibdir)/dracut-logger.sh
|
||||||
|
install -m 0755 dracut-initramfs-restore.sh $(DESTDIR)$(pkglibdir)/dracut-initramfs-restore
|
||||||
cp -arx modules.d $(DESTDIR)$(pkglibdir)
|
cp -arx modules.d $(DESTDIR)$(pkglibdir)
|
||||||
install -m 0644 dracut.8 $(DESTDIR)$(mandir)/man8
|
ifneq ($(enable_documentation),no)
|
||||||
rm $(DESTDIR)$(pkglibdir)/modules.d/99base/switch_root
|
for i in $(man1pages); do install -m 0644 $$i $(DESTDIR)$(mandir)/man1/$${i##*/}; done
|
||||||
|
for i in $(man5pages); do install -m 0644 $$i $(DESTDIR)$(mandir)/man5/$${i##*/}; done
|
||||||
|
for i in $(man7pages); do install -m 0644 $$i $(DESTDIR)$(mandir)/man7/$${i##*/}; done
|
||||||
|
for i in $(man8pages); do install -m 0644 $$i $(DESTDIR)$(mandir)/man8/$${i##*/}; done
|
||||||
|
ln -fs dracut.cmdline.7 $(DESTDIR)$(mandir)/man7/dracut.kernel.7
|
||||||
|
endif
|
||||||
|
if [ -n "$(systemdsystemunitdir)" ]; then \
|
||||||
|
mkdir -p $(DESTDIR)$(systemdsystemunitdir); \
|
||||||
|
ln -srf $(DESTDIR)$(pkglibdir)/modules.d/98dracut-systemd/dracut-shutdown.service $(DESTDIR)$(systemdsystemunitdir)/dracut-shutdown.service; \
|
||||||
|
mkdir -p $(DESTDIR)$(systemdsystemunitdir)/sysinit.target.wants; \
|
||||||
|
ln -s ../dracut-shutdown.service \
|
||||||
|
$(DESTDIR)$(systemdsystemunitdir)/sysinit.target.wants/dracut-shutdown.service; \
|
||||||
|
mkdir -p $(DESTDIR)$(systemdsystemunitdir)/initrd.target.wants; \
|
||||||
|
for i in \
|
||||||
|
dracut-cmdline.service \
|
||||||
|
dracut-initqueue.service \
|
||||||
|
dracut-mount.service \
|
||||||
|
dracut-pre-mount.service \
|
||||||
|
dracut-pre-pivot.service \
|
||||||
|
dracut-pre-trigger.service \
|
||||||
|
dracut-pre-udev.service \
|
||||||
|
; do \
|
||||||
|
ln -srf $(DESTDIR)$(pkglibdir)/modules.d/98dracut-systemd/$$i $(DESTDIR)$(systemdsystemunitdir); \
|
||||||
|
ln -s ../$$i \
|
||||||
|
$(DESTDIR)$(systemdsystemunitdir)/initrd.target.wants/$$i; \
|
||||||
|
done \
|
||||||
|
fi
|
||||||
|
if [ -f install/dracut-install ]; then \
|
||||||
|
install -m 0755 install/dracut-install $(DESTDIR)$(pkglibdir)/dracut-install; \
|
||||||
|
fi
|
||||||
|
if [ -f skipcpio/skipcpio ]; then \
|
||||||
|
install -m 0755 skipcpio/skipcpio $(DESTDIR)$(pkglibdir)/skipcpio; \
|
||||||
|
fi
|
||||||
|
mkdir -p $(DESTDIR)${prefix}/lib/kernel/install.d
|
||||||
|
install -m 0755 50-dracut.install $(DESTDIR)${prefix}/lib/kernel/install.d/50-dracut.install
|
||||||
|
install -m 0755 51-dracut-rescue.install $(DESTDIR)${prefix}/lib/kernel/install.d/51-dracut-rescue.install
|
||||||
|
mkdir -p $(DESTDIR)${bashcompletiondir}
|
||||||
|
install -m 0644 dracut-bash-completion.sh $(DESTDIR)${bashcompletiondir}/dracut
|
||||||
|
install -m 0644 lsinitrd-bash-completion.sh $(DESTDIR)${bashcompletiondir}/lsinitrd
|
||||||
|
mkdir -p $(DESTDIR)${pkgconfigdatadir}
|
||||||
|
install -m 0644 dracut.pc $(DESTDIR)${pkgconfigdatadir}/dracut.pc
|
||||||
|
|
||||||
|
dracut-version.sh:
|
||||||
|
@rm -f dracut-version.sh
|
||||||
|
@echo "DRACUT_VERSION=$(VERSION)$(GITVERSION)" > dracut-version.sh
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *~
|
$(RM) *~
|
||||||
rm -f modules.d/99base/switch_root
|
$(RM) */*~
|
||||||
rm -f test-*.img
|
$(RM) */*/*~
|
||||||
rm -f dracut-*.rpm dracut-*.tar.bz2
|
$(RM) $(manpages:%=%.xml) dracut.xml
|
||||||
make -C test clean
|
$(RM) test-*.img
|
||||||
|
$(RM) dracut-*.rpm dracut-*.tar.bz2 dracut-*.tar.xz
|
||||||
|
$(RM) dracut-version.sh
|
||||||
|
$(RM) dracut-install install/dracut-install $(DRACUT_INSTALL_OBJECTS)
|
||||||
|
$(RM) skipcpio/skipcpio $(SKIPCPIO_OBJECTS)
|
||||||
|
$(RM) $(manpages) dracut.html
|
||||||
|
$(MAKE) -C test clean
|
||||||
|
|
||||||
archive: dracut-$(VERSION)-$(GITVERSION).tar.bz2
|
dist: dracut-$(VERSION).tar.xz
|
||||||
|
|
||||||
dist: dracut-$(VERSION).tar.bz2
|
dracut-$(VERSION).tar.xz: doc syncheck
|
||||||
|
@echo "DRACUT_VERSION=$(VERSION)" > dracut-version.sh
|
||||||
|
git archive --format=tar $(VERSION) --prefix=dracut-$(VERSION)/ > dracut-$(VERSION).tar
|
||||||
|
mkdir -p dracut-$(VERSION)
|
||||||
|
for i in $(manpages) dracut.html dracut-version.sh; do [ "$${i%/*}" != "$$i" ] && mkdir -p "dracut-$(VERSION)/$${i%/*}"; cp "$$i" "dracut-$(VERSION)/$$i"; done
|
||||||
|
tar --owner=root --group=root -rf dracut-$(VERSION).tar $$(find dracut-$(VERSION) -type f)
|
||||||
|
rm -fr -- dracut-$(VERSION).tar.xz dracut-$(VERSION)
|
||||||
|
xz -9 dracut-$(VERSION).tar
|
||||||
|
rm -f -- dracut-$(VERSION).tar
|
||||||
|
|
||||||
dracut-$(VERSION).tar.bz2:
|
rpm: dracut-$(VERSION).tar.xz syncheck
|
||||||
git archive --format=tar $(VERSION) --prefix=dracut-$(VERSION)/ |bzip2 > dracut-$(VERSION).tar.bz2
|
rpmbuild=$$(mktemp -d -t rpmbuild-dracut.XXXXXX); src=$$(pwd); \
|
||||||
|
cp dracut-$(VERSION).tar.xz "$$rpmbuild"; \
|
||||||
|
LC_MESSAGES=C $$src/git2spec.pl $(VERSION) "$$rpmbuild" < dracut.spec > $$rpmbuild/dracut.spec; \
|
||||||
|
(cd "$$rpmbuild"; \
|
||||||
|
wget https://www.gnu.org/licenses/lgpl-2.1.txt; \
|
||||||
|
rpmbuild --define "_topdir $$PWD" --define "_sourcedir $$PWD" \
|
||||||
|
--define "_specdir $$PWD" --define "_srcrpmdir $$PWD" \
|
||||||
|
--define "_rpmdir $$PWD" -ba dracut.spec; ) && \
|
||||||
|
( mv "$$rpmbuild"/{,$$(arch)/}*.rpm $(DESTDIR).; rm -fr -- "$$rpmbuild"; ls $(DESTDIR)*.rpm )
|
||||||
|
|
||||||
dracut-$(VERSION)-$(GITVERSION).tar.bz2:
|
srpm: dracut-$(VERSION).tar.xz syncheck
|
||||||
git archive --format=tar HEAD --prefix=dracut-$(VERSION)-$(GITVERSION)/ |bzip2 > dracut-$(VERSION)-$(GITVERSION).tar.bz2
|
rpmbuild=$$(mktemp -d -t rpmbuild-dracut.XXXXXX); src=$$(pwd); \
|
||||||
|
cp dracut-$(VERSION).tar.xz "$$rpmbuild"; \
|
||||||
|
LC_MESSAGES=C $$src/git2spec.pl $(VERSION) "$$rpmbuild" < dracut.spec > $$rpmbuild/dracut.spec; \
|
||||||
|
(cd "$$rpmbuild"; \
|
||||||
|
[ -f $$src/lgpl-2.1.txt ] && cp $$src/lgpl-2.1.txt . || wget https://www.gnu.org/licenses/lgpl-2.1.txt; \
|
||||||
|
rpmbuild --define "_topdir $$PWD" --define "_sourcedir $$PWD" \
|
||||||
|
--define "_specdir $$PWD" --define "_srcrpmdir $$PWD" \
|
||||||
|
--define "_rpmdir $$PWD" -bs dracut.spec; ) && \
|
||||||
|
( mv "$$rpmbuild"/*.src.rpm $(DESTDIR).; rm -fr -- "$$rpmbuild"; ls $(DESTDIR)*.rpm )
|
||||||
|
|
||||||
|
syncheck:
|
||||||
rpm: clean dracut-$(VERSION).tar.bz2
|
@ret=0;for i in dracut-initramfs-restore.sh modules.d/*/*.sh; do \
|
||||||
rpmbuild --define "_topdir $$PWD" --define "_sourcedir $$PWD" --define "_specdir $$PWD" --define "_srcrpmdir $$PWD" --define "_rpmdir $$PWD" -ba dracut.spec
|
[ "$${i##*/}" = "module-setup.sh" ] && continue; \
|
||||||
rm -fr BUILD BUILDROOT
|
read line < "$$i"; [ "$${line#*bash*}" != "$$line" ] && continue; \
|
||||||
|
[ $$V ] && echo "posix syntax check: $$i"; bash --posix -n "$$i" ; ret=$$(($$ret+$$?)); \
|
||||||
gitrpm: dracut-$(VERSION)-$(GITVERSION).tar.bz2
|
[ $$V ] && echo "checking for [[: $$i"; if grep -Fq '[[ ' "$$i" ; then ret=$$(($$ret+1)); echo "$$i contains [["; fi; \
|
||||||
rpmbuild --define "_topdir $$PWD" --define "_sourcedir $$PWD" --define "_specdir $$PWD" --define "_srcrpmdir $$PWD" --define "_rpmdir $$PWD" --define "gittag $(GITVERSION)" -ba dracut.spec
|
[ $$V ] && echo "checking for echo -n: $$i"; if grep -Fq 'echo -n ' "$$i" ; then ret=$$(($$ret+1)); echo "$$i contains echo -n"; fi \
|
||||||
rm -fr BUILD BUILDROOT
|
|
||||||
|
|
||||||
check: all
|
|
||||||
@ret=0;for i in modules.d/99base/init modules.d/*/*.sh; do \
|
|
||||||
dash -n "$$i" ; ret=$$(($$ret+$$?)); \
|
|
||||||
done;exit $$ret
|
done;exit $$ret
|
||||||
make -C test check
|
@ret=0;for i in *.sh mkinitrd-dracut.sh modules.d/*/*.sh \
|
||||||
|
modules.d/*/module-setup.sh; do \
|
||||||
|
[ $$V ] && echo "bash syntax check: $$i"; bash -n "$$i" ; ret=$$(($$ret+$$?)); \
|
||||||
|
done;exit $$ret
|
||||||
|
|
||||||
|
check: all syncheck rpm
|
||||||
|
@[ "$$EUID" == "0" ] || { echo "'check' must be run as root! Please use 'sudo'."; exit 1; }
|
||||||
|
@$(MAKE) -C test check
|
||||||
|
|
||||||
testimage: all
|
testimage: all
|
||||||
./dracut -l -a debug -f test-$(shell uname -r).img $(shell uname -r)
|
./dracut.sh -N -l -a debug -f test-$(shell uname -r).img $(shell uname -r)
|
||||||
|
@echo wrote test-$(shell uname -r).img
|
||||||
|
|
||||||
|
debugtestimage: all
|
||||||
|
./dracut.sh --debug -l -a debug -f test-$(shell uname -r).img $(shell uname -r)
|
||||||
@echo wrote test-$(shell uname -r).img
|
@echo wrote test-$(shell uname -r).img
|
||||||
|
|
||||||
testimages: all
|
testimages: all
|
||||||
./dracut -l -a debug --kernel-only -f test-kernel-$(shell uname -r).img $(shell uname -r)
|
./dracut.sh -l -a debug --kernel-only -f test-kernel-$(shell uname -r).img $(shell uname -r)
|
||||||
@echo wrote test-$(shell uname -r).img
|
@echo wrote test-$(shell uname -r).img
|
||||||
./dracut -l -a debug --no-kernel -f test-dracut.img $(shell uname -r)
|
./dracut.sh -l -a debug --no-kernel -f test-dracut.img $(shell uname -r)
|
||||||
@echo wrote test-dracut.img
|
@echo wrote test-dracut.img
|
||||||
|
|
||||||
|
debughostimage: all
|
||||||
|
./dracut.sh --debug -H -l -f test-$(shell uname -r).img $(shell uname -r)
|
||||||
|
@echo wrote test-$(shell uname -r).img
|
||||||
|
|
||||||
|
hostimage: all
|
||||||
|
./dracut.sh -H -l -f test-$(shell uname -r).img $(shell uname -r)
|
||||||
|
@echo wrote test-$(shell uname -r).img
|
||||||
|
|
||||||
|
efi: all
|
||||||
|
./dracut.sh --uefi -H -l -f linux-$(shell uname -r).efi $(shell uname -r)
|
||||||
|
@echo wrote linux-$(shell uname -r).efi
|
||||||
|
|
||||||
|
AUTHORS:
|
||||||
|
git shortlog --numbered --summary -e |while read a rest || [ -n "$$rest" ]; do echo $$rest;done > AUTHORS
|
||||||
|
|
||||||
|
dracut.html.sign: dracut-$(VERSION).tar.xz dracut.html
|
||||||
|
gpg-sign-all dracut-$(VERSION).tar.xz dracut.html
|
||||||
|
|
||||||
|
upload: dracut.html.sign
|
||||||
|
kup put dracut-$(VERSION).tar.xz dracut-$(VERSION).tar.sign /pub/linux/utils/boot/dracut/
|
||||||
|
kup put dracut.html dracut.html.sign /pub/linux/utils/boot/dracut/
|
||||||
|
|||||||
38
PKGBUILD
Normal file
38
PKGBUILD
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
pkgname=dracut-git
|
||||||
|
pkgver=1
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc="Initramfs generation utility"
|
||||||
|
arch=('i686' 'x86_64')
|
||||||
|
url="https://dracut.wiki.kernel.org/"
|
||||||
|
license=('GPL')
|
||||||
|
conflicts=('dracut' 'mkinitcpio')
|
||||||
|
provides=('dracut=9999' 'mkinitcpio=9999')
|
||||||
|
depends=('bash')
|
||||||
|
optdepends=('cryptsetup' 'lvm2')
|
||||||
|
makedepends=('libxslt')
|
||||||
|
backup=(etc/dracut.conf)
|
||||||
|
source=()
|
||||||
|
md5sums=()
|
||||||
|
|
||||||
|
# out of tree builds disallowed for this PKGFILE
|
||||||
|
BUILDDIR="${PWD}"
|
||||||
|
PKGDEST="${PWD}"
|
||||||
|
SRCDEST=""
|
||||||
|
SRCPKGDEST=""
|
||||||
|
LOGDEST=""
|
||||||
|
|
||||||
|
pkgver() {
|
||||||
|
cd ..
|
||||||
|
desc="$(git describe)"
|
||||||
|
printf "%s.%s.%s" ${desc//-/ }
|
||||||
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd ..
|
||||||
|
make sysconfdir=/etc || return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd ..
|
||||||
|
make DESTDIR="${pkgdir}" sysconfdir=/etc install || return 1
|
||||||
|
}
|
||||||
62
README
62
README
@@ -1,9 +1,10 @@
|
|||||||
Dracut
|
dracut
|
||||||
------
|
------
|
||||||
Dracut is a new initramfs infrastructure.
|
dracut is an event driven initramfs infrastructure.
|
||||||
|
|
||||||
Information about the initial goals and aims can be found at
|
dracut (the tool) is used to create an initramfs image by copying tools
|
||||||
https://fedoraproject.org/wiki/Initrdrewrite
|
and files from an installed system and combining it with the
|
||||||
|
dracut framework, usually found in /usr/lib/dracut/modules.d.
|
||||||
|
|
||||||
Unlike existing initramfs's, this is an attempt at having as little as
|
Unlike existing initramfs's, this is an attempt at having as little as
|
||||||
possible hard-coded into the initramfs as possible. The initramfs has
|
possible hard-coded into the initramfs as possible. The initramfs has
|
||||||
@@ -19,17 +20,19 @@ we'll grow some hooks for running arbitrary commands in the flow of
|
|||||||
the script, but it's worth trying to resist the urge as much as we can
|
the script, but it's worth trying to resist the urge as much as we can
|
||||||
as hooks are guaranteed to be the path to slow-down.
|
as hooks are guaranteed to be the path to slow-down.
|
||||||
|
|
||||||
Most of the initrd generation functionality in dracut is provided by a bunch
|
Most of the initramfs generation functionality in dracut is provided by a bunch
|
||||||
of generator modules that are sourced by the main dracut script to install
|
of generator modules that are sourced by the main dracut script to install
|
||||||
specific functionality into the initrd. They live in the modules.d subdirectory,
|
specific functionality into the initramfs. They live in the modules.d
|
||||||
and use functionality provided by dracut-functions to do their work.
|
subdirectory, and use functionality provided by dracut-functions to do their
|
||||||
|
work.
|
||||||
|
|
||||||
Some general rules for writing modules:
|
Some general rules for writing modules:
|
||||||
* Use one of the inst family of functions to actually install files
|
* Use one of the inst family of functions to actually install files
|
||||||
on to the initrd. They handle mangling the pathnames and (for binaries,
|
on to the initramfs. They handle mangling the pathnames and (for binaries,
|
||||||
scripts, and kernel modules) installing dependencies as appropriate so
|
scripts, and kernel modules) installing dependencies as appropriate so
|
||||||
you do not have to.
|
you do not have to.
|
||||||
* Scripts that end up on the initrd should be POSIX compliant. dracut
|
* Scripts that end up on the initramfs should be POSIX compliant. dracut
|
||||||
will try to use /bin/dash as /bin/sh for the initrd if it is available,
|
will try to use /bin/dash as /bin/sh for the initramfs if it is available,
|
||||||
so you should install it on your system -- dash aims for strict POSIX
|
so you should install it on your system -- dash aims for strict POSIX
|
||||||
compliance to the extent possible.
|
compliance to the extent possible.
|
||||||
* Hooks MUST be POSIX compliant -- they are sourced by the init script,
|
* Hooks MUST be POSIX compliant -- they are sourced by the init script,
|
||||||
@@ -49,27 +52,34 @@ possible. Every distribution has their own tool here and it's not
|
|||||||
something which is really interesting to have separate across them.
|
something which is really interesting to have separate across them.
|
||||||
So contributions to help decrease the distro-dependencies are welcome.
|
So contributions to help decrease the distro-dependencies are welcome.
|
||||||
|
|
||||||
Currently dracut lives on sourceforge.
|
Currently dracut lives on github.com and kernel.org.
|
||||||
|
|
||||||
Project Page:
|
The tarballs can be found here:
|
||||||
https://sourceforge.net/projects/dracut/
|
http://www.kernel.org/pub/linux/utils/boot/dracut/
|
||||||
|
ftp://ftp.kernel.org/pub/linux/utils/boot/dracut/
|
||||||
|
|
||||||
Drop Harald Hoyer <harald@redhat.com> a mail, if you want to help with
|
Git:
|
||||||
the documentation, git access, etc.
|
git://git.kernel.org/pub/scm/boot/dracut/dracut.git
|
||||||
|
http://git.kernel.org/pub/scm/boot/dracut/dracut.git
|
||||||
|
https://git.kernel.org/pub/scm/boot/dracut/dracut.git
|
||||||
|
|
||||||
Git Repository:
|
git@github.com:dracutdevs/dracut.git
|
||||||
http://dracut.git.sourceforge.net/
|
|
||||||
git://dracut.git.sourceforge.net/gitroot/dracut
|
|
||||||
|
|
||||||
Trac Instance:
|
Git Web:
|
||||||
http://apps.sourceforge.net/trac/dracut/
|
https://github.com/dracutdevs/dracut.git
|
||||||
|
|
||||||
The git tree can be found at
|
http://git.kernel.org/?p=boot/dracut/dracut.git
|
||||||
git://dracut.git.sourceforge.net/gitroot/dracut for now. See the TODO
|
|
||||||
file for things which still need to be done and HACKING for some
|
Project Documentation:
|
||||||
instructions on how to get started. There is also a mailing list that
|
http://www.kernel.org/pub/linux/utils/boot/dracut/dracut.html
|
||||||
is being used for the discussion -- initramfs@vger.kernel.org. It is
|
|
||||||
a typical vger list, send mail to majordomo@vger.kernel.org with body
|
Project Wiki:
|
||||||
|
http://dracut.wiki.kernel.org
|
||||||
|
|
||||||
|
See the TODO file for things which still need to be done and HACKING for
|
||||||
|
some instructions on how to get started. There is also a mailing list
|
||||||
|
that is being used for the discussion -- initramfs@vger.kernel.org.
|
||||||
|
It is a typical vger list, send mail to majordomo@vger.kernel.org with body
|
||||||
of 'subscribe initramfs email@host.com'
|
of 'subscribe initramfs email@host.com'
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -8,3 +8,6 @@ To build a generic initramfs, you have to install the following software package
|
|||||||
* mdadm
|
* mdadm
|
||||||
* net-tools iproute
|
* net-tools iproute
|
||||||
|
|
||||||
|
Generic initramfs'es are huge (usually over 10 megs in size uncompressed), but
|
||||||
|
should be able to automatically boot any bootable configuration with appropriate
|
||||||
|
boot flags (root device, network configuration information, etc.)
|
||||||
@@ -1,6 +1,3 @@
|
|||||||
dracut-kernel is used to pull in all firmware files to build an initrd with
|
"dracut --kernel-only" is to build an initrd with only kernel modules and firmware files.
|
||||||
only kernel modules and firmware files.
|
"dracut --kernel-only" only executes "installkernel" in the modules subdirectories.
|
||||||
|
|
||||||
dracut --kernel-only only executes "installkernel" in the modules
|
|
||||||
subdirectories.
|
|
||||||
|
|
||||||
|
|||||||
31
README.md
Normal file
31
README.md
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
# dracut - master branch
|
||||||
|
|
||||||
|
dracut is an initramfs infrastructure.
|
||||||
|
|
||||||
|
## Travis
|
||||||
|
|
||||||
|
[](https://travis-ci.org/dracutdevs/dracut)
|
||||||
|
|
||||||
|
## CentOS CI
|
||||||
|
|
||||||
|
[](https://ci.centos.org/job/dracut-push-master/)
|
||||||
|
|
||||||
|
- Test 01: [](https://ci.centos.org/job/dracut-matrix-master/TESTS=01,label=dracut-ci-slave01/)
|
||||||
|
- Test 02: [](https://ci.centos.org/job/dracut-matrix-master/TESTS=02,label=dracut-ci-slave01/)
|
||||||
|
- Test 03: [](https://ci.centos.org/job/dracut-matrix-master/TESTS=03,label=dracut-ci-slave01/)
|
||||||
|
- Test 04: [](https://ci.centos.org/job/dracut-matrix-master/TESTS=04,label=dracut-ci-slave01/)
|
||||||
|
- Test 10: [](https://ci.centos.org/job/dracut-matrix-master/TESTS=10,label=dracut-ci-slave01/)
|
||||||
|
- Test 11: [](https://ci.centos.org/job/dracut-matrix-master/TESTS=11,label=dracut-ci-slave01/)
|
||||||
|
- Test 12: [](https://ci.centos.org/job/dracut-matrix-master/TESTS=12,label=dracut-ci-slave01/)
|
||||||
|
- Test 13: [](https://ci.centos.org/job/dracut-matrix-master/TESTS=13,label=dracut-ci-slave01/)
|
||||||
|
- Test 14: [](https://ci.centos.org/job/dracut-matrix-master/TESTS=14,label=dracut-ci-slave01/)
|
||||||
|
- Test 15: [](https://ci.centos.org/job/dracut-matrix-master/TESTS=15,label=dracut-ci-slave01/)
|
||||||
|
- Test 16: [](https://ci.centos.org/job/dracut-matrix-master/TESTS=16,label=dracut-ci-slave01/)
|
||||||
|
- 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 60: [](https://ci.centos.org/job/dracut-matrix-master/TESTS=60,label=dracut-ci-slave01/)
|
||||||
|
- Test 70: [](https://ci.centos.org/job/dracut-matrix-master/TESTS=70,label=dracut-ci-slave01/)
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
Most of the functionality that dracut implements are actually implemented
|
Most of the functionality that dracut implements are actually implemented
|
||||||
by dracut modules. Dracut modules live in modules.d, and have the following
|
by dracut modules. dracut modules live in modules.d, and have the following
|
||||||
structure:
|
structure:
|
||||||
|
|
||||||
dracut_install_dir/modules.d/
|
dracut_install_dir/modules.d/
|
||||||
00modname/
|
00modname/
|
||||||
install
|
module-setup.sh
|
||||||
check
|
check
|
||||||
<other files as needed by the hook>
|
<other files as needed by the hook>
|
||||||
|
|
||||||
@@ -18,16 +18,27 @@ dracut_install_dir/modules.d/
|
|||||||
module override or modify the functionality of a generic module
|
module override or modify the functionality of a generic module
|
||||||
without having to patch the more generic module.
|
without having to patch the more generic module.
|
||||||
|
|
||||||
install: dracut sources this script to install the functionality that a
|
module-setup.sh:
|
||||||
|
dracut sources this script to install the functionality that a
|
||||||
module implements onto the initrd. For the most part, this amounts
|
module implements onto the initrd. For the most part, this amounts
|
||||||
to copying files from the host system onto the initrd in a controlled
|
to copying files from the host system onto the initrd in a controlled
|
||||||
manner. dracut supplies several install functions that are
|
manner.
|
||||||
|
|
||||||
|
install():
|
||||||
|
This function of module-setup.sh is called to install all
|
||||||
|
non-kernel files. dracut supplies several install functions that are
|
||||||
specialized for different file types. Browse through dracut-functions
|
specialized for different file types. Browse through dracut-functions
|
||||||
fore more details. dracut also provides a $moddir variable if you
|
fore more details. dracut also provides a $moddir variable if you
|
||||||
need to install a file from the module directory, such as an initrd
|
need to install a file from the module directory, such as an initrd
|
||||||
hook, a udev rule, or a specialized executable.
|
hook, a udev rule, or a specialized executable.
|
||||||
|
|
||||||
check: Dracut calls this program to check and see if a module can be installed
|
installkernel():
|
||||||
|
This function of module-setup.sh is called to install all
|
||||||
|
kernel related files.
|
||||||
|
|
||||||
|
|
||||||
|
check():
|
||||||
|
dracut calls this function to check and see if a module can be installed
|
||||||
on the initrd.
|
on the initrd.
|
||||||
|
|
||||||
When called without options, check should check to make sure that
|
When called without options, check should check to make sure that
|
||||||
@@ -35,17 +46,19 @@ check: Dracut calls this program to check and see if a module can be installed
|
|||||||
are present. It should exit with a 0 if they are, and a 1 if they are
|
are present. It should exit with a 0 if they are, and a 1 if they are
|
||||||
not.
|
not.
|
||||||
|
|
||||||
When called with -H, it should perform the same check that it would
|
When called with $hostonly set, it should perform the same check
|
||||||
without any options, and it should also check to see if the
|
that it would without it set, and it should also check to see if the
|
||||||
functionality the module implements is being used on the host system.
|
functionality the module implements is being used on the host system.
|
||||||
For example, if this module handles installing support for LUKS
|
For example, if this module handles installing support for LUKS
|
||||||
encrypted volumes, it should return 0 if all the tools to handle
|
encrypted volumes, it should return 0 if all the tools to handle
|
||||||
encrpted volumes are available and the host system has the root
|
encrpted volumes are available and the host system has the root
|
||||||
partition on an encrypted volume, 1 otherwise.
|
partition on an encrypted volume, 1 otherwise.
|
||||||
|
|
||||||
Check may take additional options in the future.
|
depends():
|
||||||
We will most likely grow a module dependency checking system in the
|
This function should output a list of dracut modules
|
||||||
near future, and check will need to handle a -d option when we do.
|
that it relies upon. An example would be the nfs and iscsi modules,
|
||||||
|
which rely on the network module to detect and configure network
|
||||||
|
interfaces.
|
||||||
|
|
||||||
Any other files in the module will not be touched by dracut directly.
|
Any other files in the module will not be touched by dracut directly.
|
||||||
|
|
||||||
@@ -57,39 +70,42 @@ HOOKS
|
|||||||
|
|
||||||
init has the following hook points to inject scripts:
|
init has the following hook points to inject scripts:
|
||||||
|
|
||||||
/cmdline/*.sh
|
/lib/dracut/hooks/cmdline/*.sh
|
||||||
scripts for command line parsing
|
scripts for command line parsing
|
||||||
|
|
||||||
/pre-udev/*.sh
|
/lib/dracut/hooks/pre-udev/*.sh
|
||||||
scripts to run before udev is started
|
scripts to run before udev is started
|
||||||
|
|
||||||
/pre-trigger/*.sh
|
/lib/dracut/hooks/pre-trigger/*.sh
|
||||||
scripts to run before the main udev trigger is pulled
|
scripts to run before the main udev trigger is pulled
|
||||||
|
|
||||||
/initqueue/*.sh
|
/lib/dracut/hooks/initqueue/*.sh
|
||||||
runs in parallel to the udev trigger
|
runs in parallel to the udev trigger
|
||||||
Udev events can add scripts here with /sbin/initqueue.
|
Udev events can add scripts here with /sbin/initqueue.
|
||||||
If /sbin/initqueue is called with the "--onetime" option, the script
|
If /sbin/initqueue is called with the "--onetime" option, the script
|
||||||
will be removed after it was run.
|
will be removed after it was run.
|
||||||
If /initqueue/work is created and udev >= 143 then this loop can
|
If /lib/dracut/hooks/initqueue/work is created and udev >= 143 then
|
||||||
process the jobs in parallel to the udevtrigger.
|
this loop can process the jobs in parallel to the udevtrigger.
|
||||||
If the udev queue is empty and no root device is found or no root
|
If the udev queue is empty and no root device is found or no root
|
||||||
filesystem was mounted, the user will be dropped to a shell after
|
filesystem was mounted, the user will be dropped to a shell after
|
||||||
a timeout.
|
a timeout.
|
||||||
Scripts can remove themselves from the initqueue by "rm $job".
|
Scripts can remove themselves from the initqueue by "rm $job".
|
||||||
|
|
||||||
/pre-mount/*.sh
|
/lib/dracut/hooks/pre-mount/*.sh
|
||||||
scripts to run before the root filesystem is mounted
|
scripts to run before the root filesystem is mounted
|
||||||
Network filesystems like NFS that do not use device files are an
|
Network filesystems like NFS that do not use device files are an
|
||||||
exception. Root can be mounted already at this point.
|
exception. Root can be mounted already at this point.
|
||||||
|
|
||||||
/mount/*.sh
|
/lib/dracut/hooks/mount/*.sh
|
||||||
scripts to mount the root filesystem
|
scripts to mount the root filesystem
|
||||||
If the udev queue is empty and no root device is found or no root
|
If the udev queue is empty and no root device is found or no root
|
||||||
filesystem was mounted, the user will be dropped to a shell after
|
filesystem was mounted, the user will be dropped to a shell after
|
||||||
a timeout.
|
a timeout.
|
||||||
|
|
||||||
/pre-pivot/*.sh
|
/lib/dracut/hooks/pre-pivot/*.sh
|
||||||
|
scripts to run before latter initramfs cleanups
|
||||||
|
|
||||||
|
/lib/dracut/hooks/cleanup/*.sh
|
||||||
scripts to run before the real init is executed and the initramfs
|
scripts to run before the real init is executed and the initramfs
|
||||||
disappears
|
disappears
|
||||||
All processes started before should be killed here.
|
All processes started before should be killed here.
|
||||||
|
|||||||
45
README.testsuite
Normal file
45
README.testsuite
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
For the testsuite to work, you will have to install at least the following software packages:
|
||||||
|
dash \
|
||||||
|
asciidoc \
|
||||||
|
mdadm \
|
||||||
|
lvm2 \
|
||||||
|
dmraid \
|
||||||
|
cryptsetup \
|
||||||
|
nfs-utils \
|
||||||
|
nbd \
|
||||||
|
dhcp-server \
|
||||||
|
scsi-target-utils \
|
||||||
|
iscsi-initiator-utils \
|
||||||
|
strace \
|
||||||
|
syslinux \
|
||||||
|
python-imgcreate \
|
||||||
|
genisoimage \
|
||||||
|
btrfs-progs \
|
||||||
|
kmod-devel \
|
||||||
|
gcc \
|
||||||
|
bzip2 \
|
||||||
|
xz \
|
||||||
|
tar \
|
||||||
|
wget \
|
||||||
|
rpm-build \
|
||||||
|
${NULL}
|
||||||
|
|
||||||
|
TEST-04-FULL-SYSTEMD: systemd >= 187
|
||||||
|
|
||||||
|
How to run the testsuite:
|
||||||
|
|
||||||
|
$ sudo make clean check
|
||||||
|
|
||||||
|
in verbose mode:
|
||||||
|
$ sudo make V=1 clean check
|
||||||
|
|
||||||
|
only specific test:
|
||||||
|
$ sudo make TESTS="01 20 40" clean check
|
||||||
|
only runs the 01, 20 and 40 tests.
|
||||||
|
|
||||||
|
debug a specific test case:
|
||||||
|
$ cd TEST-01-BASIC
|
||||||
|
$ sudo make clean setup run
|
||||||
|
... change some kernel parameters ...
|
||||||
|
$ sudo make run
|
||||||
|
to run the test without doing the setup
|
||||||
51
TODO
51
TODO
@@ -1,2 +1,51 @@
|
|||||||
See https://sourceforge.net/apps/trac/dracut/wiki/TODO
|
Current TODO list, broken into things which are relevant for the
|
||||||
|
initramfs itself (/init et al) vs the generator.
|
||||||
|
A lot of things are/should be marked with "FIXME" in the code.
|
||||||
|
|
||||||
|
Items are ordered in priority.
|
||||||
|
|
||||||
|
INITRAMFS TODO
|
||||||
|
|
||||||
|
- search domain string
|
||||||
|
- allow dual stack configuration (IPv4, IPv6) for the same interface
|
||||||
|
- "bind-mount" kernel drivers in real root for the rescue image,
|
||||||
|
if the real root does not have any kernel modules for this kernel
|
||||||
|
https://bugzilla.redhat.com/show_bug.cgi?id=1046510
|
||||||
|
- use info and warn prefix
|
||||||
|
- generate systemd unit dracut-initramfs-restore in /run/systemd dynamically
|
||||||
|
- put "root=" parsing hooks in separate hook dir
|
||||||
|
- call "root=" parsing hooks after getting new rootpath from dhcp
|
||||||
|
- put mount hook in main initqueue loop / careful about resume!
|
||||||
|
- the hard-coded list of udev rules that we care about is kind of lame.
|
||||||
|
- panic fallback
|
||||||
|
- progress indication for fsck https://bugzilla.redhat.com/show_bug.cgi?id=827118
|
||||||
|
- domain, searchdomain https://bugzilla.redhat.com/show_bug.cgi?id=840778
|
||||||
|
- probably fix "--include" https://bugzilla.redhat.com/show_bug.cgi?id=849338
|
||||||
|
|
||||||
|
GENERATOR TODO
|
||||||
|
|
||||||
|
- report errors on missing files in check()
|
||||||
|
- remove wait for swap devs, if no "resume=" is given on the kernel command line
|
||||||
|
- remove wait for swap devs, if the "resume" dracut module is not included (omitted)
|
||||||
|
- add presets (predefined set of modules)
|
||||||
|
- add interpreter/plugin-scripts to be sourced at the beginning or end (can use dracut-functions)
|
||||||
|
- add mechanism for module specific command line options
|
||||||
|
- pkg-config integration, to make it easy for other packages to use us.
|
||||||
|
- default module specification could use some work
|
||||||
|
- udev rule copying, as mentioned above, is a bit too hard-coded
|
||||||
|
|
||||||
|
- dracut-install parse LD_SHOW_AUXV="" AT_PLATFORM for lib install
|
||||||
|
|
||||||
|
CODE TODO
|
||||||
|
|
||||||
|
- document more functions
|
||||||
|
- make function vars local, and prefix with "_"
|
||||||
|
|
||||||
|
Future Enhancement Requests
|
||||||
|
|
||||||
|
- run ssh server to enter crypto password or perform debugging (supported by debian)
|
||||||
|
- https://bugzilla.redhat.com/show_bug.cgi?id=524727 - dracut + encrypted root + networking
|
||||||
|
|
||||||
|
- lsinitrd --print-cmdline
|
||||||
|
- dracut --print-cmdline error if additional arguments
|
||||||
|
- library for cmdline
|
||||||
|
|||||||
85
configure
vendored
Executable file
85
configure
vendored
Executable file
@@ -0,0 +1,85 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# We don't support srcdir != builddir
|
||||||
|
echo \#buildapi-variable-no-builddir >/dev/null
|
||||||
|
|
||||||
|
prefix=/usr
|
||||||
|
|
||||||
|
enable_documentation=yes
|
||||||
|
|
||||||
|
PKG_CONFIG="${PKG_CONFIG:-pkg-config}"
|
||||||
|
|
||||||
|
# Little helper function for reading args from the commandline.
|
||||||
|
# it automatically handles -a b and -a=b variants, and returns 1 if
|
||||||
|
# we need to shift $3.
|
||||||
|
read_arg() {
|
||||||
|
# $1 = arg name
|
||||||
|
# $2 = arg value
|
||||||
|
# $3 = arg parameter
|
||||||
|
local rematch='^[^=]*=(.*)$'
|
||||||
|
if [[ $2 =~ $rematch ]]; then
|
||||||
|
read "$1" <<< "${BASH_REMATCH[1]}"
|
||||||
|
else
|
||||||
|
read "$1" <<< "$3"
|
||||||
|
# There is no way to shift our callers args, so
|
||||||
|
# return 1 to indicate they should do it instead.
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
while (($# > 0)); do
|
||||||
|
case "${1%%=*}" in
|
||||||
|
--prefix) read_arg prefix "$@" || shift;;
|
||||||
|
--libdir) read_arg libdir "$@" || shift;;
|
||||||
|
--datadir) read_arg datadir "$@" || shift;;
|
||||||
|
--sysconfdir) read_arg sysconfdir "$@" || shift;;
|
||||||
|
--sbindir) read_arg sbindir "$@" || shift;;
|
||||||
|
--mandir) read_arg mandir "$@" || shift;;
|
||||||
|
--disable-documentation) enable_documentation=no;;
|
||||||
|
--program-prefix) read_arg programprefix "$@" || shift;;
|
||||||
|
--exec-prefix) read_arg execprefix "$@" || shift;;
|
||||||
|
--bindir) read_arg bindir "$@" || shift;;
|
||||||
|
--includedir) read_arg includedir "$@" || shift;;
|
||||||
|
--libexecdir) read_arg libexecdir "$@" || shift;;
|
||||||
|
--localstatedir) read_arg localstatedir "$@" || shift;;
|
||||||
|
--sharedstatedir) read_arg sharedstatedir "$@" || shift;;
|
||||||
|
--infodir) read_arg infodir "$@" || shift;;
|
||||||
|
--systemdsystemunitdir) read_arg systemdsystemunitdir "$@" || shift;;
|
||||||
|
--bashcompletiondir) read_arg bashcompletiondir "$@" || shift;;
|
||||||
|
*) echo "Ignoring unknown option '$1'";;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if ! ${PKG_CONFIG} --exists --print-errors " libkmod >= 23 "; then
|
||||||
|
echo "dracut needs pkg-config and libkmod >= 23." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat > Makefile.inc.$$ <<EOF
|
||||||
|
prefix ?= ${prefix}
|
||||||
|
libdir ?= ${libdir:-${prefix}/lib}
|
||||||
|
datadir ?= ${datadir:-${prefix}/share}
|
||||||
|
sysconfdir ?= ${sysconfdir:-${prefix}/etc}
|
||||||
|
sbindir ?= ${sbindir:-${prefix}/sbin}
|
||||||
|
mandir ?= ${mandir:-${prefix}/share/man}
|
||||||
|
enable_documentation ?= ${enable_documentation:-yes}
|
||||||
|
bindir ?= ${bindir:-${prefix}/bin}
|
||||||
|
KMOD_CFLAGS ?= $(${PKG_CONFIG} --cflags " libkmod >= 23 ")
|
||||||
|
KMOD_LIBS ?= $(${PKG_CONFIG} --libs " libkmod >= 23 ")
|
||||||
|
EOF
|
||||||
|
|
||||||
|
{
|
||||||
|
[[ $programprefix ]] && echo "programprefix ?= ${programprefix}"
|
||||||
|
[[ $execprefix ]] && echo "execprefix ?= ${execprefix}"
|
||||||
|
[[ $includedir ]] && echo "includedir ?= ${includedir}"
|
||||||
|
[[ $libexecdir ]] && echo "libexecdir ?= ${libexecdir}"
|
||||||
|
[[ $localstatedir ]] && echo "localstatedir ?= ${localstatedir}"
|
||||||
|
[[ $sharedstatedir ]] && echo "sharedstatedir ?= ${sharedstatedir}"
|
||||||
|
[[ $infodir ]] && echo "infodir ?= ${infodir}"
|
||||||
|
[[ $systemdsystemunitdir ]] && echo "systemdsystemunitdir ?= ${systemdsystemunitdir}"
|
||||||
|
[[ $bashcompletiondir ]] && echo "bashcompletiondir ?= ${bashcompletiondir}"
|
||||||
|
} >> Makefile.inc.$$
|
||||||
|
|
||||||
|
mv Makefile.inc.$$ Makefile.inc
|
||||||
246
dracut
246
dracut
@@ -1,246 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
#
|
|
||||||
# Generator script for a dracut initramfs
|
|
||||||
# Tries to retain some degree of compatibility with the command line
|
|
||||||
# of the various mkinitrd implementations out there
|
|
||||||
#
|
|
||||||
|
|
||||||
# Copyright 2005-2009 Red Hat, Inc. All rights reserved.
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; either version 2 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
|
|
||||||
|
|
||||||
usage() {
|
|
||||||
# 80x25 linebreak here ^
|
|
||||||
echo "Usage: $0 [OPTION]... <initramfs> <kernel-version>
|
|
||||||
Creates initial ramdisk images for preloading modules
|
|
||||||
|
|
||||||
-f, --force Overwrite existing initramfs file.
|
|
||||||
-m, --modules [LIST] Specify a space-separated list of dracut modules to
|
|
||||||
call when building the initramfs. Modules are located
|
|
||||||
in /usr/share/dracut/modules.d.
|
|
||||||
-o, --omit [LIST] Omit a space-separated list of dracut modules.
|
|
||||||
-a, --add [LIST] Add a space-separated list of dracut modules.
|
|
||||||
-d, --drivers [LIST] Specify a space-separated list of kernel modules to
|
|
||||||
include in the initramfs.
|
|
||||||
-k, --kmoddir [DIR] Specify the directory, where to look for kernel
|
|
||||||
modules
|
|
||||||
--fwdir [DIR] Specify additional directories, where to look for
|
|
||||||
firmwares, separated by :
|
|
||||||
--kernel-only Only install kernel drivers and firmware files
|
|
||||||
--no-kernel Do not install kernel drivers and firmware files
|
|
||||||
--strip Strip binaries in the initramfs (default)
|
|
||||||
--nostrip Do not strip binaries in the initramfs
|
|
||||||
-h, --help This message
|
|
||||||
--debug Output debug information of the build process
|
|
||||||
-v, --verbose Verbose output during the build process
|
|
||||||
-c, --conf [FILE] Specify configuration file to use.
|
|
||||||
Default: /etc/dracut.conf
|
|
||||||
-l, --local Local mode. Use modules from the current working
|
|
||||||
directory instead of the system-wide installed in
|
|
||||||
/usr/share/dracut/modules.d.
|
|
||||||
Useful when running dracut from a git checkout.
|
|
||||||
-H, --hostonly Host-Only mode: Install only what is needed for
|
|
||||||
booting the local host instead of a generic host.
|
|
||||||
-i, --include [SOURCE] [TARGET]
|
|
||||||
Include the files in the SOURCE directory into the
|
|
||||||
Target directory in the final initramfs.
|
|
||||||
-I, --install [LIST] Install the space separated list of files into the
|
|
||||||
initramfs.
|
|
||||||
"
|
|
||||||
}
|
|
||||||
|
|
||||||
while (($# > 0)); do
|
|
||||||
case $1 in
|
|
||||||
-f|--force) force=yes;;
|
|
||||||
-m|--modules) dracutmodules_l="$2"; shift;;
|
|
||||||
-o|--omit) omit_dracutmodules_l="$2"; shift;;
|
|
||||||
-a|--add) add_dracutmodules_l="$2"; shift;;
|
|
||||||
-d|--drivers) drivers_l="$2"; shift;;
|
|
||||||
-k|--kmoddir) drivers_dir_l="$2"; shift;;
|
|
||||||
--fwdir) fw_dir_l="$2"; shift;;
|
|
||||||
--kernel-only) kernel_only="yes"; nokernel="no";;
|
|
||||||
--no-kernel) kernel_only="no"; no_kernel="yes";;
|
|
||||||
--strip) do_strip_l="yes";;
|
|
||||||
--nostrip) do_strip_l="no";;
|
|
||||||
-h|--help) usage; exit 1 ;;
|
|
||||||
--debug) debug="yes";;
|
|
||||||
-v|--verbose) beverbose="yes";;
|
|
||||||
-c|--conf) conffile="$2"; shift;;
|
|
||||||
-l|--local) allowlocal="yes" ;;
|
|
||||||
-H|--hostonly) hostonly="-h" ;;
|
|
||||||
-i|--include) include_src="$2"; include_target="$3"; shift 2;;
|
|
||||||
-I|--install) install_items="$2"; shift;;
|
|
||||||
-*) printf "\nUnknown option: %s\n\n" "$1" >&2; usage; exit 1;;
|
|
||||||
*) break ;;
|
|
||||||
esac
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
|
|
||||||
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$PATH
|
|
||||||
|
|
||||||
[[ $debug ]] && {
|
|
||||||
export PS4='${BASH_SOURCE}@${LINENO}(${FUNCNAME[0]}): ';
|
|
||||||
set -x
|
|
||||||
}
|
|
||||||
|
|
||||||
# if we were not passed a config file, try the default one
|
|
||||||
[[ ! -f $conffile ]] && conffile="/etc/dracut.conf"
|
|
||||||
|
|
||||||
# source our config file
|
|
||||||
[[ -f $conffile ]] && . "$conffile"
|
|
||||||
|
|
||||||
# these options override the stuff in the config file
|
|
||||||
[[ $dracutmodules_l ]] && dracutmodules=$dracutmodules_l
|
|
||||||
[[ $omit_dracutmodules_l ]] && omit_dracutmodules=$omit_dracutmodules_l
|
|
||||||
[[ $add_dracutmodules_l ]] && add_dracutmodules="$add_dracutmodules $add_dracutmodules_l"
|
|
||||||
[[ $drivers_l ]] && drivers=$drivers_l
|
|
||||||
[[ $drivers_dir_l ]] && drivers_dir=$drivers_dir_l
|
|
||||||
[[ $fw_dir_l ]] && fw_dir=$fw_dir_l
|
|
||||||
[[ $do_strip_l ]] && do_strip=$do_strip_l
|
|
||||||
[[ $dracutbasedir ]] || dracutbasedir=/usr/share/dracut
|
|
||||||
[[ $fw_dir ]] || fw_dir=/lib/firmware
|
|
||||||
[[ $do_strip ]] || do_strip=yes
|
|
||||||
|
|
||||||
[[ $allowlocal && -f "$(dirname $0)/dracut-functions" ]] && dsrc="$(dirname $0)" || dsrc=$dracutbasedir
|
|
||||||
|
|
||||||
if [[ -f $dsrc/dracut-functions ]]; then
|
|
||||||
. $dsrc/dracut-functions
|
|
||||||
else
|
|
||||||
echo "Cannot find $dsrc/dracut-functions. Are you running from a git checkout?"
|
|
||||||
echo "Try passing -l as an argument to $0"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
dracutfunctions=$dsrc/dracut-functions
|
|
||||||
export dracutfunctions
|
|
||||||
|
|
||||||
# This is kinda legacy -- eventually it should go away.
|
|
||||||
case $dracutmodules in
|
|
||||||
""|auto) dracutmodules="all" ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
[[ $2 ]] && kernel=$2 || kernel=$(uname -r)
|
|
||||||
[[ $1 ]] && outfile=$(readlink -f $1) || outfile="/boot/initrd-$kernel.img"
|
|
||||||
|
|
||||||
srcmods="/lib/modules/$kernel/"
|
|
||||||
[ -n "$drivers_dir" ] && srcmods="$drivers_dir"
|
|
||||||
export srcmods
|
|
||||||
|
|
||||||
if [[ -f $outfile && ! $force ]]; then
|
|
||||||
echo "Will not override existing initramfs ($outfile) without --force"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
hookdirs="cmdline pre-udev pre-trigger netroot pre-mount pre-pivot mount emergency"
|
|
||||||
|
|
||||||
readonly initdir=$(mktemp -d -t initramfs.XXXXXX)
|
|
||||||
trap 'rm -rf "$initdir"' 0 # clean up after ourselves no matter how we die.
|
|
||||||
|
|
||||||
# Need to be able to have non-root users read stuff (rpcbind etc)
|
|
||||||
chmod 755 "$initdir"
|
|
||||||
|
|
||||||
export initdir hookdirs dsrc dracutmodules drivers \
|
|
||||||
fw_dir drivers_dir debug beverbose no_kernel kernel_only
|
|
||||||
|
|
||||||
if [[ "$kernel_only" != "yes" ]]; then
|
|
||||||
# Create some directory structure first
|
|
||||||
for d in bin sbin usr/bin usr/sbin usr/lib etc proc sys sysroot tmp dev/pts var/run; do
|
|
||||||
mkdir -p "$initdir/$d";
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
# check all our modules to see if they should be sourced.
|
|
||||||
# This builds a list of modules that we will install next.
|
|
||||||
check_modules
|
|
||||||
|
|
||||||
#source our modules.
|
|
||||||
for moddir in "$dsrc/modules.d"/[0-9][0-9]*; do
|
|
||||||
mod=${moddir##*/}; mod=${mod#[0-9][0-9]}
|
|
||||||
if strstr "$mods_to_load" " $mod "; then
|
|
||||||
if [[ "$kernel_only" = "yes" ]]; then
|
|
||||||
[[ -x "$moddir/installkernel" ]] && . "$moddir/installkernel"
|
|
||||||
else
|
|
||||||
. "$moddir/install"
|
|
||||||
if [[ "$no_kernel" != "yes" && -x "$moddir/installkernel" ]]; then
|
|
||||||
. "$moddir/installkernel"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
mods_to_load=${mods_to_load// $mod /}
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
unset moddir
|
|
||||||
echo $mods_to_load
|
|
||||||
|
|
||||||
## final stuff that has to happen
|
|
||||||
|
|
||||||
# generate module dependencies for the initrd
|
|
||||||
if [ -d "$initdir/lib/modules/$kernel" ]; then
|
|
||||||
if ! depmod -a -b "$initdir" $kernel; then
|
|
||||||
echo "\"depmod -a $kernel\" failed."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# make sure that library links are correct and up to date
|
|
||||||
ldconfig -n -r "$initdir" /lib* /usr/lib*
|
|
||||||
|
|
||||||
if [[ $include_src && $include_target ]]; then
|
|
||||||
mkdir -p "$initdir$include_target"
|
|
||||||
cp -a -t "$initdir$include_target" "$include_src"/*
|
|
||||||
fi
|
|
||||||
|
|
||||||
for item in $install_items; do
|
|
||||||
dracut_install "$item"
|
|
||||||
done
|
|
||||||
unset item
|
|
||||||
|
|
||||||
[[ "$beverbose" = "yes" ]] && (du -c "$initdir" | sort -n)
|
|
||||||
|
|
||||||
# strip binaries
|
|
||||||
if [ "$do_strip" = "yes" ] ; then
|
|
||||||
for p in strip objdump sed grep find; do
|
|
||||||
if ! which $p >/dev/null 2>&1; then
|
|
||||||
derror "Could not find '$p'. You should run $0 with '--nostrip'."
|
|
||||||
do_strip=no
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$do_strip" = "yes" ] ; then
|
|
||||||
for f in $(find "$initdir" -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) -exec file {} \; |
|
|
||||||
grep -v ' shared object,' |
|
|
||||||
sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped/\1/p'); do
|
|
||||||
dinfo "Stripping $f"
|
|
||||||
strip -g "$f" || :
|
|
||||||
#
|
|
||||||
# FIXME: only strip -g for now
|
|
||||||
#
|
|
||||||
#strip -g --strip-unneeded "$f" || :
|
|
||||||
#note="-R .note"
|
|
||||||
#if objdump -h $f | grep '^[ ]*[0-9]*[ ]*.note[ ]' -A 1 | \
|
|
||||||
# grep -q ALLOC; then
|
|
||||||
# note=
|
|
||||||
#fi
|
|
||||||
#strip -R .comment $note "$f" || :
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
( cd "$initdir"; find . |cpio -H newc -o |gzip -9 > "$outfile"; )
|
|
||||||
|
|
||||||
[[ "$beverbose" = "yes" ]] && ls -lh "$outfile"
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
|
|
||||||
78
dracut-bash-completion.sh
Normal file
78
dracut-bash-completion.sh
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
#
|
||||||
|
# Copyright 2013 Red Hat, Inc. All rights reserved.
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
|
||||||
|
__contains_word () {
|
||||||
|
local word=$1; shift
|
||||||
|
for w in $*; do [[ $w = $word ]] && return 0; done
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
_dracut() {
|
||||||
|
local field_vals= cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
|
||||||
|
local -A OPTS=(
|
||||||
|
[STANDALONE]='-f -v -q -l -H -h -M -N
|
||||||
|
--ro-mnt --force --kernel-only --no-kernel --strip --nostrip
|
||||||
|
--hardlink --nohardlink --noprefix --mdadmconf --nomdadmconf
|
||||||
|
--lvmconf --nolvmconf --debug --profile --verbose --quiet
|
||||||
|
--local --hostonly --no-hostonly --fstab --help --bzip2 --lzma
|
||||||
|
--xz --zstd --no-compress --gzip --list-modules --show-modules --keep
|
||||||
|
--printsize --regenerate-all --noimageifnotneeded --early-microcode
|
||||||
|
--no-early-microcode --print-cmdline --reproducible --uefi'
|
||||||
|
|
||||||
|
[ARG]='-a -m -o -d -I -k -c -L --kver --add --force-add --add-drivers
|
||||||
|
--omit-drivers --modules --omit --drivers --filesystems --install
|
||||||
|
--fwdir --libdirs --fscks --add-fstab --mount --device --nofscks
|
||||||
|
--kmoddir --conf --confdir --tmpdir --stdlog --compress --prefix
|
||||||
|
--kernel-cmdline --sshkey --persistent-policy --install-optional
|
||||||
|
--loginstall --uefi-stub --kernel-image
|
||||||
|
'
|
||||||
|
)
|
||||||
|
|
||||||
|
if __contains_word "$prev" ${OPTS[ARG]}; then
|
||||||
|
case $prev in
|
||||||
|
--kmoddir|-k|--fwdir|--confdir|--tmpdir)
|
||||||
|
comps=$(compgen -d -- "$cur")
|
||||||
|
compopt -o filenames
|
||||||
|
;;
|
||||||
|
-c|--conf|--sshkey|--add-fstab|--add-device|-I|--install|--install-optional)
|
||||||
|
comps=$(compgen -f -- "$cur")
|
||||||
|
compopt -o filenames
|
||||||
|
;;
|
||||||
|
-a|-m|-o|--add|--modules|--omit)
|
||||||
|
comps=$(dracut --list-modules 2>/dev/null)
|
||||||
|
;;
|
||||||
|
--persistent-policy)
|
||||||
|
comps=$(cd /dev/disk/; echo *)
|
||||||
|
;;
|
||||||
|
--kver)
|
||||||
|
comps=$(cd /lib/modules; echo [0-9]*)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $cur = -* ]]; then
|
||||||
|
COMPREPLY=( $(compgen -W '${OPTS[*]}' -- "$cur") )
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
complete -F _dracut dracut
|
||||||
59
dracut-catimages.8.asc
Normal file
59
dracut-catimages.8.asc
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
DRACUT-CATIMAGES(8)
|
||||||
|
===================
|
||||||
|
:doctype: manpage
|
||||||
|
:man source: dracut
|
||||||
|
:man manual: dracut
|
||||||
|
|
||||||
|
NAME
|
||||||
|
----
|
||||||
|
dracut-catimages - creates initial ramdisk image by concatenating images
|
||||||
|
|
||||||
|
SYNOPSIS
|
||||||
|
--------
|
||||||
|
**dracut-catimages** [_OPTION_...] _<initramfs base image>_ [_<image>_...]
|
||||||
|
|
||||||
|
DESCRIPTION
|
||||||
|
-----------
|
||||||
|
dracut-catimages creates an initial ramdisk image by concatenating several
|
||||||
|
images from the command line and /boot/dracut/*.img
|
||||||
|
|
||||||
|
OPTIONS
|
||||||
|
-------
|
||||||
|
**-f, --force**::
|
||||||
|
overwrite existing initramfs file.
|
||||||
|
|
||||||
|
**-i, --imagedir**::
|
||||||
|
Directory with additional images to add (default: /boot/dracut/)
|
||||||
|
|
||||||
|
**-o, --overlaydir**::
|
||||||
|
Overlay directory, which contains additional files that will be used to
|
||||||
|
create an additional image
|
||||||
|
|
||||||
|
**--nooverlay**:: Do not use the overlay directory
|
||||||
|
|
||||||
|
**--noimagedir**:: Do not use the additional image directory
|
||||||
|
|
||||||
|
**-h, --help**:: display help text and exit.
|
||||||
|
|
||||||
|
**--debug**:: output debug information of the build process
|
||||||
|
|
||||||
|
**-v, --verbose**:: verbose output during the build process
|
||||||
|
|
||||||
|
FILES
|
||||||
|
-----
|
||||||
|
_/boot/dracut/*.img_::
|
||||||
|
images to work with
|
||||||
|
|
||||||
|
AUTHORS
|
||||||
|
-------
|
||||||
|
Harald Hoyer
|
||||||
|
|
||||||
|
AVAILABILITY
|
||||||
|
------------
|
||||||
|
The dracut-catimages command is part of the dracut package and is available from
|
||||||
|
link:$$https://dracut.wiki.kernel.org$$[https://dracut.wiki.kernel.org]
|
||||||
|
|
||||||
|
SEE ALSO
|
||||||
|
--------
|
||||||
|
*dracut*(8)
|
||||||
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
#!/bin/bash --norc
|
#!/bin/bash --norc
|
||||||
|
#
|
||||||
# Copyright 2009 Red Hat, Inc. All rights reserved.
|
# Copyright 2009 Red Hat, Inc. All rights reserved.
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
@@ -31,7 +31,8 @@ derror() {
|
|||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
# 80x25 linebreak here ^
|
# 80x25 linebreak here ^
|
||||||
echo "Usage: $0 [OPTION]... <initramfs> <base image> [<image>...]
|
cat << EOF
|
||||||
|
Usage: $0 [OPTION]... <initramfs> <base image> [<image>...]
|
||||||
Creates initial ramdisk image by concatenating several images from the command
|
Creates initial ramdisk image by concatenating several images from the command
|
||||||
line and /boot/dracut/
|
line and /boot/dracut/
|
||||||
|
|
||||||
@@ -45,7 +46,7 @@ line and /boot/dracut/
|
|||||||
-h, --help This message
|
-h, --help This message
|
||||||
--debug Output debug information of the build process
|
--debug Output debug information of the build process
|
||||||
-v, --verbose Verbose output during the build process
|
-v, --verbose Verbose output during the build process
|
||||||
"
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -70,7 +71,7 @@ done
|
|||||||
|
|
||||||
outfile=$1; shift
|
outfile=$1; shift
|
||||||
|
|
||||||
if [ -z "$outfile" ]; then
|
if [[ -z $outfile ]]; then
|
||||||
derror "No output file specified."
|
derror "No output file specified."
|
||||||
usage
|
usage
|
||||||
exit 1
|
exit 1
|
||||||
@@ -78,45 +79,48 @@ fi
|
|||||||
|
|
||||||
baseimage=$1; shift
|
baseimage=$1; shift
|
||||||
|
|
||||||
if [ -z "$baseimage" ]; then
|
if [[ -z $baseimage ]]; then
|
||||||
derror "No base image specified."
|
derror "No base image specified."
|
||||||
usage
|
usage
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f $outfile -a -z "$force" ]; then
|
if [[ -f $outfile && ! $force ]]; then
|
||||||
derror "Will not override existing initramfs ($outfile) without --force"
|
derror "Will not override existing initramfs ($outfile) without --force"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$no_imagedir" -a ! -d "$imagedir" ]; then
|
if [[ ! $no_imagedir && ! -d $imagedir ]]; then
|
||||||
derror "Image directory $overlay is not a directory"
|
derror "Image directory $overlay is not a directory"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$no_overlay" -a ! -d "$overlay" ]; then
|
if [[ ! $no_overlay && ! -d $overlay ]]; then
|
||||||
derror "Overlay $overlay is not a directory"
|
derror "Overlay $overlay is not a directory"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$no_overlay" ]; then
|
if [[ ! $no_overlay ]]; then
|
||||||
ofile="$imagedir/90-overlay.img"
|
ofile="$imagedir/90-overlay.img"
|
||||||
dinfo "Creating image $ofile from directory $overlay"
|
dinfo "Creating image $ofile from directory $overlay"
|
||||||
( cd "$overlay"; find . |cpio --quiet -H newc -o |gzip -9 > "$ofile"; )
|
type pigz &>/dev/null && gzip=pigz || gzip=gzip
|
||||||
|
( cd "$overlay"; find . |cpio --quiet -H newc -o |$gzip -9 > "$ofile"; )
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$no_imagedir" ]; then
|
if [[ ! $no_imagedir ]]; then
|
||||||
images=$(for i in $imagedir/*.img;do [ -f $i ] || continue; echo $i; done)
|
for i in "$imagedir/"*.img; do
|
||||||
|
[[ -f $i ]] && images+=("$i")
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
images="$images $@"
|
images+=($@)
|
||||||
|
|
||||||
dinfo "Using base image $baseimage"
|
dinfo "Using base image $baseimage"
|
||||||
cat $baseimage > $outfile
|
cat -- "$baseimage" > "$outfile"
|
||||||
|
|
||||||
for i in $images; do
|
for i in "${images[@]}"; do
|
||||||
dinfo "Appending $i"
|
dinfo "Appending $i"
|
||||||
cat $i >> $outfile
|
cat -- "$i" >> "$outfile"
|
||||||
done
|
done
|
||||||
|
|
||||||
dinfo "Created $outfile"
|
dinfo "Created $outfile"
|
||||||
345
dracut-functions
345
dracut-functions
@@ -1,345 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
#
|
|
||||||
# functions used by dracut and other tools.
|
|
||||||
#
|
|
||||||
# Copyright 2005-2009 Red Hat, Inc. All rights reserved.
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; either version 2 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
|
|
||||||
IF_RTLD=""
|
|
||||||
IF_dynamic=""
|
|
||||||
|
|
||||||
# Generic substring function. If $2 is in $1, return 0.
|
|
||||||
strstr() { [[ ! ${1#*$2*} = $1 ]]; }
|
|
||||||
|
|
||||||
# Log initrd creation.
|
|
||||||
if ! [[ $dracutlogfile ]]; then
|
|
||||||
[[ $dsrc = /usr/share/dracut ]] && \
|
|
||||||
dracutlogfile=/var/log/dracut.log || \
|
|
||||||
dracutlogfile=/tmp/dracut.log
|
|
||||||
[[ -w "$dracutlogfile" ]] || dracutlogfile=/tmp/dracut.log
|
|
||||||
>"$dracutlogfile"
|
|
||||||
fi
|
|
||||||
|
|
||||||
dwarning() {
|
|
||||||
echo "W: $@" >&2
|
|
||||||
[[ -w "$dracutlogfile" ]] && echo "W: $@" >>"$dracutlogfile"
|
|
||||||
}
|
|
||||||
|
|
||||||
dinfo() {
|
|
||||||
[[ $beverbose ]] && echo "I: $@" >&2
|
|
||||||
[[ -w "$dracutlogfile" ]] && echo "I: $@" >>"$dracutlogfile"
|
|
||||||
}
|
|
||||||
|
|
||||||
derror() {
|
|
||||||
echo "E: $@" >&2
|
|
||||||
[[ -w "$dracutlogfile" ]] && echo "E: $@" >>"$dracutlogfile"
|
|
||||||
}
|
|
||||||
|
|
||||||
# $1 = file to copy to ramdisk
|
|
||||||
# $2 (optional) Name for the file on the ramdisk
|
|
||||||
# Location of the image dir is assumed to be $initdir
|
|
||||||
# We never overwrite the target if it exists.
|
|
||||||
inst_simple() {
|
|
||||||
local src target
|
|
||||||
[[ -f $1 ]] || return 1
|
|
||||||
src=$1 target="${initdir}${2:-$1}"
|
|
||||||
[[ -f $target ]] && return 0
|
|
||||||
mkdir -p "${target%/*}"
|
|
||||||
dinfo "Installing $src"
|
|
||||||
cp -fL "$src" "$target"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Same as above, but specialzed to handle dynamic libraries.
|
|
||||||
# It handles making symlinks according to how the original library
|
|
||||||
# is referenced.
|
|
||||||
inst_library() {
|
|
||||||
local src=$1 dest=${2:-$1}
|
|
||||||
[[ -f $initdir$dest ]] && return 0
|
|
||||||
if [[ -L $src ]]; then
|
|
||||||
reallib="$(readlink -f "$src")"
|
|
||||||
lib=${src##*/}
|
|
||||||
inst_simple "$reallib" "$reallib"
|
|
||||||
mkdir -p ${initdir}${dest%/*}
|
|
||||||
(cd "${initdir}${dest%/*}" && ln -s "$reallib" "$lib")
|
|
||||||
else
|
|
||||||
inst_simple "$src" "$dest"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# find a binary. If we were not passed the full path directly,
|
|
||||||
# search in the usual places to find the binary.
|
|
||||||
find_binary() {
|
|
||||||
local binpath="/bin /sbin /usr/bin /usr/sbin" p
|
|
||||||
[[ -x $1 ]] && { echo $1; return 0; }
|
|
||||||
for p in $binpath; do
|
|
||||||
[[ -x $p/$1 ]] && { echo "$p/$1"; return 0; }
|
|
||||||
done
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
# Same as above, but specialized to install binary executables.
|
|
||||||
# Install binary executable, and all shared library dependencies, if any.
|
|
||||||
inst_binary() {
|
|
||||||
local bin target
|
|
||||||
bin=$(find_binary "$1") || return 1
|
|
||||||
target=${2:-$bin}
|
|
||||||
local LDSO NAME IO FILE ADDR I1 n f TLIBDIR
|
|
||||||
[[ -f $initdir$target ]] && return 0
|
|
||||||
# I love bash!
|
|
||||||
ldd $bin 2>/dev/null | while read line; do
|
|
||||||
[[ $line = 'not a dynamic executable' ]] && return 1
|
|
||||||
if [[ $line =~ not\ found ]]; then
|
|
||||||
derror "Missing a shared library required by $bin."
|
|
||||||
derror "Run \"ldd $bin\" to find out what it is."
|
|
||||||
derror "dracut cannot create an initrd."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
so_regex='([^ ]*/lib[^/]*/[^ ]*\.so[^ ]*)'
|
|
||||||
[[ $line =~ $so_regex ]] || continue
|
|
||||||
FILE=${BASH_REMATCH[1]}
|
|
||||||
[[ -f ${initdir}$FILE ]] && continue
|
|
||||||
# see if we are loading an optimized version of a shared lib.
|
|
||||||
lib_regex='^(/lib[^/]*).*'
|
|
||||||
if [[ $FILE =~ $lib_regex ]]; then
|
|
||||||
TLIBDIR=${BASH_REMATCH[1]}
|
|
||||||
BASE="${FILE##*/}"
|
|
||||||
# prefer nosegneg libs, then unoptimized ones.
|
|
||||||
for f in "$TLIBDIR/i686/nosegneg" "$TLIBDIR"; do
|
|
||||||
[[ -f $f/$BASE ]] || continue
|
|
||||||
FILE="$f/$BASE"
|
|
||||||
break
|
|
||||||
done
|
|
||||||
inst_library "$FILE" "$TLIBDIR/$BASE"
|
|
||||||
IF_dynamic="yes"
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
inst_library "$FILE"
|
|
||||||
done
|
|
||||||
inst_simple "$bin" "$target"
|
|
||||||
}
|
|
||||||
|
|
||||||
# same as above, except for shell scripts.
|
|
||||||
# If your shell script does not start with shebang, it is not a shell script.
|
|
||||||
inst_script() {
|
|
||||||
[[ -f $1 ]] || return 1
|
|
||||||
local line
|
|
||||||
read -r -n 80 line <"$1"
|
|
||||||
# If debug is set, clean unprintable chars to prevent messing up the term
|
|
||||||
[[ $debug ]] && line=$(echo -n "$line" | tr -c -d '[:print:][:space:]')
|
|
||||||
shebang_regex='(#! *)(/[^ ]+).*'
|
|
||||||
[[ $line =~ $shebang_regex ]] || return 1
|
|
||||||
inst "${BASH_REMATCH[2]}" && inst_simple "$@"
|
|
||||||
}
|
|
||||||
|
|
||||||
# same as above, but specialized for symlinks
|
|
||||||
inst_symlink() {
|
|
||||||
local src=$1 target=$initdir${2:-$1} realsrc
|
|
||||||
[[ -L $1 ]] || return 1
|
|
||||||
[[ -L $target ]] && return 0
|
|
||||||
realsrc=$(readlink -f "$src")
|
|
||||||
[[ $realsrc = ${realsrc##*/} ]] && realsrc="${src%/*}/$realsrc"
|
|
||||||
inst "$realsrc" && ln -s "$realsrc" "$target"
|
|
||||||
}
|
|
||||||
|
|
||||||
# find a rule in the usual places.
|
|
||||||
find_rule() {
|
|
||||||
[[ -f $1 ]] && { echo "$1"; return 0; }
|
|
||||||
for r in . /lib/udev/rules.d /etc/udev/rules.d $dsrc/rules.d; do
|
|
||||||
[[ -f $r/$1 ]] && { echo "$r/$1"; return 0; }
|
|
||||||
done
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
# udev rules always get installed in the same place, so
|
|
||||||
# create a function to install them to make life simpler.
|
|
||||||
inst_rules() {
|
|
||||||
local target="/etc/udev/rules.d"
|
|
||||||
mkdir -p "$initdir/lib/udev/rules.d" "$initdir$target"
|
|
||||||
for rule in "$@"; do
|
|
||||||
rule=$(find_rule $rule) && \
|
|
||||||
inst_simple "$rule" "$target/${rule##*/}"
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
# general purpose installation function
|
|
||||||
# Same args as above.
|
|
||||||
inst() {
|
|
||||||
if (($# != 1 && $# != 2 )); then
|
|
||||||
derror "inst only takes 1 or 2 arguments"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
for x in inst_symlink inst_script inst_binary inst_simple; do
|
|
||||||
$x "$@" && return 0
|
|
||||||
done
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
# install function specialized for hooks
|
|
||||||
# $1 = type of hook, $2 = hook priority (lower runs first), $3 = hook
|
|
||||||
# All hooks should be POSIX/SuS compliant, they will be sourced by init.
|
|
||||||
inst_hook() {
|
|
||||||
if ! [[ -f $3 ]]; then
|
|
||||||
derror "Cannot install a hook ($3) that does not exist."
|
|
||||||
derror "Aborting initrd creation."
|
|
||||||
exit 1
|
|
||||||
elif ! strstr "$hookdirs" "$1"; then
|
|
||||||
derror "No such hook type $1. Aborting initrd creation."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
inst_simple "$3" "/${1}/${2}${3##*/}"
|
|
||||||
}
|
|
||||||
|
|
||||||
dracut_install() {
|
|
||||||
local optional=
|
|
||||||
while (($# > 0)); do
|
|
||||||
# Might be nice to optionally install a binary
|
|
||||||
if [ "$1" == "-o" ]; then
|
|
||||||
optional="yes"
|
|
||||||
shift
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
if inst "$1" ; then
|
|
||||||
shift
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
if [ "$optional" == "yes" ]; then
|
|
||||||
dwarning "Skipping program $1 as it cannot be found and is flagged to be optional"
|
|
||||||
shift
|
|
||||||
continue
|
|
||||||
else
|
|
||||||
derror "Failed to install $1"; exit 1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
check_module_deps() {
|
|
||||||
local moddir dep ret
|
|
||||||
# if we are already set to be loaded, we do not have to be checked again.
|
|
||||||
strstr "$mods_to_load" " $1 "
|
|
||||||
# turn a module name into a directory, if we can.
|
|
||||||
moddir=$(echo ${dsrc}/modules.d/??${1})
|
|
||||||
[[ -d $moddir && -x $moddir/install ]] || return 1
|
|
||||||
# if we do not have a check script, we are unconditionally included
|
|
||||||
if [[ -x $moddir/check ]]; then
|
|
||||||
"$moddir/check"
|
|
||||||
ret=$?
|
|
||||||
# a return value of 255 = load module only as a dependency.
|
|
||||||
((ret==0||ret==255)) || return 1
|
|
||||||
for dep in $("$moddir/check" -d); do
|
|
||||||
check_module_deps "$dep" && continue
|
|
||||||
dwarning "Dependency $mod failed."
|
|
||||||
return 1
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
mods_to_load+=" $1 "
|
|
||||||
}
|
|
||||||
|
|
||||||
should_source_module() {
|
|
||||||
local dep
|
|
||||||
[[ -x $1/install ]] || return 1
|
|
||||||
if [[ "$kernel_only" = "yes" ]]; then
|
|
||||||
[[ -x $1/installkernel ]] && return 0
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
[[ -x $1/check ]] || return 0
|
|
||||||
"$1/check" $hostonly || return 1
|
|
||||||
for dep in $("$1/check" -d); do
|
|
||||||
check_module_deps "$dep" && continue
|
|
||||||
dwarning "Cannot load $mod, dependencies failed."
|
|
||||||
return 1
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
check_modules() {
|
|
||||||
for moddir in "$dsrc/modules.d"/[0-9][0-9]*; do
|
|
||||||
local mod=${moddir##*/}; mod=${mod#[0-9][0-9]}
|
|
||||||
# If we are already scheduled to be loaded, no need to check again.
|
|
||||||
strstr "$mods_to_load" " $mod " && continue
|
|
||||||
# This should never happen, but...
|
|
||||||
[[ -d $moddir ]] || continue
|
|
||||||
[[ $dracutmodules != all ]] && ! strstr "$dracutmodules" "$mod" && \
|
|
||||||
continue
|
|
||||||
strstr "$omit_dracutmodules" "$mod" && continue
|
|
||||||
if ! strstr "$add_dracutmodules" "$mod"; then
|
|
||||||
should_source_module "$moddir" || continue
|
|
||||||
fi
|
|
||||||
mods_to_load+=" $mod "
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
# install kernel modules, and handle installing all their dependencies as well.
|
|
||||||
instmods() {
|
|
||||||
[[ "$no_kernel" = "yes" ]] && return
|
|
||||||
local mod mpargs modpath modname cmd
|
|
||||||
while (($# > 0)); do
|
|
||||||
mod=${1%.ko}
|
|
||||||
case $mod in
|
|
||||||
=*) # This introduces 2 incompatible meanings for =* arguments
|
|
||||||
# to instmods. We need to decide which one to keep.
|
|
||||||
if [ "$mod" = "=ata" -a -f $srcmods/modules.block ] ; then
|
|
||||||
instmods $mpargs $(egrep 'ata|ahci' "${srcmods}/modules.block")
|
|
||||||
elif [ -f $srcmods/modules.${mod#=} ]; then
|
|
||||||
instmods $mpargs $(cat ${srcmods}/modules.${mod#=} )
|
|
||||||
else
|
|
||||||
instmods $mpargs $(find "$srcmods" -path "*/${mod#=}/*")
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
--*) mpargs+=" $mod";;
|
|
||||||
i2o_scsi)
|
|
||||||
# Must never run this diagnostic-only module
|
|
||||||
shift; continue;
|
|
||||||
;;
|
|
||||||
*) mod=${mod##*/}
|
|
||||||
# if we are already installed, skip this module and go on
|
|
||||||
# to the next one.
|
|
||||||
[[ -f $initdir/$1 ]] && { shift; continue; }
|
|
||||||
# If we are building a host-specific initramfs and this
|
|
||||||
# module is not already loaded, move on to the next one.
|
|
||||||
[[ $hostonly ]] && ! grep -q "$mod" /proc/modules && {
|
|
||||||
shift; continue;
|
|
||||||
}
|
|
||||||
modprobe $mpargs --ignore-install --set-version $kernel -d ${srcmods%%/lib/modules/*}/ \
|
|
||||||
--show-depends $mod 2>/dev/null | \
|
|
||||||
while read cmd modpath options; do
|
|
||||||
[[ $cmd = insmod ]] || continue
|
|
||||||
modname=${modpath##*/}
|
|
||||||
modname=${modname%.ko}
|
|
||||||
if [[ ${mod/-/_} != ${modname/-/_} ]]; then
|
|
||||||
dinfo "Installing dependencies for $mod ($modpath)"
|
|
||||||
instmods $mpargs $modname
|
|
||||||
fi
|
|
||||||
inst_simple "$modpath" "/lib/modules/$kernel/${modpath##*/lib/modules/$kernel/}"
|
|
||||||
for fw in $(modinfo -k $kernel -F firmware $modpath 2>/dev/null); do
|
|
||||||
unset found
|
|
||||||
IFS=:
|
|
||||||
for fwdir in $fw_dir; do
|
|
||||||
if [ -d "$fwdir" -a -f $fwdir/$fw ]; then
|
|
||||||
inst_simple "$fwdir/$fw" "/lib/firmware/$fw"
|
|
||||||
found=yes
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if [ "$found" != "yes" ]; then
|
|
||||||
dwarning "Possible missing firmware ${fw} for module ${mod}.ko"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
done
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
# vim:ts=8:sw=4:sts=4:et
|
|
||||||
709
dracut-functions.sh
Executable file
709
dracut-functions.sh
Executable file
@@ -0,0 +1,709 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# functions used by dracut and other tools.
|
||||||
|
#
|
||||||
|
# Copyright 2005-2009 Red Hat, Inc. All rights reserved.
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
export LC_MESSAGES=C
|
||||||
|
|
||||||
|
# is_func <command>
|
||||||
|
# Check whether $1 is a function.
|
||||||
|
is_func() {
|
||||||
|
[[ "$(type -t "$1")" = "function" ]]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Generic substring function. If $2 is in $1, return 0.
|
||||||
|
strstr() { [[ $1 = *"$2"* ]]; }
|
||||||
|
# Generic glob matching function. If glob pattern $2 matches anywhere in $1, OK
|
||||||
|
strglobin() { [[ $1 = *$2* ]]; }
|
||||||
|
# Generic glob matching function. If glob pattern $2 matches all of $1, OK
|
||||||
|
strglob() { [[ $1 = $2 ]]; }
|
||||||
|
# returns OK if $1 contains literal string $2 at the beginning, and isn't empty
|
||||||
|
str_starts() { [ "${1#"$2"*}" != "$1" ]; }
|
||||||
|
# returns OK if $1 contains literal string $2 at the end, and isn't empty
|
||||||
|
str_ends() { [ "${1%*"$2"}" != "$1" ]; }
|
||||||
|
|
||||||
|
# find a binary. If we were not passed the full path directly,
|
||||||
|
# search in the usual places to find the binary.
|
||||||
|
find_binary() {
|
||||||
|
if [[ -z ${1##/*} ]]; then
|
||||||
|
if [[ -x $1 ]] || { [[ "$1" == *.so* ]] && ldd "$1" &>/dev/null; }; then
|
||||||
|
printf "%s\n" "$1"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
type -P "${1##*/}"
|
||||||
|
}
|
||||||
|
|
||||||
|
ldconfig_paths()
|
||||||
|
{
|
||||||
|
ldconfig -pN 2>/dev/null | grep -E -v '/(lib|lib64|usr/lib|usr/lib64)/[^/]*$' | sed -n 's,.* => \(.*\)/.*,\1,p' | sort | uniq
|
||||||
|
}
|
||||||
|
|
||||||
|
# Version comparision function. Assumes Linux style version scheme.
|
||||||
|
# $1 = version a
|
||||||
|
# $2 = comparision op (gt, ge, eq, le, lt, ne)
|
||||||
|
# $3 = version b
|
||||||
|
vercmp() {
|
||||||
|
local _n1=(${1//./ }) _op=$2 _n2=(${3//./ }) _i _res
|
||||||
|
|
||||||
|
for ((_i=0; ; _i++))
|
||||||
|
do
|
||||||
|
if [[ ! ${_n1[_i]}${_n2[_i]} ]]; then _res=0
|
||||||
|
elif ((${_n1[_i]:-0} > ${_n2[_i]:-0})); then _res=1
|
||||||
|
elif ((${_n1[_i]:-0} < ${_n2[_i]:-0})); then _res=2
|
||||||
|
else continue
|
||||||
|
fi
|
||||||
|
break
|
||||||
|
done
|
||||||
|
|
||||||
|
case $_op in
|
||||||
|
gt) ((_res == 1));;
|
||||||
|
ge) ((_res != 2));;
|
||||||
|
eq) ((_res == 0));;
|
||||||
|
le) ((_res != 1));;
|
||||||
|
lt) ((_res == 2));;
|
||||||
|
ne) ((_res != 0));;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
# Create all subdirectories for given path without creating the last element.
|
||||||
|
# $1 = path
|
||||||
|
mksubdirs() {
|
||||||
|
[[ -e ${1%/*} ]] || mkdir -m 0755 -p -- "${1%/*}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Function prints global variables in format name=value line by line.
|
||||||
|
# $@ = list of global variables' name
|
||||||
|
print_vars() {
|
||||||
|
local _var _value
|
||||||
|
|
||||||
|
for _var in "$@"
|
||||||
|
do
|
||||||
|
eval printf -v _value "%s" \""\$$_var"\"
|
||||||
|
[[ ${_value} ]] && printf '%s="%s"\n' "$_var" "$_value"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
# normalize_path <path>
|
||||||
|
# Prints the normalized path, where it removes any duplicated
|
||||||
|
# and trailing slashes.
|
||||||
|
# Example:
|
||||||
|
# $ normalize_path ///test/test//
|
||||||
|
# /test/test
|
||||||
|
normalize_path() {
|
||||||
|
shopt -q -s extglob
|
||||||
|
set -- "${1//+(\/)//}"
|
||||||
|
shopt -q -u extglob
|
||||||
|
printf "%s\n" "${1%/}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# convert_abs_rel <from> <to>
|
||||||
|
# Prints the relative path, when creating a symlink to <to> from <from>.
|
||||||
|
# Example:
|
||||||
|
# $ convert_abs_rel /usr/bin/test /bin/test-2
|
||||||
|
# ../../bin/test-2
|
||||||
|
# $ ln -s $(convert_abs_rel /usr/bin/test /bin/test-2) /usr/bin/test
|
||||||
|
convert_abs_rel() {
|
||||||
|
local __current __absolute __abssize __cursize __newpath
|
||||||
|
local -i __i __level
|
||||||
|
|
||||||
|
set -- "$(normalize_path "$1")" "$(normalize_path "$2")"
|
||||||
|
|
||||||
|
# corner case #1 - self looping link
|
||||||
|
[[ "$1" == "$2" ]] && { printf "%s\n" "${1##*/}"; return; }
|
||||||
|
|
||||||
|
# corner case #2 - own dir link
|
||||||
|
[[ "${1%/*}" == "$2" ]] && { printf ".\n"; return; }
|
||||||
|
|
||||||
|
IFS="/" __current=($1)
|
||||||
|
IFS="/" __absolute=($2)
|
||||||
|
|
||||||
|
__abssize=${#__absolute[@]}
|
||||||
|
__cursize=${#__current[@]}
|
||||||
|
|
||||||
|
while [[ "${__absolute[__level]}" == "${__current[__level]}" ]]
|
||||||
|
do
|
||||||
|
(( __level++ ))
|
||||||
|
if (( __level > __abssize || __level > __cursize ))
|
||||||
|
then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
for ((__i = __level; __i < __cursize-1; __i++))
|
||||||
|
do
|
||||||
|
if ((__i > __level))
|
||||||
|
then
|
||||||
|
__newpath=$__newpath"/"
|
||||||
|
fi
|
||||||
|
__newpath=$__newpath".."
|
||||||
|
done
|
||||||
|
|
||||||
|
for ((__i = __level; __i < __abssize; __i++))
|
||||||
|
do
|
||||||
|
if [[ -n $__newpath ]]
|
||||||
|
then
|
||||||
|
__newpath=$__newpath"/"
|
||||||
|
fi
|
||||||
|
__newpath=$__newpath${__absolute[__i]}
|
||||||
|
done
|
||||||
|
|
||||||
|
printf "%s\n" "$__newpath"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# get_fs_env <device>
|
||||||
|
# Get and the ID_FS_TYPE variable from udev for a device.
|
||||||
|
# Example:
|
||||||
|
# $ get_fs_env /dev/sda2
|
||||||
|
# ext4
|
||||||
|
get_fs_env() {
|
||||||
|
local evalstr
|
||||||
|
local found
|
||||||
|
|
||||||
|
[[ $1 ]] || return
|
||||||
|
unset ID_FS_TYPE
|
||||||
|
ID_FS_TYPE=$(blkid -u filesystem -o export -- "$1" \
|
||||||
|
| while read line || [ -n "$line" ]; do
|
||||||
|
if [[ "$line" == TYPE\=* ]]; then
|
||||||
|
printf "%s" "${line#TYPE=}";
|
||||||
|
exit 0;
|
||||||
|
fi
|
||||||
|
done)
|
||||||
|
if [[ $ID_FS_TYPE ]]; then
|
||||||
|
printf "%s" "$ID_FS_TYPE"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# get_maj_min <device>
|
||||||
|
# Prints the major and minor of a device node.
|
||||||
|
# Example:
|
||||||
|
# $ get_maj_min /dev/sda2
|
||||||
|
# 8:2
|
||||||
|
get_maj_min() {
|
||||||
|
local _maj _min _majmin
|
||||||
|
_majmin="$(stat -L -c '%t:%T' "$1" 2>/dev/null)"
|
||||||
|
printf "%s" "$((0x${_majmin%:*})):$((0x${_majmin#*:}))"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# get_devpath_block <device>
|
||||||
|
# get the DEVPATH in /sys of a block device
|
||||||
|
get_devpath_block() {
|
||||||
|
local _majmin _i
|
||||||
|
_majmin=$(get_maj_min "$1")
|
||||||
|
|
||||||
|
for _i in /sys/block/*/dev /sys/block/*/*/dev; do
|
||||||
|
[[ -e "$_i" ]] || continue
|
||||||
|
if [[ "$_majmin" == "$(<"$_i")" ]]; then
|
||||||
|
printf "%s" "${_i%/dev}"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# get a persistent path from a device
|
||||||
|
get_persistent_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/by-uuid/* \
|
||||||
|
/dev/disk/by-label/* \
|
||||||
|
/dev/disk/by-partuuid/* \
|
||||||
|
/dev/disk/by-partlabel/* \
|
||||||
|
/dev/disk/by-id/* \
|
||||||
|
/dev/disk/by-path/* \
|
||||||
|
; do
|
||||||
|
[[ -e "$i" ]] || continue
|
||||||
|
[[ $i == /dev/mapper/control ]] && continue
|
||||||
|
[[ $i == /dev/mapper/mpath* ]] && continue
|
||||||
|
_tmp=$(get_maj_min "$i")
|
||||||
|
if [ "$_tmp" = "$_dev" ]; then
|
||||||
|
printf -- "%s" "$i"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
printf -- "%s" "$1"
|
||||||
|
}
|
||||||
|
|
||||||
|
expand_persistent_dev() {
|
||||||
|
local _dev=$1
|
||||||
|
|
||||||
|
case "$_dev" in
|
||||||
|
LABEL=*)
|
||||||
|
_dev="/dev/disk/by-label/${_dev#LABEL=}"
|
||||||
|
;;
|
||||||
|
UUID=*)
|
||||||
|
_dev="${_dev#UUID=}"
|
||||||
|
_dev="${_dev,,}"
|
||||||
|
_dev="/dev/disk/by-uuid/${_dev}"
|
||||||
|
;;
|
||||||
|
PARTUUID=*)
|
||||||
|
_dev="${_dev#PARTUUID=}"
|
||||||
|
_dev="${_dev,,}"
|
||||||
|
_dev="/dev/disk/by-partuuid/${_dev}"
|
||||||
|
;;
|
||||||
|
PARTLABEL=*)
|
||||||
|
_dev="/dev/disk/by-partlabel/${_dev#PARTLABEL=}"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
printf "%s" "$_dev"
|
||||||
|
}
|
||||||
|
|
||||||
|
shorten_persistent_dev() {
|
||||||
|
local _dev="$1"
|
||||||
|
case "$_dev" in
|
||||||
|
/dev/disk/by-uuid/*)
|
||||||
|
printf "%s" "UUID=${_dev##*/}";;
|
||||||
|
/dev/disk/by-label/*)
|
||||||
|
printf "%s" "LABEL=${_dev##*/}";;
|
||||||
|
/dev/disk/by-partuuid/*)
|
||||||
|
printf "%s" "PARTUUID=${_dev##*/}";;
|
||||||
|
/dev/disk/by-partlabel/*)
|
||||||
|
printf "%s" "PARTLABEL=${_dev##*/}";;
|
||||||
|
*)
|
||||||
|
printf "%s" "$_dev";;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
# find_block_device <mountpoint>
|
||||||
|
# Prints the major and minor number of the block device
|
||||||
|
# for a given mountpoint.
|
||||||
|
# Unless $use_fstab is set to "yes" the functions
|
||||||
|
# uses /proc/self/mountinfo as the primary source of the
|
||||||
|
# information and only falls back to /etc/fstab, if the mountpoint
|
||||||
|
# is not found there.
|
||||||
|
# Example:
|
||||||
|
# $ find_block_device /usr
|
||||||
|
# 8:4
|
||||||
|
find_block_device() {
|
||||||
|
local _dev _majmin _find_mpt
|
||||||
|
_find_mpt="$1"
|
||||||
|
if [[ $use_fstab != yes ]]; then
|
||||||
|
[[ -d $_find_mpt/. ]]
|
||||||
|
findmnt -e -v -n -o 'MAJ:MIN,SOURCE' --target "$_find_mpt" | { \
|
||||||
|
while read _majmin _dev || [ -n "$_dev" ]; do
|
||||||
|
if [[ -b $_dev ]]; then
|
||||||
|
if ! [[ $_majmin ]] || [[ $_majmin == 0:* ]]; then
|
||||||
|
_majmin=$(get_maj_min $_dev)
|
||||||
|
fi
|
||||||
|
if [[ $_majmin ]]; then
|
||||||
|
printf "%s\n" "$_majmin"
|
||||||
|
else
|
||||||
|
printf "%s\n" "$_dev"
|
||||||
|
fi
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
if [[ $_dev = *:* ]]; then
|
||||||
|
printf "%s\n" "$_dev"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
done; return 1; } && return 0
|
||||||
|
fi
|
||||||
|
# fall back to /etc/fstab
|
||||||
|
|
||||||
|
findmnt -e --fstab -v -n -o 'MAJ:MIN,SOURCE' --target "$_find_mpt" | { \
|
||||||
|
while read _majmin _dev || [ -n "$_dev" ]; do
|
||||||
|
if ! [[ $_dev ]]; then
|
||||||
|
_dev="$_majmin"
|
||||||
|
unset _majmin
|
||||||
|
fi
|
||||||
|
if [[ -b $_dev ]]; then
|
||||||
|
[[ $_majmin ]] || _majmin=$(get_maj_min $_dev)
|
||||||
|
if [[ $_majmin ]]; then
|
||||||
|
printf "%s\n" "$_majmin"
|
||||||
|
else
|
||||||
|
printf "%s\n" "$_dev"
|
||||||
|
fi
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
if [[ $_dev = *:* ]]; then
|
||||||
|
printf "%s\n" "$_dev"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
done; return 1; } && return 0
|
||||||
|
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# find_mp_fstype <mountpoint>
|
||||||
|
# Echo the filesystem type for a given mountpoint.
|
||||||
|
# /proc/self/mountinfo is taken as the primary source of information
|
||||||
|
# and /etc/fstab is used as a fallback.
|
||||||
|
# No newline is appended!
|
||||||
|
# Example:
|
||||||
|
# $ find_mp_fstype /;echo
|
||||||
|
# ext4
|
||||||
|
find_mp_fstype() {
|
||||||
|
local _fs
|
||||||
|
|
||||||
|
if [[ $use_fstab != yes ]]; then
|
||||||
|
findmnt -e -v -n -o 'FSTYPE' --target "$1" | { \
|
||||||
|
while read _fs || [ -n "$_fs" ]; do
|
||||||
|
[[ $_fs ]] || continue
|
||||||
|
[[ $_fs = "autofs" ]] && continue
|
||||||
|
printf "%s" "$_fs"
|
||||||
|
return 0
|
||||||
|
done; return 1; } && return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
findmnt --fstab -e -v -n -o 'FSTYPE' --target "$1" | { \
|
||||||
|
while read _fs || [ -n "$_fs" ]; do
|
||||||
|
[[ $_fs ]] || continue
|
||||||
|
[[ $_fs = "autofs" ]] && continue
|
||||||
|
printf "%s" "$_fs"
|
||||||
|
return 0
|
||||||
|
done; return 1; } && return 0
|
||||||
|
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# find_dev_fstype <device>
|
||||||
|
# Echo the filesystem type for a given device.
|
||||||
|
# /proc/self/mountinfo is taken as the primary source of information
|
||||||
|
# and /etc/fstab is used as a fallback.
|
||||||
|
# No newline is appended!
|
||||||
|
# Example:
|
||||||
|
# $ find_dev_fstype /dev/sda2;echo
|
||||||
|
# ext4
|
||||||
|
find_dev_fstype() {
|
||||||
|
local _find_dev _fs
|
||||||
|
_find_dev="$1"
|
||||||
|
if ! [[ "$_find_dev" = /dev* ]]; then
|
||||||
|
[[ -b "/dev/block/$_find_dev" ]] && _find_dev="/dev/block/$_find_dev"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $use_fstab != yes ]]; then
|
||||||
|
findmnt -e -v -n -o 'FSTYPE' --source "$_find_dev" | { \
|
||||||
|
while read _fs || [ -n "$_fs" ]; do
|
||||||
|
[[ $_fs ]] || continue
|
||||||
|
[[ $_fs = "autofs" ]] && continue
|
||||||
|
printf "%s" "$_fs"
|
||||||
|
return 0
|
||||||
|
done; return 1; } && return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
findmnt --fstab -e -v -n -o 'FSTYPE' --source "$_find_dev" | { \
|
||||||
|
while read _fs || [ -n "$_fs" ]; do
|
||||||
|
[[ $_fs ]] || continue
|
||||||
|
[[ $_fs = "autofs" ]] && continue
|
||||||
|
printf "%s" "$_fs"
|
||||||
|
return 0
|
||||||
|
done; return 1; } && return 0
|
||||||
|
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# find_mp_fsopts <mountpoint>
|
||||||
|
# Echo the filesystem options for a given mountpoint.
|
||||||
|
# /proc/self/mountinfo is taken as the primary source of information
|
||||||
|
# and /etc/fstab is used as a fallback.
|
||||||
|
# No newline is appended!
|
||||||
|
# Example:
|
||||||
|
# $ find_mp_fsopts /;echo
|
||||||
|
# rw,relatime,discard,data=ordered
|
||||||
|
find_mp_fsopts() {
|
||||||
|
if [[ $use_fstab != yes ]]; then
|
||||||
|
findmnt -e -v -n -o 'OPTIONS' --target "$1" 2>/dev/null && return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
findmnt --fstab -e -v -n -o 'OPTIONS' --target "$1"
|
||||||
|
}
|
||||||
|
|
||||||
|
# find_dev_fsopts <device>
|
||||||
|
# Echo the filesystem options for a given device.
|
||||||
|
# /proc/self/mountinfo is taken as the primary source of information
|
||||||
|
# and /etc/fstab is used as a fallback.
|
||||||
|
# Example:
|
||||||
|
# $ find_dev_fsopts /dev/sda2
|
||||||
|
# rw,relatime,discard,data=ordered
|
||||||
|
find_dev_fsopts() {
|
||||||
|
local _find_dev _opts
|
||||||
|
_find_dev="$1"
|
||||||
|
if ! [[ "$_find_dev" = /dev* ]]; then
|
||||||
|
[[ -b "/dev/block/$_find_dev" ]] && _find_dev="/dev/block/$_find_dev"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $use_fstab != yes ]]; then
|
||||||
|
findmnt -e -v -n -o 'OPTIONS' --source "$_find_dev" 2>/dev/null && return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
findmnt --fstab -e -v -n -o 'OPTIONS' --source "$_find_dev"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# finds the major:minor of the block device backing the root filesystem.
|
||||||
|
find_root_block_device() { find_block_device /; }
|
||||||
|
|
||||||
|
# for_each_host_dev_fs <func>
|
||||||
|
# Execute "<func> <dev> <filesystem>" for every "<dev> <fs>" pair found
|
||||||
|
# in ${host_fs_types[@]}
|
||||||
|
for_each_host_dev_fs()
|
||||||
|
{
|
||||||
|
local _func="$1"
|
||||||
|
local _dev
|
||||||
|
local _ret=1
|
||||||
|
|
||||||
|
[[ "${#host_fs_types[@]}" ]] || return 2
|
||||||
|
|
||||||
|
|
||||||
|
for _dev in "${!host_fs_types[@]}"; do
|
||||||
|
$_func "$_dev" "${host_fs_types[$_dev]}" && _ret=0
|
||||||
|
done
|
||||||
|
return $_ret
|
||||||
|
}
|
||||||
|
|
||||||
|
host_fs_all()
|
||||||
|
{
|
||||||
|
printf "%s\n" "${host_fs_types[@]}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Walk all the slave relationships for a given block device.
|
||||||
|
# Stop when our helper function returns success
|
||||||
|
# $1 = function to call on every found block device
|
||||||
|
# $2 = block device in major:minor format
|
||||||
|
check_block_and_slaves() {
|
||||||
|
local _x
|
||||||
|
[[ -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 ]] && [[ /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/*; do
|
||||||
|
[[ -f $_x/dev ]] || continue
|
||||||
|
[[ $_x/subsystem -ef /sys/class/block ]] || continue
|
||||||
|
check_block_and_slaves $1 $(<"$_x/dev") && return 0
|
||||||
|
done
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
check_block_and_slaves_all() {
|
||||||
|
local _x _ret=1
|
||||||
|
[[ -b /dev/block/$2 ]] || return 1 # Not a block device? So sorry.
|
||||||
|
if ! lvm_internal_dev $2 && "$1" $2; then
|
||||||
|
_ret=0
|
||||||
|
fi
|
||||||
|
check_vol_slaves_all "$@" && return 0
|
||||||
|
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/*; 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
|
||||||
|
}
|
||||||
|
# for_each_host_dev_and_slaves <func>
|
||||||
|
# Execute "<func> <dev>" for every "<dev>" found
|
||||||
|
# in ${host_devs[@]} and their slaves
|
||||||
|
for_each_host_dev_and_slaves_all()
|
||||||
|
{
|
||||||
|
local _func="$1"
|
||||||
|
local _dev
|
||||||
|
local _ret=1
|
||||||
|
|
||||||
|
[[ "${host_devs[@]}" ]] || return 2
|
||||||
|
|
||||||
|
for _dev in "${host_devs[@]}"; do
|
||||||
|
[[ -b "$_dev" ]] || continue
|
||||||
|
if check_block_and_slaves_all $_func $(get_maj_min $_dev); then
|
||||||
|
_ret=0
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
return $_ret
|
||||||
|
}
|
||||||
|
|
||||||
|
for_each_host_dev_and_slaves()
|
||||||
|
{
|
||||||
|
local _func="$1"
|
||||||
|
local _dev
|
||||||
|
|
||||||
|
[[ "${host_devs[@]}" ]] || return 2
|
||||||
|
|
||||||
|
for _dev in "${host_devs[@]}"; do
|
||||||
|
[[ -b "$_dev" ]] || continue
|
||||||
|
check_block_and_slaves $_func $(get_maj_min $_dev) && return 0
|
||||||
|
done
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# ugly workaround for the lvm design
|
||||||
|
# There is no volume group device,
|
||||||
|
# so, there are no slave devices for volume groups.
|
||||||
|
# Logical volumes only have the slave devices they really live on,
|
||||||
|
# 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 _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 _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
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# fs_get_option <filesystem options> <search for option>
|
||||||
|
# search for a specific option in a bunch of filesystem options
|
||||||
|
# and return the value
|
||||||
|
fs_get_option() {
|
||||||
|
local _fsopts=$1
|
||||||
|
local _option=$2
|
||||||
|
local OLDIFS="$IFS"
|
||||||
|
IFS=,
|
||||||
|
set -- $_fsopts
|
||||||
|
IFS="$OLDIFS"
|
||||||
|
while [ $# -gt 0 ]; do
|
||||||
|
case $1 in
|
||||||
|
$_option=*)
|
||||||
|
echo ${1#${_option}=}
|
||||||
|
break
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
check_kernel_config()
|
||||||
|
{
|
||||||
|
local _config_opt="$1"
|
||||||
|
local _config_file
|
||||||
|
[[ -f /boot/config-$kernel ]] \
|
||||||
|
&& _config_file="/boot/config-$kernel"
|
||||||
|
[[ -f /lib/modules/$kernel/config ]] \
|
||||||
|
&& _config_file="/lib/modules/$kernel/config"
|
||||||
|
|
||||||
|
# no kernel config file, so return true
|
||||||
|
[[ $_config_file ]] || return 0
|
||||||
|
|
||||||
|
grep -q -F "${_config_opt}=" "$_config_file" && return 0
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# get_cpu_vendor
|
||||||
|
# Only two values are returned: AMD or Intel
|
||||||
|
get_cpu_vendor ()
|
||||||
|
{
|
||||||
|
if grep -qE AMD /proc/cpuinfo; then
|
||||||
|
printf "AMD"
|
||||||
|
fi
|
||||||
|
if grep -qE Intel /proc/cpuinfo; then
|
||||||
|
printf "Intel"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# get_host_ucode
|
||||||
|
# Get the hosts' ucode file based on the /proc/cpuinfo
|
||||||
|
get_ucode_file ()
|
||||||
|
{
|
||||||
|
local family=`grep -E "cpu family" /proc/cpuinfo | head -1 | sed s/.*:\ //`
|
||||||
|
local model=`grep -E "model" /proc/cpuinfo |grep -v name | head -1 | sed s/.*:\ //`
|
||||||
|
local stepping=`grep -E "stepping" /proc/cpuinfo | head -1 | sed s/.*:\ //`
|
||||||
|
|
||||||
|
if [[ "$(get_cpu_vendor)" == "AMD" ]]; then
|
||||||
|
if [[ $family -ge 21 ]]; then
|
||||||
|
printf "microcode_amd_fam%xh.bin" $family
|
||||||
|
else
|
||||||
|
printf "microcode_amd.bin"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [[ "$(get_cpu_vendor)" == "Intel" ]]; then
|
||||||
|
# The /proc/cpuinfo are in decimal.
|
||||||
|
printf "%02x-%02x-%02x" ${family} ${model} ${stepping}
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Get currently loaded modules
|
||||||
|
# sorted, and delimited by newline
|
||||||
|
get_loaded_kernel_modules ()
|
||||||
|
{
|
||||||
|
local modules=( )
|
||||||
|
while read _module _size _used _used_by; do
|
||||||
|
modules+=( "$_module" )
|
||||||
|
done <<< "$(lsmod | sed -n '1!p')"
|
||||||
|
printf '%s\n' "${modules[@]}" | sort
|
||||||
|
}
|
||||||
|
|
||||||
|
# Not every device in /dev/mapper should be examined.
|
||||||
|
# If it is an LVM device, touch only devices which have /dev/VG/LV symlink.
|
||||||
|
lvm_internal_dev() {
|
||||||
|
local dev_dm_dir=/sys/dev/block/$1/dm
|
||||||
|
[[ ! -f $dev_dm_dir/uuid || $(<$dev_dm_dir/uuid) != LVM-* ]] && return 1 # Not an LVM device
|
||||||
|
local DM_VG_NAME DM_LV_NAME DM_LV_LAYER
|
||||||
|
eval $(dmsetup splitname --nameprefixes --noheadings --rows "$(<$dev_dm_dir/name)" 2>/dev/null)
|
||||||
|
[[ ${DM_VG_NAME} ]] && [[ ${DM_LV_NAME} ]] || return 0 # Better skip this!
|
||||||
|
[[ ${DM_LV_LAYER} ]] || [[ ! -L /dev/${DM_VG_NAME}/${DM_LV_NAME} ]]
|
||||||
|
}
|
||||||
|
|
||||||
|
btrfs_devs() {
|
||||||
|
local _mp="$1"
|
||||||
|
btrfs device usage "$_mp" \
|
||||||
|
| while read _dev _rest; do
|
||||||
|
str_starts "$_dev" "/" || continue
|
||||||
|
_dev=${_dev%,}
|
||||||
|
printf -- "%s\n" "$_dev"
|
||||||
|
done
|
||||||
|
}
|
||||||
@@ -1,699 +0,0 @@
|
|||||||
#!/bin/bash --norc
|
|
||||||
#
|
|
||||||
# Copyright 2005-2009 Red Hat, Inc. All rights reserved.
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; either version 2 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
# code taken from mkinitrd
|
|
||||||
#
|
|
||||||
#. /usr/libexec/initrd-functions
|
|
||||||
|
|
||||||
|
|
||||||
function error() {
|
|
||||||
local NONL=""
|
|
||||||
if [ "$1" == "-n" ]; then
|
|
||||||
NONL="-n"
|
|
||||||
shift
|
|
||||||
fi
|
|
||||||
echo $NONL "$@" >&2
|
|
||||||
}
|
|
||||||
|
|
||||||
function vecho() {
|
|
||||||
return
|
|
||||||
local NONL=""
|
|
||||||
if [ "$1" == "-n" ]; then
|
|
||||||
NONL="-n"
|
|
||||||
shift
|
|
||||||
fi
|
|
||||||
is_verbose && echo $NONL "$@"
|
|
||||||
}
|
|
||||||
|
|
||||||
# module dep finding and installation functions
|
|
||||||
moduledep() {
|
|
||||||
MPARGS=""
|
|
||||||
if [ "$1" == "--ignore-install" ]; then
|
|
||||||
MPARGS="$MPARGS --ignore-install"
|
|
||||||
shift
|
|
||||||
fi
|
|
||||||
vecho -n "Looking for deps of module $1"
|
|
||||||
deps=""
|
|
||||||
deps=$(modprobe $MPARGS --set-version $kernel --show-depends $1 2>/dev/null| awk '/^insmod / { print gensub(".*/","","g",$2) }' | while read foo ; do [ "${foo%%.ko}" != "$1" ] && echo -n "${foo%%.ko} " ; done)
|
|
||||||
[ -n "$deps" ] && vecho ": $deps" || vecho
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ $UID != 0 ]; then
|
|
||||||
error "$0 must be run as root."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
export MALLOC_PERTURB_=204
|
|
||||||
|
|
||||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin:$PATH
|
|
||||||
export PATH
|
|
||||||
|
|
||||||
. /etc/rc.d/init.d/functions
|
|
||||||
|
|
||||||
# Set the umask. For iscsi, the initrd can contain plaintext
|
|
||||||
# password (chap secret), so only allow read by owner.
|
|
||||||
umask 077
|
|
||||||
|
|
||||||
VERSION=6.0.87
|
|
||||||
|
|
||||||
PROBE="yes"
|
|
||||||
MODULES=""
|
|
||||||
GRAPHICSMODS=""
|
|
||||||
PREMODS=""
|
|
||||||
DMRAIDS=""
|
|
||||||
ncryptodevs=0
|
|
||||||
ncryptoparts=0
|
|
||||||
ncryptolvs=0
|
|
||||||
ncryptoraids=0
|
|
||||||
root=""
|
|
||||||
scsi_wait_scan="no"
|
|
||||||
|
|
||||||
NET_LIST=""
|
|
||||||
LD_SO_CONF=/etc/ld.so.conf
|
|
||||||
LD_SO_CONF_D=/etc/ld.so.conf.d/
|
|
||||||
|
|
||||||
[ -e /etc/sysconfig/mkinitrd ] && . /etc/sysconfig/mkinitrd
|
|
||||||
|
|
||||||
CONFMODS="$MODULES"
|
|
||||||
MODULES=""
|
|
||||||
ARCH=$(uname -m | sed -e 's/s390x/s390/')
|
|
||||||
|
|
||||||
compress=1
|
|
||||||
allowmissing=""
|
|
||||||
target=""
|
|
||||||
kernel=""
|
|
||||||
force=""
|
|
||||||
img_vers=""
|
|
||||||
builtins=""
|
|
||||||
modulefile=/etc/modules.conf
|
|
||||||
[ "$ARCH" != "s390" ] && withusb=1
|
|
||||||
rc=0
|
|
||||||
nolvm=""
|
|
||||||
nodmraid=""
|
|
||||||
|
|
||||||
IMAGESIZE=8000
|
|
||||||
PRESCSIMODS=""
|
|
||||||
fstab="/etc/fstab"
|
|
||||||
|
|
||||||
vg_list=""
|
|
||||||
net_list="$NET_LIST"
|
|
||||||
|
|
||||||
usage () {
|
|
||||||
if [ "$1" == "-n" ]; then
|
|
||||||
cmd=echo
|
|
||||||
else
|
|
||||||
cmd=error
|
|
||||||
fi
|
|
||||||
|
|
||||||
$cmd "usage: `basename $0` [--version] [--help] [-v] [-f]"
|
|
||||||
|
|
||||||
if [ "$1" == "-n" ]; then
|
|
||||||
exit 0
|
|
||||||
else
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
qpushd() {
|
|
||||||
pushd "$1" >/dev/null 2>&1
|
|
||||||
}
|
|
||||||
|
|
||||||
qpopd() {
|
|
||||||
popd >/dev/null 2>&1
|
|
||||||
}
|
|
||||||
|
|
||||||
resolve_device_name() {
|
|
||||||
echo "$1"
|
|
||||||
# echo "resolve_device_name $1" 1>&2
|
|
||||||
}
|
|
||||||
|
|
||||||
freadlink() {
|
|
||||||
/usr/bin/readlink -f "$1"
|
|
||||||
}
|
|
||||||
|
|
||||||
finddevnoinsys() {
|
|
||||||
majmin="$1"
|
|
||||||
if [ -n "$majmin" ]; then
|
|
||||||
dev=$(for x in /sys/block/* ; do find $x/ -name dev ; done | while read device ; do \
|
|
||||||
echo "$majmin" | cmp -s $device && echo $device ; done)
|
|
||||||
if [ -n "$dev" ]; then
|
|
||||||
dev=${dev%%/dev}
|
|
||||||
dev=${dev%%/}
|
|
||||||
echo "$dev"
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
finddevicedriverinsys () {
|
|
||||||
if is_iscsi $PWD; then
|
|
||||||
handleiscsi "$PWD"
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
while [ "$PWD" != "/sys/devices" ]; do
|
|
||||||
deps=
|
|
||||||
if [ -f modalias ]; then
|
|
||||||
MODALIAS=$(cat modalias)
|
|
||||||
if [ "${MODALIAS::7}" == "scsi:t-" ]; then
|
|
||||||
scsi_wait_scan=yes
|
|
||||||
fi
|
|
||||||
moduledep $MODALIAS
|
|
||||||
unset MODALIAS
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd ..
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
findstoragedriverinsys () {
|
|
||||||
local sysfs=$(freadlink "$1")
|
|
||||||
|
|
||||||
# if its a partition look at the device holding the partition
|
|
||||||
if [ -f "$sysfs/start" ]; then
|
|
||||||
sysfs=$(freadlink ${sysfs%/*})
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! "$sysfs" =~ '^/sys/.*block/.*$' ]]; then
|
|
||||||
#error "WARNING: $sysfs is a not a block sysfs path, skipping"
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
case " $handleddevices " in
|
|
||||||
*" $sysfs "*)
|
|
||||||
return ;;
|
|
||||||
*) handleddevices="$handleddevices $sysfs" ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [[ "$sysfs" =~ '^/sys/.*block/md[0-9]+$' ]]; then
|
|
||||||
local raid=${sysfs##*/}
|
|
||||||
vecho "Found MDRAID component $raid"
|
|
||||||
handleraid $raid
|
|
||||||
fi
|
|
||||||
if [[ "$sysfs" =~ '^/sys/.*block/dm-[0-9]+$' ]]; then
|
|
||||||
vecho "Found DeviceMapper component ${sysfs##*/}"
|
|
||||||
handledm $(cat $sysfs/dev |cut -d : -f 1) $(cat $sysfs/dev |cut -d : -f 2)
|
|
||||||
fi
|
|
||||||
|
|
||||||
for slave in $(ls -d "$sysfs"/slaves/* 2>/dev/null) ; do
|
|
||||||
findstoragedriverinsys "$slave"
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ -L "$sysfs/device" ]; then
|
|
||||||
qpushd $(freadlink "$sysfs/device")
|
|
||||||
finddevicedriverinsys
|
|
||||||
qpopd
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
findstoragedriver () {
|
|
||||||
local device="$1"
|
|
||||||
|
|
||||||
if [ ! -b "$device" ]; then
|
|
||||||
#error "WARNING: $device is a not a block device, skipping"
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
local majmin=$(get_numeric_dev dec "$device")
|
|
||||||
local sysfs=$(finddevnoinsys "$majmin")
|
|
||||||
|
|
||||||
if [ -z "$sysfs" ]; then
|
|
||||||
#error "WARNING: $device major:minor $majmin not found, skipping"
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
vecho "Looking for driver for $device in $sysfs"
|
|
||||||
findstoragedriverinsys "$sysfs"
|
|
||||||
}
|
|
||||||
|
|
||||||
iscsi_get_rec_val() {
|
|
||||||
|
|
||||||
# The open-iscsi 742 release changed to using flat files in
|
|
||||||
# /var/lib/iscsi.
|
|
||||||
|
|
||||||
result=$(grep "^${2} = " "$1" | sed -e s'/.* = //')
|
|
||||||
}
|
|
||||||
|
|
||||||
iscsi_set_parameters() {
|
|
||||||
path=$1
|
|
||||||
vecho setting iscsi parameters
|
|
||||||
|
|
||||||
tmpfile=$(mktemp)
|
|
||||||
|
|
||||||
# Check once before getting explicit values, so we can output a decent
|
|
||||||
# error message.
|
|
||||||
/sbin/iscsiadm --show -m session -r $path > $tmpfile
|
|
||||||
if [ ! -s $tmpfile ]; then
|
|
||||||
echo Unable to find iscsi record for $path
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
nit_name=$(grep "^InitiatorName=" /etc/iscsi/initiatorname.iscsi | \
|
|
||||||
sed -e "s/^InitiatorName=//")
|
|
||||||
|
|
||||||
iscsi_get_rec_val $tmpfile "node.name"
|
|
||||||
tgt_name=${result}
|
|
||||||
iscsi_get_rec_val $tmpfile "node.tpgt"
|
|
||||||
tpgt=${result}
|
|
||||||
# iscsistart wants node.conn[0].address / port
|
|
||||||
iscsi_get_rec_val $tmpfile 'node.conn\[0\].address'
|
|
||||||
tgt_ipaddr=${result}
|
|
||||||
iscsi_get_rec_val $tmpfile 'node.conn\[0\].port'
|
|
||||||
tgt_port=${result}
|
|
||||||
|
|
||||||
# Note: we get chap secrets (passwords) in plaintext, and also store
|
|
||||||
# them in the initrd.
|
|
||||||
|
|
||||||
iscsi_get_rec_val $tmpfile "node.session.auth.username"
|
|
||||||
chap=${result}
|
|
||||||
if [ -n "${chap}" -a "${chap}" != "<empty>" ]; then
|
|
||||||
chap="-u ${chap}"
|
|
||||||
iscsi_get_rec_val $tmpfile "node.session.auth.password"
|
|
||||||
chap_pw="-w ${result}"
|
|
||||||
else
|
|
||||||
chap=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
iscsi_get_rec_val $tmpfile "node.session.auth.username_in"
|
|
||||||
chap_in=${result}
|
|
||||||
if [ -n "${chap_in}" -a "${chap_in}" != "<empty>" ]; then
|
|
||||||
chap_in="-U ${chap_in}"
|
|
||||||
iscsi_get_rec_val $tmpfile "node.session.auth.password_in"
|
|
||||||
chap_in_pw="-W ${result}"
|
|
||||||
else
|
|
||||||
chap_in=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
rm $tmpfile
|
|
||||||
}
|
|
||||||
|
|
||||||
emit_iscsi () {
|
|
||||||
if [ -n "${iscsi_devs}" ]; then
|
|
||||||
for dev in ${iscsi_devs}; do
|
|
||||||
iscsi_set_parameters $dev
|
|
||||||
# recid is not really used, just use 0 for it
|
|
||||||
echo "/bin/iscsistart -t ${tgt_name} -i ${nit_name} \
|
|
||||||
-g ${tpgt} -a ${tgt_ipaddr} ${chap} ${chap_pw} \
|
|
||||||
${chap_in} ${chap_in_pw}"
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
is_iscsi() {
|
|
||||||
path=$1
|
|
||||||
if echo $path | grep -q "/platform/host[0-9]*/session[0-9]*/target[0-9]*:[0-9]*:[0-9]*/[0-9]*:[0-9]*:[0-9]*:[0-9]*"; then
|
|
||||||
return 0
|
|
||||||
else
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
handledm() {
|
|
||||||
major=$1
|
|
||||||
minor=$2
|
|
||||||
while read dmstart dmend dmtype r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 ; do
|
|
||||||
case "$dmtype" in
|
|
||||||
crypt)
|
|
||||||
# this device is encrypted; find the slave device and see
|
|
||||||
# whether the encryption is LUKS; if not, bail.
|
|
||||||
slavedev=$(finddevnoinsys $r3)
|
|
||||||
# get the basename, then s,!,/, in case it's a cciss device
|
|
||||||
slavedev=$(echo ${slavedev##*/} | tr '!' '/')
|
|
||||||
cryptsetup isLuks "/dev/$slavedev" 2>/dev/null || continue
|
|
||||||
find_base_dm_mods
|
|
||||||
dmname=$(dmsetup info -j $major -m $minor -c --noheadings -o name)
|
|
||||||
# do the device resolution dance to get /dev/mapper/foo
|
|
||||||
# since 'lvm lvs' doesn't like dm-X device nodes
|
|
||||||
if [[ "$slavedev" =~ ^dm- ]]; then
|
|
||||||
majmin=$(get_numeric_dev dec "/dev/$slavedev")
|
|
||||||
for dmdev in /dev/mapper/* ; do
|
|
||||||
dmnum=$(get_numeric_dev dev $dmdev)
|
|
||||||
if [ $dmnum = $majmin ]; then
|
|
||||||
slavedev=${dmdev#/dev/}
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
# determine if $slavedev is an LV
|
|
||||||
# if so, add the device to latecryptodevs
|
|
||||||
# if not, add the device to cryptodevs
|
|
||||||
local vg=$(lvshow /dev/$slavedev)
|
|
||||||
if [ -n "$vg" ]; then
|
|
||||||
eval cryptolv${ncryptolvs}='"'/dev/$slavedev $dmname'"'
|
|
||||||
let ncryptolvs++
|
|
||||||
elif grep -q "^$slavedev :" /proc/mdstat ; then
|
|
||||||
eval cryptoraid${ncryptoraids}='"'/dev/$slavedev $dmname'"'
|
|
||||||
let ncryptoraids++
|
|
||||||
else
|
|
||||||
eval cryptoparts${ncryptoparts}='"'/dev/$slavedev $dmname'"'
|
|
||||||
let ncryptoparts++
|
|
||||||
fi
|
|
||||||
|
|
||||||
let ncryptodevs++
|
|
||||||
findstoragedriver "/dev/$slavedev"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done << EOF
|
|
||||||
$(dmsetup table -j $major -m $minor 2>/dev/null)
|
|
||||||
EOF
|
|
||||||
local name=$(dmsetup info --noheadings -c -j $major -m $minor -o name)
|
|
||||||
local vg=$(lvshow "/dev/mapper/$name")
|
|
||||||
local raids=$(/sbin/dmraid -s -craidname 2>/dev/null | grep -vi "no raid disks")
|
|
||||||
if [ -n "$vg" ]; then
|
|
||||||
vg=`echo $vg` # strip whitespace
|
|
||||||
case " $vg_list " in
|
|
||||||
*" $vg "*) ;;
|
|
||||||
*) vg_list="$vg_list $vg"
|
|
||||||
[ -z "$nolvm" ] && find_base_dm_mods
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
for raid in $raids ; do
|
|
||||||
if [ "$raid" == "$name" ]; then
|
|
||||||
case " $DMRAIDS " in
|
|
||||||
*" $raid "*) ;;
|
|
||||||
*) DMRAIDS="$DMRAIDS $raid"
|
|
||||||
[ -z "$nodmraid" ] && find_base_dm_mods
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
handleiscsi() {
|
|
||||||
vecho "Found iscsi component $1"
|
|
||||||
|
|
||||||
# We call iscsi_set_parameters once here to figure out what network to
|
|
||||||
# use (it sets tgt_ipaddr), and once again to emit iscsi values,
|
|
||||||
# not very efficient.
|
|
||||||
iscsi_set_parameters $1
|
|
||||||
iscsi_devs="$iscsi_devs $1"
|
|
||||||
netdev=$(/sbin/ip route get to $tgt_ipaddr | \
|
|
||||||
sed 's|.*dev \(.*\).*|\1|g' | awk '{ print $1; exit }')
|
|
||||||
addnetdev $netdev
|
|
||||||
}
|
|
||||||
|
|
||||||
handleraid() {
|
|
||||||
local start=0
|
|
||||||
|
|
||||||
if [ -n "$noraid" -o ! -f /proc/mdstat ]; then
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
levels=$(awk "/^$1[ ]*:/ { print\$4 }" /proc/mdstat)
|
|
||||||
|
|
||||||
for level in $levels ; do
|
|
||||||
case $level in
|
|
||||||
linear)
|
|
||||||
start=1
|
|
||||||
;;
|
|
||||||
multipath)
|
|
||||||
start=1
|
|
||||||
;;
|
|
||||||
raid[01] | raid10)
|
|
||||||
start=1
|
|
||||||
;;
|
|
||||||
raid[456])
|
|
||||||
start=1
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
error "raid level $level (in /proc/mdstat) not recognized"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
if [ "$start" = 1 ]; then
|
|
||||||
raiddevices="$raiddevices $1"
|
|
||||||
fi
|
|
||||||
return $start
|
|
||||||
}
|
|
||||||
|
|
||||||
lvshow() {
|
|
||||||
lvm lvs --ignorelockingfailure --noheadings -o vg_name \
|
|
||||||
$1 2>/dev/null | egrep -v '^ *(WARNING:|Volume Groups with)'
|
|
||||||
}
|
|
||||||
|
|
||||||
vgdisplay() {
|
|
||||||
lvm vgdisplay --ignorelockingfailure -v $1 2>/dev/null |
|
|
||||||
sed -n 's/PV Name//p'
|
|
||||||
}
|
|
||||||
|
|
||||||
dmmods_found="n"
|
|
||||||
find_base_dm_mods()
|
|
||||||
{
|
|
||||||
[ "$dmmods_found" == "n" ] || return
|
|
||||||
dmmods_found="y"
|
|
||||||
}
|
|
||||||
|
|
||||||
savedargs=$*
|
|
||||||
while [ $# -gt 0 ]; do
|
|
||||||
case $1 in
|
|
||||||
--fstab*)
|
|
||||||
if [ "$1" != "${1##--fstab=}" ]; then
|
|
||||||
fstab=${1##--fstab=}
|
|
||||||
else
|
|
||||||
fstab=$2
|
|
||||||
shift
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
|
|
||||||
|
|
||||||
-v|--verbose)
|
|
||||||
set_verbose true
|
|
||||||
;;
|
|
||||||
--net-dev*)
|
|
||||||
if [ "$1" != "${1##--net-dev=}" ]; then
|
|
||||||
net_list="$net_list ${1##--net-dev=}"
|
|
||||||
else
|
|
||||||
net_list="$net_list $2"
|
|
||||||
shift
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
--rootdev*)
|
|
||||||
if [ "$1" != "${1##--rootdev=}" ]; then
|
|
||||||
rootdev="${1##--rootdev=}"
|
|
||||||
else
|
|
||||||
rootdev="$2"
|
|
||||||
shift
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
--thawdev*)
|
|
||||||
if [ "$1" != "${1##--thawdev=}" ]; then
|
|
||||||
thawdev="${1##--thawdev=}"
|
|
||||||
else
|
|
||||||
thawdev="$2"
|
|
||||||
shift
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
--rootfs*)
|
|
||||||
if [ "$1" != "${1##--rootfs=}" ]; then
|
|
||||||
rootfs="${1##--rootfs=}"
|
|
||||||
else
|
|
||||||
rootfs="$2"
|
|
||||||
shift
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
--rootopts*)
|
|
||||||
if [ "$1" != "${1##--rootopts=}" ]; then
|
|
||||||
rootopts="${1##--rootopts=}"
|
|
||||||
else
|
|
||||||
rootopts="$2"
|
|
||||||
shift
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
--root*)
|
|
||||||
if [ "$1" != "${1##--root=}" ]; then
|
|
||||||
root="${1##--root=}"
|
|
||||||
else
|
|
||||||
root="$2"
|
|
||||||
shift
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
--loopdev*)
|
|
||||||
if [ "$1" != "${1##--loopdev=}" ]; then
|
|
||||||
loopdev="${1##--loopdev=}"
|
|
||||||
else
|
|
||||||
loopdev="$2"
|
|
||||||
shift
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
--loopfs*)
|
|
||||||
if [ "$1" != "${1##--loopfs=}" ]; then
|
|
||||||
loopfs="${1##--loopfs=}"
|
|
||||||
else
|
|
||||||
loopfs="$2"
|
|
||||||
shift
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
--loopopts*)
|
|
||||||
if [ "$1" != "${1##--loopopts=}" ]; then
|
|
||||||
loopopts="${1##--loopopts=}"
|
|
||||||
else
|
|
||||||
loopopts="$2"
|
|
||||||
shift
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
--looppath*)
|
|
||||||
if [ "$1" != "${1##--looppath=}" ]; then
|
|
||||||
looppath="${1##--looppath=}"
|
|
||||||
else
|
|
||||||
looppath="$2"
|
|
||||||
shift
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
--help)
|
|
||||||
usage -n
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
if [ -z "$target" ]; then
|
|
||||||
target=$1
|
|
||||||
elif [ -z "$kernel" ]; then
|
|
||||||
kernel=$1
|
|
||||||
else
|
|
||||||
usage
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
|
|
||||||
[ -z "$rootfs" ] && rootfs=$(awk '{ if ($1 !~ /^[ \t]*#/ && $2 == "/") { print $3; }}' $fstab)
|
|
||||||
[ -z "$rootopts" ] && rootopts=$(awk '{ if ($1 !~ /^[ \t]*#/ && $2 == "/") { print $4; }}' $fstab)
|
|
||||||
[ -z "$rootopts" ] && rootopts="defaults"
|
|
||||||
|
|
||||||
|
|
||||||
[ -z "$rootdev" ] && rootdev=$(awk '/^[ \t]*[^#]/ { if ($2 == "/") { print $1; }}' $fstab)
|
|
||||||
# check if it's nfsroot
|
|
||||||
physdev=""
|
|
||||||
if [ "$rootfs" == "nfs" ]; then
|
|
||||||
if [ "x$net_list" == "x" ]; then
|
|
||||||
handlenfs $rootdev
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
# check if it's root by label
|
|
||||||
rdev=$rootdev
|
|
||||||
if [[ "$rdev" =~ ^(UUID=|LABEL=) ]]; then
|
|
||||||
rdev=$(resolve_device_name "$rdev")
|
|
||||||
fi
|
|
||||||
rootopts=$(echo $rootopts | sed -e 's/^r[ow],//' -e 's/,_netdev//' -e 's/_netdev//' -e 's/,r[ow],$//' -e 's/,r[ow],/,/' -e 's/^r[ow]$/defaults/' -e 's/$/,ro/')
|
|
||||||
findstoragedriver "$rdev"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# find the first swap dev which would get used for swsusp
|
|
||||||
[ -z "$thawdev" ] && thawdev=$(awk '/^[ \t]*[^#]/ { if ($3 == "swap") { print $1; exit }}' $fstab)
|
|
||||||
swsuspdev="$thawdev"
|
|
||||||
if [ -n "$swsuspdev" ]; then
|
|
||||||
if [[ "$swsuspdev" =~ ^(UUID=|LABEL=) ]]; then
|
|
||||||
swsuspdev=$(resolve_device_name "$swsuspdev")
|
|
||||||
fi
|
|
||||||
findstoragedriver "$swsuspdev"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
cemit()
|
|
||||||
{
|
|
||||||
cat
|
|
||||||
}
|
|
||||||
|
|
||||||
emit()
|
|
||||||
{
|
|
||||||
NONL=""
|
|
||||||
if [ "$1" == "-n" ]; then
|
|
||||||
NONL="-n"
|
|
||||||
shift
|
|
||||||
fi
|
|
||||||
echo $NONL "$@"
|
|
||||||
}
|
|
||||||
|
|
||||||
emitdmraids()
|
|
||||||
{
|
|
||||||
if [ -z "$nodmraid" -a -n "$DMRAIDS" ]; then
|
|
||||||
for raid in $DMRAIDS; do
|
|
||||||
echo -n "rd_DM_UUID=$raid "
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# HACK: module loading + device creation isn't necessarily synchronous...
|
|
||||||
# this will make sure that we have all of our devices before trying
|
|
||||||
# things like RAID or LVM
|
|
||||||
emitdmraids
|
|
||||||
|
|
||||||
emitcrypto()
|
|
||||||
{
|
|
||||||
local luksuuid=$(grep "^$2 " /etc/crypttab 2>/dev/null| awk '{ print $2 }')
|
|
||||||
if [ -z "$luksuuid" ]; then
|
|
||||||
luksuuid="$2"
|
|
||||||
fi
|
|
||||||
echo -n "rd_LUKS_UUID=$luksuuid "
|
|
||||||
}
|
|
||||||
|
|
||||||
for cryptdev in ${!cryptopart@} ; do
|
|
||||||
emitcrypto `eval echo '$'$cryptdev`
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ -n "$raiddevices" ]; then
|
|
||||||
for dev in $raiddevices; do
|
|
||||||
echo -n "rd_MD_UUID=${dev} "
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
for cryptdev in ${!cryptoraid@} ; do
|
|
||||||
emitcrypto `eval echo '$'$cryptdev`
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ -z "$nolvm" -a -n "$vg_list" ]; then
|
|
||||||
for vg in $vg_list; do
|
|
||||||
echo -n "rd_LVM_VG=$vg "
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
for cryptdev in ${!cryptolv@} ; do
|
|
||||||
emitcrypto `eval echo '$'$cryptdev`
|
|
||||||
done
|
|
||||||
|
|
||||||
# output local keyboard/18n settings
|
|
||||||
. /etc/sysconfig/keyboard
|
|
||||||
. /etc/sysconfig/i18n
|
|
||||||
|
|
||||||
for i in KEYTABLE SYSFONT SYSFONTACM UNIMAP LANG; do
|
|
||||||
val=$(eval echo \$$i)
|
|
||||||
[[ $val ]] && echo -n "$i=$val "
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ -n "$KEYBOARDTYPE" -a "$KEYBOARDTYPE" != "pc" ]; then
|
|
||||||
echo -n "KEYBOARDTYPE=$KEYBOARDTYPE "
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "$rootdev" ]; then
|
|
||||||
echo -n "root=$rootdev "
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -L /usr/share/plymouth/themes/default.plymouth ]; then
|
|
||||||
theme=$(basename \
|
|
||||||
$(dirname \
|
|
||||||
$(readlink -f \
|
|
||||||
/usr/share/plymouth/themes/default.plymouth)))
|
|
||||||
[ -n "$theme" ] && echo -n "rd_plytheme=$theme "
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo
|
|
||||||
# vim:ts=8:sw=4:sts=4:et
|
|
||||||
1047
dracut-init.sh
Normal file
1047
dracut-init.sh
Normal file
File diff suppressed because it is too large
Load Diff
43
dracut-initramfs-restore.sh
Normal file
43
dracut-initramfs-restore.sh
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# do some sanity checks first
|
||||||
|
[ -e /run/initramfs/bin/sh ] && exit 0
|
||||||
|
[ -e /run/initramfs/.need_shutdown ] || exit 0
|
||||||
|
|
||||||
|
KERNEL_VERSION="$(uname -r)"
|
||||||
|
|
||||||
|
[[ $dracutbasedir ]] || dracutbasedir=/usr/lib/dracut
|
||||||
|
SKIP="$dracutbasedir/skipcpio"
|
||||||
|
[[ -x $SKIP ]] || SKIP=cat
|
||||||
|
|
||||||
|
[[ -f /etc/machine-id ]] && read MACHINE_ID < /etc/machine-id
|
||||||
|
|
||||||
|
mount -o ro /boot &>/dev/null || true
|
||||||
|
|
||||||
|
if [[ $MACHINE_ID ]] && [[ -d /boot/${MACHINE_ID} || -L /boot/${MACHINE_ID} ]] ; then
|
||||||
|
IMG="/boot/${MACHINE_ID}/${KERNEL_VERSION}/initrd"
|
||||||
|
fi
|
||||||
|
[[ -f $IMG ]] || IMG="/boot/initramfs-${KERNEL_VERSION}.img"
|
||||||
|
|
||||||
|
cd /run/initramfs
|
||||||
|
|
||||||
|
[ -f .need_shutdown -a -f "$IMG" ] || exit 1
|
||||||
|
|
||||||
|
if $SKIP "$IMG" | zcat | cpio -id --no-absolute-filenames --quiet >/dev/null; then
|
||||||
|
rm -f -- .need_shutdown
|
||||||
|
elif $SKIP "$IMG" | xzcat | cpio -id --no-absolute-filenames --quiet >/dev/null; then
|
||||||
|
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
|
||||||
|
rm -f -- /run/initramfs/shutdown
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
||||||
441
dracut-logger.sh
Executable file
441
dracut-logger.sh
Executable file
@@ -0,0 +1,441 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# logging faciality module for dracut both at build- and boot-time
|
||||||
|
#
|
||||||
|
# Copyright 2010 Amadeusz Żołnowski <aidecoe@aidecoe.name>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
|
__DRACUT_LOGGER__=1
|
||||||
|
|
||||||
|
|
||||||
|
## @brief Logging facility module for dracut both at build- and boot-time.
|
||||||
|
#
|
||||||
|
# @section intro Introduction
|
||||||
|
#
|
||||||
|
# The logger takes a bit from Log4j philosophy. There are defined 6 logging
|
||||||
|
# levels:
|
||||||
|
# - TRACE (6)
|
||||||
|
# The TRACE Level designates finer-grained informational events than the
|
||||||
|
# DEBUG.
|
||||||
|
# - DEBUG (5)
|
||||||
|
# The DEBUG Level designates fine-grained informational events that are most
|
||||||
|
# useful to debug an application.
|
||||||
|
# - INFO (4)
|
||||||
|
# The INFO level designates informational messages that highlight the
|
||||||
|
# progress of the application at coarse-grained level.
|
||||||
|
# - WARN (3)
|
||||||
|
# The WARN level designates potentially harmful situations.
|
||||||
|
# - ERROR (2)
|
||||||
|
# The ERROR level designates error events that might still allow the
|
||||||
|
# application to continue running.
|
||||||
|
# - FATAL (1)
|
||||||
|
# The FATAL level designates very severe error events that will presumably
|
||||||
|
# lead the application to abort.
|
||||||
|
# Descriptions are borrowed from Log4j documentation:
|
||||||
|
# http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/Level.html
|
||||||
|
#
|
||||||
|
# @section usage Usage
|
||||||
|
#
|
||||||
|
# First of all you have to start with dlog_init() function which initializes
|
||||||
|
# required variables. Don't call any other logging function before that one!
|
||||||
|
# If you're ready with this, you can use following functions which corresponds
|
||||||
|
# clearly to levels listed in @ref intro Introduction. Here they are:
|
||||||
|
# - dtrace()
|
||||||
|
# - ddebug()
|
||||||
|
# - dinfo()
|
||||||
|
# - dwarn()
|
||||||
|
# - derror()
|
||||||
|
# - dfatal()
|
||||||
|
# They take all arguments given as a single message to be logged. See dlog()
|
||||||
|
# function for details how it works. Note that you shouldn't use dlog() by
|
||||||
|
# yourself. It's wrapped with above functions.
|
||||||
|
#
|
||||||
|
# @see dlog_init() dlog()
|
||||||
|
#
|
||||||
|
# @section conf Configuration
|
||||||
|
#
|
||||||
|
# Logging is controlled by following global variables:
|
||||||
|
# - @var stdloglvl - logging level to standard error (console output)
|
||||||
|
# - @var sysloglvl - logging level to syslog (by logger command)
|
||||||
|
# - @var fileloglvl - logging level to file
|
||||||
|
# - @var kmsgloglvl - logging level to /dev/kmsg (only for boot-time)
|
||||||
|
# - @var logfile - log file which is used when @var fileloglvl is higher
|
||||||
|
# than 0
|
||||||
|
# and two global variables: @var maxloglvl and @var syslogfacility which <b>must
|
||||||
|
# not</b> be overwritten. Both are set by dlog_init(). @var maxloglvl holds
|
||||||
|
# maximum logging level of those three and indicates that dlog_init() was run.
|
||||||
|
# @var syslogfacility is set either to 'user' (when building initramfs) or
|
||||||
|
# 'daemon' (when booting).
|
||||||
|
#
|
||||||
|
# Logging level set by the variable means that messages from this logging level
|
||||||
|
# and above (FATAL is the highest) will be shown. Logging levels may be set
|
||||||
|
# independently for each destination (stderr, syslog, file, kmsg).
|
||||||
|
#
|
||||||
|
# @see dlog_init()
|
||||||
|
|
||||||
|
|
||||||
|
## @brief Initializes dracut Logger.
|
||||||
|
#
|
||||||
|
# @retval 1 if something has gone wrong
|
||||||
|
# @retval 0 on success.
|
||||||
|
#
|
||||||
|
# @note This function need to be called before any other from this file.
|
||||||
|
#
|
||||||
|
# If any of the variables is not set, this function set it to default:
|
||||||
|
# - @var stdloglvl = 4 (info)
|
||||||
|
# - @var sysloglvl = 0 (no logging)
|
||||||
|
# - @var fileloglvl is set to 4 when @var logfile is set too, otherwise it's
|
||||||
|
# - @var kmsgloglvl = 0 (no logging)
|
||||||
|
# set to 0
|
||||||
|
#
|
||||||
|
# @warning Function sets global variables @var maxloglvl and @syslogfacility.
|
||||||
|
# See file doc comment for details.
|
||||||
|
dlog_init() {
|
||||||
|
local __oldumask
|
||||||
|
local ret=0; local errmsg
|
||||||
|
[ -z "$stdloglvl" ] && stdloglvl=4
|
||||||
|
[ -z "$sysloglvl" ] && sysloglvl=0
|
||||||
|
[ -z "$kmsgloglvl" ] && kmsgloglvl=0
|
||||||
|
# Skip initialization if it's already done.
|
||||||
|
[ -n "$maxloglvl" ] && return 0
|
||||||
|
|
||||||
|
if [ -z "$fileloglvl" ]; then
|
||||||
|
[ -w "$logfile" ] && fileloglvl=4 || fileloglvl=0
|
||||||
|
elif (( $fileloglvl > 0 )); then
|
||||||
|
if [[ $logfile ]]; then
|
||||||
|
__oldumask=$(umask)
|
||||||
|
umask 0377
|
||||||
|
! [ -e "$logfile" ] && >"$logfile"
|
||||||
|
umask $__oldumask
|
||||||
|
if [ -w "$logfile" -a -f "$logfile" ]; then
|
||||||
|
# Mark new run in the log file
|
||||||
|
echo >>"$logfile"
|
||||||
|
if command -v date >/dev/null; then
|
||||||
|
echo "=== $(date) ===" >>"$logfile"
|
||||||
|
else
|
||||||
|
echo "===============================================" >>"$logfile"
|
||||||
|
fi
|
||||||
|
echo >>"$logfile"
|
||||||
|
else
|
||||||
|
# We cannot log to file, so turn this facility off.
|
||||||
|
fileloglvl=0
|
||||||
|
ret=1
|
||||||
|
errmsg="'$logfile' is not a writable file"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if (( $UID != 0 )); then
|
||||||
|
kmsgloglvl=0
|
||||||
|
sysloglvl=0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if (( $sysloglvl > 0 )); then
|
||||||
|
if [[ -d /run/systemd/journal ]] \
|
||||||
|
&& type -P systemd-cat &>/dev/null \
|
||||||
|
&& systemctl --quiet is-active systemd-journald.socket &>/dev/null \
|
||||||
|
&& { echo "dracut-$DRACUT_VERSION" | systemd-cat -t 'dracut' &>/dev/null; } ; then
|
||||||
|
readonly _systemdcatfile="$DRACUT_TMPDIR/systemd-cat"
|
||||||
|
mkfifo "$_systemdcatfile"
|
||||||
|
readonly _dlogfd=15
|
||||||
|
systemd-cat -t 'dracut' --level-prefix=true <"$_systemdcatfile" &
|
||||||
|
exec 15>"$_systemdcatfile"
|
||||||
|
elif ! [ -S /dev/log -a -w /dev/log ] || ! command -v logger >/dev/null; then
|
||||||
|
# We cannot log to syslog, so turn this facility off.
|
||||||
|
kmsgloglvl=$sysloglvl
|
||||||
|
sysloglvl=0
|
||||||
|
ret=1
|
||||||
|
errmsg="No '/dev/log' or 'logger' included for syslog logging"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if (($sysloglvl > 0)) || (($kmsgloglvl > 0 )); then
|
||||||
|
if [ -n "$dracutbasedir" ]; then
|
||||||
|
readonly syslogfacility=user
|
||||||
|
else
|
||||||
|
readonly syslogfacility=daemon
|
||||||
|
fi
|
||||||
|
export syslogfacility
|
||||||
|
fi
|
||||||
|
|
||||||
|
local lvl; local maxloglvl_l=0
|
||||||
|
for lvl in $stdloglvl $sysloglvl $fileloglvl $kmsgloglvl; do
|
||||||
|
(( $lvl > $maxloglvl_l )) && maxloglvl_l=$lvl
|
||||||
|
done
|
||||||
|
readonly maxloglvl=$maxloglvl_l
|
||||||
|
export maxloglvl
|
||||||
|
|
||||||
|
|
||||||
|
if (($stdloglvl < 6)) && (($kmsgloglvl < 6)) && (($fileloglvl < 6)) && (($sysloglvl < 6)); then
|
||||||
|
unset dtrace
|
||||||
|
dtrace() { :; };
|
||||||
|
fi
|
||||||
|
|
||||||
|
if (($stdloglvl < 5)) && (($kmsgloglvl < 5)) && (($fileloglvl < 5)) && (($sysloglvl < 5)); then
|
||||||
|
unset ddebug
|
||||||
|
ddebug() { :; };
|
||||||
|
fi
|
||||||
|
|
||||||
|
if (($stdloglvl < 4)) && (($kmsgloglvl < 4)) && (($fileloglvl < 4)) && (($sysloglvl < 4)); then
|
||||||
|
unset dinfo
|
||||||
|
dinfo() { :; };
|
||||||
|
fi
|
||||||
|
|
||||||
|
if (($stdloglvl < 3)) && (($kmsgloglvl < 3)) && (($fileloglvl < 3)) && (($sysloglvl < 3)); then
|
||||||
|
unset dwarn
|
||||||
|
dwarn() { :; };
|
||||||
|
unset dwarning
|
||||||
|
dwarning() { :; };
|
||||||
|
fi
|
||||||
|
|
||||||
|
if (($stdloglvl < 2)) && (($kmsgloglvl < 2)) && (($fileloglvl < 2)) && (($sysloglvl < 2)); then
|
||||||
|
unset derror
|
||||||
|
derror() { :; };
|
||||||
|
fi
|
||||||
|
|
||||||
|
if (($stdloglvl < 1)) && (($kmsgloglvl < 1)) && (($fileloglvl < 1)) && (($sysloglvl < 1)); then
|
||||||
|
unset dfatal
|
||||||
|
dfatal() { :; };
|
||||||
|
fi
|
||||||
|
|
||||||
|
[ -n "$errmsg" ] && derror "$errmsg"
|
||||||
|
|
||||||
|
return $ret
|
||||||
|
}
|
||||||
|
|
||||||
|
## @brief Converts numeric logging level to the first letter of level name.
|
||||||
|
#
|
||||||
|
# @param lvl Numeric logging level in range from 1 to 6.
|
||||||
|
# @retval 1 if @a lvl is out of range.
|
||||||
|
# @retval 0 if @a lvl is correct.
|
||||||
|
# @result Echoes first letter of level name.
|
||||||
|
_lvl2char() {
|
||||||
|
case "$1" in
|
||||||
|
1) echo F;;
|
||||||
|
2) echo E;;
|
||||||
|
3) echo W;;
|
||||||
|
4) echo I;;
|
||||||
|
5) echo D;;
|
||||||
|
6) echo T;;
|
||||||
|
*) return 1;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
## @brief Converts numeric level to logger priority defined by POSIX.2.
|
||||||
|
#
|
||||||
|
# @param lvl Numeric logging level in range from 1 to 6.
|
||||||
|
# @retval 1 if @a lvl is out of range.
|
||||||
|
# @retval 0 if @a lvl is correct.
|
||||||
|
# @result Echoes logger priority.
|
||||||
|
_lvl2syspri() {
|
||||||
|
printf $syslogfacility.
|
||||||
|
case "$1" in
|
||||||
|
1) echo crit;;
|
||||||
|
2) echo error;;
|
||||||
|
3) echo warning;;
|
||||||
|
4) echo info;;
|
||||||
|
5) echo debug;;
|
||||||
|
6) echo debug;;
|
||||||
|
*) return 1;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
## @brief Converts dracut-logger numeric level to syslog log level
|
||||||
|
#
|
||||||
|
# @param lvl Numeric logging level in range from 1 to 6.
|
||||||
|
# @retval 1 if @a lvl is out of range.
|
||||||
|
# @retval 0 if @a lvl is correct.
|
||||||
|
# @result Echoes kernel console numeric log level
|
||||||
|
#
|
||||||
|
# Conversion is done as follows:
|
||||||
|
#
|
||||||
|
# <tt>
|
||||||
|
# none -> LOG_EMERG (0)
|
||||||
|
# none -> LOG_ALERT (1)
|
||||||
|
# FATAL(1) -> LOG_CRIT (2)
|
||||||
|
# ERROR(2) -> LOG_ERR (3)
|
||||||
|
# WARN(3) -> LOG_WARNING (4)
|
||||||
|
# none -> LOG_NOTICE (5)
|
||||||
|
# INFO(4) -> LOG_INFO (6)
|
||||||
|
# DEBUG(5) -> LOG_DEBUG (7)
|
||||||
|
# TRACE(6) /
|
||||||
|
# </tt>
|
||||||
|
#
|
||||||
|
# @see /usr/include/sys/syslog.h
|
||||||
|
_dlvl2syslvl() {
|
||||||
|
local lvl
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
1) lvl=2;;
|
||||||
|
2) lvl=3;;
|
||||||
|
3) lvl=4;;
|
||||||
|
4) lvl=6;;
|
||||||
|
5) lvl=7;;
|
||||||
|
6) lvl=7;;
|
||||||
|
*) return 1;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
[ "$syslogfacility" = user ] && echo $((8+$lvl)) || echo $((24+$lvl))
|
||||||
|
}
|
||||||
|
|
||||||
|
## @brief Prints to stderr and/or writes to file, to syslog and/or /dev/kmsg
|
||||||
|
# given message with given level (priority).
|
||||||
|
#
|
||||||
|
# @param lvl Numeric logging level.
|
||||||
|
# @param msg Message.
|
||||||
|
# @retval 0 It's always returned, even if logging failed.
|
||||||
|
#
|
||||||
|
# @note This function is not supposed to be called manually. Please use
|
||||||
|
# dtrace(), ddebug(), or others instead which wrap this one.
|
||||||
|
#
|
||||||
|
# This is core logging function which logs given message to standard error, file
|
||||||
|
# and/or syslog (with POSIX shell command <tt>logger</tt>) and/or to /dev/kmsg.
|
||||||
|
# The format is following:
|
||||||
|
#
|
||||||
|
# <tt>X: some message</tt>
|
||||||
|
#
|
||||||
|
# where @c X is the first letter of logging level. See module description for
|
||||||
|
# details on that.
|
||||||
|
#
|
||||||
|
# Message to syslog is sent with tag @c dracut. Priorities are mapped as
|
||||||
|
# following:
|
||||||
|
# - @c FATAL to @c crit
|
||||||
|
# - @c ERROR to @c error
|
||||||
|
# - @c WARN to @c warning
|
||||||
|
# - @c INFO to @c info
|
||||||
|
# - @c DEBUG and @c TRACE both to @c debug
|
||||||
|
_do_dlog() {
|
||||||
|
local lvl="$1"; shift
|
||||||
|
local lvlc=$(_lvl2char "$lvl") || return 0
|
||||||
|
local msg="$*"
|
||||||
|
local lmsg="$lvlc: $*"
|
||||||
|
|
||||||
|
(( $lvl <= $stdloglvl )) && printf -- 'dracut: %s\n' "$msg" >&2
|
||||||
|
|
||||||
|
if (( $lvl <= $sysloglvl )); then
|
||||||
|
if [[ "$_dlogfd" ]]; then
|
||||||
|
printf -- "<%s>%s\n" "$(($(_dlvl2syslvl $lvl) & 7))" "$msg" >&$_dlogfd
|
||||||
|
else
|
||||||
|
logger -t "dracut[$$]" -p $(_lvl2syspri $lvl) -- "$msg"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if (( $lvl <= $fileloglvl )) && [[ -w "$logfile" ]] && [[ -f "$logfile" ]]; then
|
||||||
|
echo "$lmsg" >>"$logfile"
|
||||||
|
fi
|
||||||
|
|
||||||
|
(( $lvl <= $kmsgloglvl )) && \
|
||||||
|
echo "<$(_dlvl2syslvl $lvl)>dracut[$$] $msg" >/dev/kmsg
|
||||||
|
}
|
||||||
|
|
||||||
|
## @brief Internal helper function for _do_dlog()
|
||||||
|
#
|
||||||
|
# @param lvl Numeric logging level.
|
||||||
|
# @param msg Message.
|
||||||
|
# @retval 0 It's always returned, even if logging failed.
|
||||||
|
#
|
||||||
|
# @note This function is not supposed to be called manually. Please use
|
||||||
|
# dtrace(), ddebug(), or others instead which wrap this one.
|
||||||
|
#
|
||||||
|
# This function calls _do_dlog() either with parameter msg, or if
|
||||||
|
# none is given, it will read standard input and will use every line as
|
||||||
|
# a message.
|
||||||
|
#
|
||||||
|
# This enables:
|
||||||
|
# dwarn "This is a warning"
|
||||||
|
# echo "This is a warning" | dwarn
|
||||||
|
dlog() {
|
||||||
|
[ -z "$maxloglvl" ] && return 0
|
||||||
|
(( $1 <= $maxloglvl )) || return 0
|
||||||
|
|
||||||
|
if (( $# > 1 )); then
|
||||||
|
_do_dlog "$@"
|
||||||
|
else
|
||||||
|
while read line || [ -n "$line" ]; do
|
||||||
|
_do_dlog "$1" "$line"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
## @brief Logs message at TRACE level (6)
|
||||||
|
#
|
||||||
|
# @param msg Message.
|
||||||
|
# @retval 0 It's always returned, even if logging failed.
|
||||||
|
dtrace() {
|
||||||
|
set +x
|
||||||
|
dlog 6 "$@"
|
||||||
|
[ -n "$debug" ] && set -x || :
|
||||||
|
}
|
||||||
|
|
||||||
|
## @brief Logs message at DEBUG level (5)
|
||||||
|
#
|
||||||
|
# @param msg Message.
|
||||||
|
# @retval 0 It's always returned, even if logging failed.
|
||||||
|
ddebug() {
|
||||||
|
set +x
|
||||||
|
dlog 5 "$@"
|
||||||
|
[ -n "$debug" ] && set -x || :
|
||||||
|
}
|
||||||
|
|
||||||
|
## @brief Logs message at INFO level (4)
|
||||||
|
#
|
||||||
|
# @param msg Message.
|
||||||
|
# @retval 0 It's always returned, even if logging failed.
|
||||||
|
dinfo() {
|
||||||
|
set +x
|
||||||
|
dlog 4 "$@"
|
||||||
|
[ -n "$debug" ] && set -x || :
|
||||||
|
}
|
||||||
|
|
||||||
|
## @brief Logs message at WARN level (3)
|
||||||
|
#
|
||||||
|
# @param msg Message.
|
||||||
|
# @retval 0 It's always returned, even if logging failed.
|
||||||
|
dwarn() {
|
||||||
|
set +x
|
||||||
|
dlog 3 "$@"
|
||||||
|
[ -n "$debug" ] && set -x || :
|
||||||
|
}
|
||||||
|
|
||||||
|
## @brief It's an alias to dwarn() function.
|
||||||
|
#
|
||||||
|
# @param msg Message.
|
||||||
|
# @retval 0 It's always returned, even if logging failed.
|
||||||
|
dwarning() {
|
||||||
|
set +x
|
||||||
|
dwarn "$@"
|
||||||
|
[ -n "$debug" ] && set -x || :
|
||||||
|
}
|
||||||
|
|
||||||
|
## @brief Logs message at ERROR level (2)
|
||||||
|
#
|
||||||
|
# @param msg Message.
|
||||||
|
# @retval 0 It's always returned, even if logging failed.
|
||||||
|
derror() {
|
||||||
|
set +x
|
||||||
|
dlog 2 "$@"
|
||||||
|
[ -n "$debug" ] && set -x || :
|
||||||
|
}
|
||||||
|
|
||||||
|
## @brief Logs message at FATAL level (1)
|
||||||
|
#
|
||||||
|
# @param msg Message.
|
||||||
|
# @retval 0 It's always returned, even if logging failed.
|
||||||
|
dfatal() {
|
||||||
|
set +x
|
||||||
|
dlog 1 "$@"
|
||||||
|
[ -n "$debug" ] && set -x || :
|
||||||
|
}
|
||||||
299
dracut.8
299
dracut.8
@@ -1,299 +0,0 @@
|
|||||||
.TH DRACUT 8 "June 2009" "Linux"
|
|
||||||
.SH NAME
|
|
||||||
switch_root \- switch to another filesystem as the root of the mount tree.
|
|
||||||
.SH SYNOPSIS
|
|
||||||
\fBdracut\fR [\fIOPTION\fR]... \fI<image>\fR \fI<kernel-version>\fR
|
|
||||||
|
|
||||||
.SH DESCRIPTION
|
|
||||||
.B switch_root
|
|
||||||
\fBdracut\fR creates an initial image used by the kernel for
|
|
||||||
preloading the block device modules (such as IDE, SCSI or RAID)
|
|
||||||
which are needed to access the root filesystem.
|
|
||||||
|
|
||||||
.SH OPTIONS
|
|
||||||
.TP
|
|
||||||
.BR \-f ", " \-\-force
|
|
||||||
overwrite existing initramfs file.
|
|
||||||
.TP
|
|
||||||
.BR \-m ", " \-\-modules " \fILIST\fR"
|
|
||||||
specify a space-separated list of dracut modules to call
|
|
||||||
when building the initramfs.
|
|
||||||
Modules are located in
|
|
||||||
.IR /usr/share/dracut/modules.d .
|
|
||||||
.TP
|
|
||||||
.BR \-o ", " \-\-omit " \fILIST\fR"
|
|
||||||
omit a space-separated list of dracut modules.
|
|
||||||
.TP
|
|
||||||
.BR \-a ", " \-\-add " \fILIST\fR"
|
|
||||||
add a space-separated list of dracut modules.
|
|
||||||
.TP
|
|
||||||
.BR \-d ", " \-\-drivers " \fILIST\fR"
|
|
||||||
specify a space-separated list of kernel modules to include in the initramfs.
|
|
||||||
.TP
|
|
||||||
.BR \-k ", " \-\-kmoddir " \fI{DIR}\fR
|
|
||||||
specify the directory, where to look for kernel modules
|
|
||||||
.TP
|
|
||||||
.BR " \-\-fwdir " \fI{DIR}\fR
|
|
||||||
specify additional directory, where to look for firmwares
|
|
||||||
.TP
|
|
||||||
.BR \-\-kernel-only
|
|
||||||
only install kernel drivers and firmware files
|
|
||||||
.TP
|
|
||||||
.BR \-\-no-kernel
|
|
||||||
do not install kernel drivers and firmware files
|
|
||||||
.TP
|
|
||||||
.BR \-\-strip
|
|
||||||
strip binaries in the initramfs (default)
|
|
||||||
.TP
|
|
||||||
.BR \-\-nostrip
|
|
||||||
do not strip binaries in the initramfs
|
|
||||||
.TP
|
|
||||||
.BR \-h ", " \-\-help
|
|
||||||
display help text and exit.
|
|
||||||
.TP
|
|
||||||
.B \-\-debug
|
|
||||||
output debug information of the build process
|
|
||||||
.TP
|
|
||||||
.BR \-v ", " \-\-verbose
|
|
||||||
verbose output during the build process
|
|
||||||
.TP
|
|
||||||
.BR \-c ", " \-\-conf " \fIFILE\fR"
|
|
||||||
specify configuration file to use.
|
|
||||||
Default:
|
|
||||||
.IR /etc/dracut.conf
|
|
||||||
.TP
|
|
||||||
.BR \-l ", " \-\-local
|
|
||||||
local mode. Use modules from the current working
|
|
||||||
directory instead of the system-wide installed in
|
|
||||||
.IR /usr/share/dracut/modules.d .
|
|
||||||
Useful when running dracut from a git checkout.
|
|
||||||
.TP
|
|
||||||
.BR \-H ", " \-\-hostonly
|
|
||||||
Host-Only mode: Install only what is needed for
|
|
||||||
booting the local host instead of a generic host.
|
|
||||||
.TP
|
|
||||||
.BR \-i ", " \-\-include " \fISOURCE\fR" "" " \fITARGET\fR"
|
|
||||||
include the files in the SOURCE directory into the
|
|
||||||
target directory in the final initramfs.
|
|
||||||
.TP
|
|
||||||
.BR \-I ", " \-\-install " \fILIST\fR"
|
|
||||||
install the space separated list of files into the initramfs.
|
|
||||||
|
|
||||||
.SH KERNEL COMMAND LINE
|
|
||||||
The root filesystem used by the kernel is specified in the boot configuration
|
|
||||||
file, as always. The traditional \fBroot=/dev/hda1\fR style device
|
|
||||||
specification is allowed. If a label is used, as in \fBroot=LABEL=rootPart\fR
|
|
||||||
the initrd will search all available devices for an ext2 or ext3 filesystem
|
|
||||||
with the appropriate label, and mount that device as the root filesystem.
|
|
||||||
\fBroot=UUID=uuidnumber\fR will mount the partition with that UUID as the
|
|
||||||
root filesystem.
|
|
||||||
|
|
||||||
.SH Standard
|
|
||||||
.TP
|
|
||||||
.B init=<path to real init>
|
|
||||||
.TP
|
|
||||||
.B root=<path to blockdevice>
|
|
||||||
specify e.g. \fI/dev/sda1\fR or
|
|
||||||
\fI/dev/disk/by-path/pci-0000:00:1f.1-scsi-0:0:1:0-part1\fR
|
|
||||||
|
|
||||||
.SH I18N
|
|
||||||
e.g. LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=de-latin1-nodeadkeys
|
|
||||||
.TP
|
|
||||||
.B KEYBOARDTYPE=sun|pc
|
|
||||||
will be written to /etc/sysconfig/keyboard in the initramfs
|
|
||||||
.TP
|
|
||||||
.B KEYTABLE=<keytable filename>
|
|
||||||
will be written to /etc/sysconfig/keyboard in the initramfs
|
|
||||||
.TP
|
|
||||||
.B SYSFONT= Console font
|
|
||||||
will be written to /etc/sysconfig/i18n in the initramfs
|
|
||||||
.TP
|
|
||||||
.B SYSFONTACM= Unicode font map
|
|
||||||
will be written to /etc/sysconfig/i18n in the initramfs
|
|
||||||
.TP
|
|
||||||
.B UNIMAP= Unicode font map
|
|
||||||
will be written to /etc/sysconfig/i18n in the initramfs
|
|
||||||
.TP
|
|
||||||
.B LANG=<locale>
|
|
||||||
will be written to /etc/sysconfig/i18n in the initramfs
|
|
||||||
|
|
||||||
.SH Bootsplash - plymouth
|
|
||||||
.TP
|
|
||||||
.B rd_plytheme=<theme name>
|
|
||||||
specify the plymouth bootsplash theme (fallback is text)
|
|
||||||
|
|
||||||
.SH LVM
|
|
||||||
.TP
|
|
||||||
.B rd_NO_LVM
|
|
||||||
disable LVM detection
|
|
||||||
.TP
|
|
||||||
.B rd_LVM_VG=<volume group name>
|
|
||||||
only activate the volume groups with the given name
|
|
||||||
|
|
||||||
.SH crypto LUKS
|
|
||||||
.TP
|
|
||||||
.B rd_NO_LUKS
|
|
||||||
disable crypto LUKS detection
|
|
||||||
.TP
|
|
||||||
.B rd_LUKS_UUID=<luks uuid>
|
|
||||||
only activate the LUKS partitions with the given UUID
|
|
||||||
|
|
||||||
.SH MD
|
|
||||||
.TP
|
|
||||||
.B rd_NO_MD
|
|
||||||
disable MD RAID detection
|
|
||||||
.TP
|
|
||||||
.B rd_NO_MDIMSM
|
|
||||||
no MD RAID for imsm/isw raids, use dmraid instead
|
|
||||||
.TP
|
|
||||||
.B rd_MD_UUID=<md uuid>
|
|
||||||
only activate the raid sets with the given UUID
|
|
||||||
|
|
||||||
.SH DMRAID
|
|
||||||
.TP
|
|
||||||
.B rd_NO_DM
|
|
||||||
disable DM RAID detection
|
|
||||||
.TP
|
|
||||||
.B rd_DM_UUID=<dmraid uuid>
|
|
||||||
only activate the raid sets with the given UUID
|
|
||||||
|
|
||||||
.SH DASD
|
|
||||||
.TP
|
|
||||||
.B dasd=....
|
|
||||||
same syntax as the kernel module parameter (s390 only)
|
|
||||||
|
|
||||||
.SH DHCP
|
|
||||||
.TP
|
|
||||||
.B root=dhcp
|
|
||||||
get IP from dhcp server, root-path option from dhcp specifies root location
|
|
||||||
|
|
||||||
.SH NFS
|
|
||||||
.TP
|
|
||||||
.B root=[<server-ip>:]<root-dir>[:<nfs-options>]
|
|
||||||
mount nfs share from <server-ip>:/<root-dir>, if no server-ip is given,
|
|
||||||
use dhcp next_server.
|
|
||||||
NFS options can be appended with the prefix "." or ","
|
|
||||||
.TP
|
|
||||||
.B root=nfs:[<server-ip>:]<root-dir>[:<nfs-options>]
|
|
||||||
.TP
|
|
||||||
.B root=nfs4:[<server-ip>:]<root-dir>[:<nfs-options>]
|
|
||||||
.TP
|
|
||||||
.B root=dhcp
|
|
||||||
root=dhcp alone directs initrd to look at the DHCP root-path where NFS
|
|
||||||
options can be specified.
|
|
||||||
root-path=<server-ip>:<root-dir>[,<nfs-options>]
|
|
||||||
root-path=nfs:<server-ip>:<root-dir>[,<nfs-options>]
|
|
||||||
root-path=nfs4:<server-ip>:<root-dir>[,<nfs-options>]
|
|
||||||
.TP
|
|
||||||
.B root=/dev/nfs nfsroot=[<server-ip>:]<root-dir>[,<nfs-options>]
|
|
||||||
\fBDeprecated!\fR kernel Documentation/filesystems/nfsroot.txt defines
|
|
||||||
this method.
|
|
||||||
This is supported by dracut but not recommended.
|
|
||||||
|
|
||||||
.SH iSCSI
|
|
||||||
.TP
|
|
||||||
.B root=iscsi:[<servername>]:[<protocol>]:[<port>]:[<LUN>]:<targetname>
|
|
||||||
protocol defaults to "6", LUN defaults to "0".
|
|
||||||
|
|
||||||
If the "servername" field is provided by BOOTP or DHCP, then that
|
|
||||||
field is used in conjunction with other associated fields to contact
|
|
||||||
the boot server in the Boot stage (Section 7). However, if the
|
|
||||||
"servername" field is not provided, then the "targetname" field is
|
|
||||||
then used in the Discovery Service stage in conjunction with other
|
|
||||||
associated fields.
|
|
||||||
|
|
||||||
http://tools.ietf.org/html/rfc4173
|
|
||||||
|
|
||||||
.TP
|
|
||||||
.B root=iscsi:[<servername>]:[<protocol>]:[<port>]:[<LUN>]:<targetname>
|
|
||||||
e.g. root=iscsi:192.168.50.1::::iqn.2009-06.dracut:target0
|
|
||||||
|
|
||||||
.TP
|
|
||||||
.B root=??? netroot=iscsi:[<servername>]:[<protocol>]:[<port>]:[<LUN>]:<targetname> ...
|
|
||||||
multiple netroot options allow setting up multiple iscsi disks
|
|
||||||
e.g.
|
|
||||||
root=UUID=12424547 netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target0 netroot=iscsi:192.168.50.1::::iqn.2009-06.dracut:target1
|
|
||||||
.B not yet implemented
|
|
||||||
.TP
|
|
||||||
.B root=??? iscsi_initiator= iscsi_target_name= iscsi_target_ip= iscsi_target_port= iscsi_target_group= iscsi_username= iscsi_password= iscsi_in_username= iscsi_in_password=
|
|
||||||
|
|
||||||
.TP
|
|
||||||
.B root=??? iscsi_firmware
|
|
||||||
will read the iscsi parameter from the BIOS firmware
|
|
||||||
|
|
||||||
.SH NBD
|
|
||||||
.TP
|
|
||||||
.B root=nbd:<server>:<port>[:<fstype>][:<mountopts>]
|
|
||||||
mount nbd share from <server>
|
|
||||||
.TP
|
|
||||||
.B root=dhcp
|
|
||||||
with dhcp root-path=nbd:<server>:<port>[:<fstype>][:<mountopts>]
|
|
||||||
root=dhcp alone directs initrd to look at the DHCP root-path where NBD options can be specified.
|
|
||||||
This syntax is only usable in cases where you are directly mounting the volume as the rootfs.
|
|
||||||
|
|
||||||
.SH Network
|
|
||||||
.TP bootdev=<interface>
|
|
||||||
.B specify the network interface to boot from
|
|
||||||
.TP
|
|
||||||
.B ip={dhcp|on|any}
|
|
||||||
get ip from dhcp server from all interfaces. If root=dhcp, loop sequentially through all interfaces (eth0, eth1, ...) and use the first with a valid DHCP root-path.
|
|
||||||
.TP
|
|
||||||
.B ip=<interface>:{dhcp|on|any}
|
|
||||||
get ip from dhcp server on a specific interface
|
|
||||||
.TP
|
|
||||||
.B ip=<client-IP-number>:[<server-id>]:<gateway-IP-number>:<netmask>:<client-hostname>:<interface>:{none|off}
|
|
||||||
explicit network configuration
|
|
||||||
|
|
||||||
.SH Misc
|
|
||||||
.TP
|
|
||||||
.B rdblacklist=<drivername>
|
|
||||||
do not load kernel module <drivername>
|
|
||||||
|
|
||||||
.SH Debug
|
|
||||||
.TP
|
|
||||||
.B rdshell
|
|
||||||
allow dropping to a shell, if root mounting fails
|
|
||||||
.TP
|
|
||||||
.B rdinitdebug
|
|
||||||
set -x for the dracut shell
|
|
||||||
.TP
|
|
||||||
.B rdbreak
|
|
||||||
drop to a shell at the end
|
|
||||||
.TP
|
|
||||||
.B rdbreak={pre-udev|pre-mount|mount|pre-pivot|commandline|initqueue}
|
|
||||||
drop to a shell on defined breakpoint
|
|
||||||
.TP
|
|
||||||
.B rdudevinfo
|
|
||||||
set udev to loglevel info
|
|
||||||
.TP
|
|
||||||
.B rdudevdebug
|
|
||||||
set udev to loglevel debug
|
|
||||||
.TP
|
|
||||||
.B rdnetdebug
|
|
||||||
debug network scripts in dracut. Output is written to /tmp/
|
|
||||||
|
|
||||||
.SH CONFIGURATION IN INITRAMFS
|
|
||||||
.TP
|
|
||||||
.B /conf/conf.d/
|
|
||||||
Any files found in /conf/conf.d/ will be sourced in the initramfs to
|
|
||||||
set initial values. Command line options will override these values
|
|
||||||
set in the configuration files.
|
|
||||||
|
|
||||||
.SH AUTHORS
|
|
||||||
.nf
|
|
||||||
Andreas Thienemann <andreas@bawue.net>
|
|
||||||
Bill Nottingham <notting@redhat.com>
|
|
||||||
Dave Jones <davej@redhat.com>
|
|
||||||
David Dillow <dave@thedillows.org>
|
|
||||||
Harald Hoyer <harald@redhat.com>
|
|
||||||
Jeremy Katz <katzj@redhat.com>
|
|
||||||
Peter Jones <pjones@redhat.com>
|
|
||||||
Seewer Philippe <philippe.seewer@bfh.ch>
|
|
||||||
Victor Lowther <victor.lowther@gmail.com>
|
|
||||||
Warren Togami <wtogami@redhat.com>
|
|
||||||
.fi
|
|
||||||
.SH AVAILABILITY
|
|
||||||
The dracut command is part of the dracut package and is available from
|
|
||||||
https://sourceforge.net/apps/trac/dracut/wiki
|
|
||||||
|
|
||||||
|
|
||||||
577
dracut.8.asc
Normal file
577
dracut.8.asc
Normal file
@@ -0,0 +1,577 @@
|
|||||||
|
DRACUT(8)
|
||||||
|
=========
|
||||||
|
:doctype: manpage
|
||||||
|
:man source: dracut
|
||||||
|
:man manual: dracut
|
||||||
|
|
||||||
|
NAME
|
||||||
|
----
|
||||||
|
dracut - low-level tool for generating an initramfs/initrd image
|
||||||
|
|
||||||
|
SYNOPSIS
|
||||||
|
--------
|
||||||
|
*dracut* [__OPTION...__] [__<image>__ [__<kernel version>__]]
|
||||||
|
|
||||||
|
DESCRIPTION
|
||||||
|
-----------
|
||||||
|
|
||||||
|
Create an initramfs <image> for the kernel with the version <kernel version>.
|
||||||
|
If <kernel version> is omitted, then the version of the actual running
|
||||||
|
kernel is used. If <image> is omitted or empty, then the default location
|
||||||
|
/boot/initramfs-<kernel version>.img is used.
|
||||||
|
|
||||||
|
dracut creates an initial image used by the kernel for preloading the block
|
||||||
|
device modules (such as IDE, SCSI or RAID) which are needed to access the root
|
||||||
|
filesystem, mounting the root filesystem and booting into the real system.
|
||||||
|
|
||||||
|
At boot time, the kernel unpacks that archive into RAM disk, mounts and uses it
|
||||||
|
as initial root file system. All finding of the root device happens in this
|
||||||
|
early userspace.
|
||||||
|
|
||||||
|
Initramfs images are also called "initrd".
|
||||||
|
|
||||||
|
For a complete list of kernel command line options see *dracut.cmdline*(7).
|
||||||
|
|
||||||
|
If you are dropped to an emergency shell, while booting your initramfs,
|
||||||
|
the file _/run/initramfs/rdsosreport.txt_ is created, which can be saved to a
|
||||||
|
(to be mounted by hand) partition (usually /boot) or a USB stick.
|
||||||
|
Additional debugging info can be produced by adding **rd.debug** to the kernel
|
||||||
|
command line. _/run/initramfs/rdsosreport.txt_ contains all logs and the output
|
||||||
|
of some tools. It should be attached to any report about dracut problems.
|
||||||
|
|
||||||
|
USAGE
|
||||||
|
-----
|
||||||
|
|
||||||
|
include::dracut.usage.asc[]
|
||||||
|
|
||||||
|
OPTIONS
|
||||||
|
-------
|
||||||
|
**--kver** _<kernel version>_::
|
||||||
|
set the kernel version. This enables to specify the kernel version, without
|
||||||
|
specifying the location of the initramfs image. For example:
|
||||||
|
----
|
||||||
|
# dracut --kver 3.5.0-0.rc7.git1.2.fc18.x86_64
|
||||||
|
----
|
||||||
|
|
||||||
|
**-f, --force**::
|
||||||
|
overwrite existing initramfs file.
|
||||||
|
|
||||||
|
**-a, --add** _<list of dracut modules>_::
|
||||||
|
add a space-separated list of dracut modules to the default set of modules.
|
||||||
|
This parameter can be specified multiple times.
|
||||||
|
+
|
||||||
|
[NOTE]
|
||||||
|
===============================
|
||||||
|
If [LIST] has multiple arguments, then you have to put these in quotes. For
|
||||||
|
example:
|
||||||
|
----
|
||||||
|
# dracut --add "module1 module2" ...
|
||||||
|
----
|
||||||
|
===============================
|
||||||
|
|
||||||
|
**--force-add** _<list of dracut modules>_::
|
||||||
|
force to add a space-separated list of dracut modules to the default set of
|
||||||
|
modules, when -H is specified. This parameter can be specified multiple
|
||||||
|
times.
|
||||||
|
+
|
||||||
|
[NOTE]
|
||||||
|
===============================
|
||||||
|
If [LIST] has multiple arguments, then you have to put these in quotes. For
|
||||||
|
example:
|
||||||
|
----
|
||||||
|
# dracut --force-add "module1 module2" ...
|
||||||
|
----
|
||||||
|
===============================
|
||||||
|
|
||||||
|
**-o, --omit** _<list of dracut modules>_::
|
||||||
|
omit a space-separated list of dracut modules. This parameter can be
|
||||||
|
specified multiple times.
|
||||||
|
+
|
||||||
|
[NOTE]
|
||||||
|
===============================
|
||||||
|
If [LIST] has multiple arguments, then you have to put these in quotes. For
|
||||||
|
example:
|
||||||
|
----
|
||||||
|
# dracut --omit "module1 module2" ...
|
||||||
|
----
|
||||||
|
===============================
|
||||||
|
|
||||||
|
**-m, --modules** _<list of dracut modules>_::
|
||||||
|
specify a space-separated list of dracut modules to call when building the
|
||||||
|
initramfs. Modules are located in _/usr/lib/dracut/modules.d_. This
|
||||||
|
parameter can be specified multiple times.
|
||||||
|
This option forces dracut to only include the specified dracut modules.
|
||||||
|
In most cases the "--add" option is what you want to use.
|
||||||
|
+
|
||||||
|
[NOTE]
|
||||||
|
===============================
|
||||||
|
If [LIST] has multiple arguments, then you have to put these in quotes. For
|
||||||
|
example:
|
||||||
|
----
|
||||||
|
# dracut --modules "module1 module2" ...
|
||||||
|
----
|
||||||
|
===============================
|
||||||
|
|
||||||
|
**-d, --drivers** _<list of kernel modules>_::
|
||||||
|
specify a space-separated list of kernel modules to exclusively include
|
||||||
|
in the initramfs. The kernel modules have to be specified without the ".ko"
|
||||||
|
suffix. This parameter can be specified multiple times.
|
||||||
|
+
|
||||||
|
[NOTE]
|
||||||
|
===============================
|
||||||
|
If [LIST] has multiple arguments, then you have to put these in quotes. For
|
||||||
|
example:
|
||||||
|
----
|
||||||
|
# dracut --drivers "kmodule1 kmodule2" ...
|
||||||
|
----
|
||||||
|
===============================
|
||||||
|
|
||||||
|
**--add-drivers** _<list of kernel modules>_::
|
||||||
|
specify a space-separated list of kernel modules to add to the initramfs.
|
||||||
|
The kernel modules have to be specified without the ".ko" suffix. This
|
||||||
|
parameter can be specified multiple times.
|
||||||
|
+
|
||||||
|
[NOTE]
|
||||||
|
===============================
|
||||||
|
If [LIST] has multiple arguments, then you have to put these in quotes. For
|
||||||
|
example:
|
||||||
|
----
|
||||||
|
# dracut --add-drivers "kmodule1 kmodule2" ...
|
||||||
|
----
|
||||||
|
===============================
|
||||||
|
|
||||||
|
**--force-drivers** _<list of kernel modules>_::
|
||||||
|
See add-drivers above. But in this case it is ensured that the drivers
|
||||||
|
are tried to be loaded early via modprobe.
|
||||||
|
+
|
||||||
|
[NOTE]
|
||||||
|
===============================
|
||||||
|
If [LIST] has multiple arguments, then you have to put these in quotes. For
|
||||||
|
example:
|
||||||
|
----
|
||||||
|
# dracut --force-drivers "kmodule1 kmodule2" ...
|
||||||
|
----
|
||||||
|
===============================
|
||||||
|
|
||||||
|
**--omit-drivers** _<list of kernel modules>_::
|
||||||
|
specify a space-separated list of kernel modules not to add to the
|
||||||
|
initramfs.
|
||||||
|
The kernel modules have to be specified without the ".ko" suffix. This
|
||||||
|
parameter can be specified multiple times.
|
||||||
|
+
|
||||||
|
[NOTE]
|
||||||
|
===============================
|
||||||
|
If [LIST] has multiple arguments, then you have to put these in quotes. For
|
||||||
|
example:
|
||||||
|
----
|
||||||
|
# dracut --omit-drivers "kmodule1 kmodule2" ...
|
||||||
|
----
|
||||||
|
===============================
|
||||||
|
|
||||||
|
**--filesystems** _<list of filesystems>_::
|
||||||
|
specify a space-separated list of kernel filesystem modules to exclusively
|
||||||
|
include in the generic initramfs. This parameter can be specified multiple
|
||||||
|
times.
|
||||||
|
+
|
||||||
|
[NOTE]
|
||||||
|
===============================
|
||||||
|
If [LIST] has multiple arguments, then you have to put these in quotes. For
|
||||||
|
example:
|
||||||
|
----
|
||||||
|
# dracut --filesystems "filesystem1 filesystem2" ...
|
||||||
|
----
|
||||||
|
===============================
|
||||||
|
|
||||||
|
**-k, --kmoddir** _<kernel directory>_::
|
||||||
|
specify the directory, where to look for kernel modules
|
||||||
|
|
||||||
|
**--fwdir** _<dir>[:<dir>...]++_::
|
||||||
|
specify additional directories, where to look for firmwares. This parameter
|
||||||
|
can be specified multiple times.
|
||||||
|
|
||||||
|
**--kernel-cmdline <parameters>**::
|
||||||
|
specify default kernel command line parameters
|
||||||
|
|
||||||
|
|
||||||
|
**--kernel-only**::
|
||||||
|
only install kernel drivers and firmware files
|
||||||
|
|
||||||
|
**--no-kernel**::
|
||||||
|
do not install kernel drivers and firmware files
|
||||||
|
|
||||||
|
**--early-microcode**::
|
||||||
|
Combine early microcode with ramdisk
|
||||||
|
|
||||||
|
**--no-early-microcode**::
|
||||||
|
Do not combine early microcode with ramdisk
|
||||||
|
|
||||||
|
**--print-cmdline**::
|
||||||
|
print the kernel command line for the current disk layout
|
||||||
|
|
||||||
|
**--mdadmconf**::
|
||||||
|
include local _/etc/mdadm.conf_
|
||||||
|
|
||||||
|
**--nomdadmconf**::
|
||||||
|
do not include local _/etc/mdadm.conf_
|
||||||
|
|
||||||
|
**--lvmconf**::
|
||||||
|
include local _/etc/lvm/lvm.conf_
|
||||||
|
|
||||||
|
**--nolvmconf**::
|
||||||
|
do not include local _/etc/lvm/lvm.conf_
|
||||||
|
|
||||||
|
**--fscks** [LIST]::
|
||||||
|
add a space-separated list of fsck tools, in addition to _dracut.conf_'s
|
||||||
|
specification; the installation is opportunistic (non-existing tools are
|
||||||
|
ignored)
|
||||||
|
+
|
||||||
|
[NOTE]
|
||||||
|
===============================
|
||||||
|
If [LIST] has multiple arguments, then you have to put these in quotes. For
|
||||||
|
example:
|
||||||
|
----
|
||||||
|
# dracut --fscks "fsck.foo barfsck" ...
|
||||||
|
----
|
||||||
|
===============================
|
||||||
|
|
||||||
|
**--nofscks**::
|
||||||
|
inhibit installation of any fsck tools
|
||||||
|
|
||||||
|
**--strip**::
|
||||||
|
strip binaries in the initramfs (default)
|
||||||
|
|
||||||
|
**--nostrip**::
|
||||||
|
do not strip binaries in the initramfs
|
||||||
|
|
||||||
|
**--hardlink**::
|
||||||
|
hardlink files in the initramfs (default)
|
||||||
|
|
||||||
|
**--nohardlink**::
|
||||||
|
do not hardlink files in the initramfs
|
||||||
|
|
||||||
|
**--prefix** _<dir>_::
|
||||||
|
prefix initramfs files with the specified directory
|
||||||
|
|
||||||
|
**--noprefix**::
|
||||||
|
do not prefix initramfs files (default)
|
||||||
|
|
||||||
|
**-h, --help**::
|
||||||
|
display help text and exit.
|
||||||
|
|
||||||
|
**--debug**::
|
||||||
|
output debug information of the build process
|
||||||
|
|
||||||
|
**-v, --verbose**::
|
||||||
|
increase verbosity level (default is info(4))
|
||||||
|
|
||||||
|
**-q, --quiet**:: decrease verbosity level (default is info(4))
|
||||||
|
|
||||||
|
**-c, --conf** _<dracut configuration file>_::
|
||||||
|
specify configuration file to use.
|
||||||
|
+
|
||||||
|
Default:
|
||||||
|
_/etc/dracut.conf_
|
||||||
|
|
||||||
|
**--confdir** _<configuration directory>_::
|
||||||
|
specify configuration directory to use.
|
||||||
|
+
|
||||||
|
Default:
|
||||||
|
_/etc/dracut.conf.d_
|
||||||
|
|
||||||
|
**--tmpdir** _<temporary directory>_::
|
||||||
|
specify temporary directory to use.
|
||||||
|
+
|
||||||
|
Default:
|
||||||
|
_/var/tmp_
|
||||||
|
|
||||||
|
**--sshkey** _<sshkey file>_:: ssh key file used with ssh-client module.
|
||||||
|
|
||||||
|
**--logfile** _<logfile>_:: logfile to use; overrides any setting from
|
||||||
|
the configuration files.
|
||||||
|
+
|
||||||
|
Default:
|
||||||
|
_/var/log/dracut.log_
|
||||||
|
|
||||||
|
**-l, --local**::
|
||||||
|
activates the local mode. dracut will use modules from the current working
|
||||||
|
directory instead of the system-wide installed modules in
|
||||||
|
_/usr/lib/dracut/modules.d_.
|
||||||
|
This is useful when running dracut from a git checkout.
|
||||||
|
|
||||||
|
**-H, --hostonly**::
|
||||||
|
Host-Only mode: Install only what is needed for booting the local host
|
||||||
|
instead of a generic host and generate host-specific configuration.
|
||||||
|
+
|
||||||
|
[WARNING]
|
||||||
|
====
|
||||||
|
If chrooted to another root other than the real root device, use "--fstab" and
|
||||||
|
provide a valid _/etc/fstab_.
|
||||||
|
====
|
||||||
|
|
||||||
|
**-N, --no-hostonly**::
|
||||||
|
Disable Host-Only mode
|
||||||
|
|
||||||
|
**--hostonly-cmdline**:
|
||||||
|
Store kernel command line arguments needed 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.
|
||||||
|
|
||||||
|
**--persistent-policy** _<policy>_::
|
||||||
|
Use _<policy>_ to address disks and partitions.
|
||||||
|
_<policy>_ can be any directory name found in /dev/disk.
|
||||||
|
E.g. "by-uuid", "by-label"
|
||||||
|
|
||||||
|
**--fstab**::
|
||||||
|
Use _/etc/fstab_ instead of _/proc/self/mountinfo_.
|
||||||
|
|
||||||
|
**--add-fstab** _<filename>_::
|
||||||
|
Add entries of _<filename>_ to the initramfs /etc/fstab.
|
||||||
|
|
||||||
|
**--mount** "_<device>_ _<mountpoint>_ _<filesystem type>_ [_<filesystem options>_ [_<dump frequency>_ [_<fsck order>_]]]"::
|
||||||
|
Mount _<device>_ on _<mountpoint>_ with _<filesystem type>_ in the
|
||||||
|
initramfs. _<filesystem options>_, _<dump options>_ and _<fsck order>_ can
|
||||||
|
be specified, see fstab manpage for the details.
|
||||||
|
The default _<filesystem options>_ is "defaults".
|
||||||
|
The default _<dump frequency>_ is "0".
|
||||||
|
the default _<fsck order>_ is "2".
|
||||||
|
|
||||||
|
**--mount** "_<mountpoint>_"::
|
||||||
|
Like above, but _<device>_, _<filesystem type>_ and _<filesystem options>_
|
||||||
|
are determined by looking at the current mounts.
|
||||||
|
|
||||||
|
**--add-device** _<device>_ ::
|
||||||
|
Bring up _<device>_ in initramfs, _<device>_ should be the device name.
|
||||||
|
This can be useful in hostonly mode for resume support when your swap is on
|
||||||
|
LVM or an encrypted partition.
|
||||||
|
[NB --device can be used for compatibility with earlier releases]
|
||||||
|
|
||||||
|
**-i, --include** _<SOURCE>_ _<TARGET>_::
|
||||||
|
include the files in the SOURCE directory into the
|
||||||
|
TARGET directory in the final initramfs. If SOURCE is a file, it will be
|
||||||
|
installed to TARGET in the final initramfs. This parameter can be specified
|
||||||
|
multiple times.
|
||||||
|
|
||||||
|
**-I, --install** _<file list>_::
|
||||||
|
install the space separated list of files into the initramfs.
|
||||||
|
+
|
||||||
|
[NOTE]
|
||||||
|
===============================
|
||||||
|
If [LIST] has multiple arguments, then you have to put these in quotes. For
|
||||||
|
example:
|
||||||
|
----
|
||||||
|
# dracut --install "/bin/foo /sbin/bar" ...
|
||||||
|
----
|
||||||
|
===============================
|
||||||
|
|
||||||
|
**--install-optional** _<file list>_::
|
||||||
|
install the space separated list of files into the initramfs, if they exist.
|
||||||
|
|
||||||
|
**--gzip**::
|
||||||
|
Compress the generated initramfs using gzip. This will be done by default,
|
||||||
|
unless another compression option or --no-compress is passed. Equivalent to
|
||||||
|
"--compress=gzip -9"
|
||||||
|
|
||||||
|
**--bzip2**::
|
||||||
|
Compress the generated initramfs using bzip2.
|
||||||
|
+
|
||||||
|
[WARNING]
|
||||||
|
====
|
||||||
|
Make sure your kernel has bzip2 decompression support compiled in, otherwise you
|
||||||
|
will not be able to boot. Equivalent to "--compress=bzip2"
|
||||||
|
====
|
||||||
|
|
||||||
|
**--lzma**::
|
||||||
|
Compress the generated initramfs using lzma.
|
||||||
|
+
|
||||||
|
[WARNING]
|
||||||
|
====
|
||||||
|
Make sure your kernel has lzma decompression support compiled in, otherwise you
|
||||||
|
will not be able to boot. Equivalent to "lzma --compress=lzma -9"
|
||||||
|
====
|
||||||
|
|
||||||
|
**--xz**::
|
||||||
|
Compress the generated initramfs using xz.
|
||||||
|
+
|
||||||
|
[WARNING]
|
||||||
|
====
|
||||||
|
Make sure your kernel has xz decompression support compiled in, otherwise you
|
||||||
|
will not be able to boot. Equivalent to
|
||||||
|
"lzma --compress=xz --check=crc32 --lzma2=dict=1MiB"
|
||||||
|
====
|
||||||
|
|
||||||
|
**--lzo**::
|
||||||
|
Compress the generated initramfs using lzop.
|
||||||
|
[WARNING]
|
||||||
|
====
|
||||||
|
Make sure your kernel has lzo decompression support compiled in, otherwise you
|
||||||
|
will not be able to boot.
|
||||||
|
====
|
||||||
|
|
||||||
|
**--lz4**::
|
||||||
|
Compress the generated initramfs using lz4.
|
||||||
|
[WARNING]
|
||||||
|
====
|
||||||
|
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
|
||||||
|
program with known-working arguments. If you pass a quoted string with
|
||||||
|
arguments, it will be called with exactly those arguments. Depending on what
|
||||||
|
you pass, this may result in an initramfs that the kernel cannot decompress.
|
||||||
|
The default value can also be set via the _INITRD_COMPRESS_ environment variable.
|
||||||
|
|
||||||
|
**--no-compress**::
|
||||||
|
Do not compress the generated initramfs. This will override any other
|
||||||
|
compression options.
|
||||||
|
|
||||||
|
**--reproducible**::
|
||||||
|
Create reproducible images.
|
||||||
|
|
||||||
|
**--no-reproducible**::
|
||||||
|
Do not create reproducible images.
|
||||||
|
|
||||||
|
**--list-modules**::
|
||||||
|
List all available dracut modules.
|
||||||
|
|
||||||
|
**-M, --show-modules**::
|
||||||
|
Print included module's name to standard output during build.
|
||||||
|
|
||||||
|
**--keep**::
|
||||||
|
Keep the initramfs temporary directory for debugging purposes.
|
||||||
|
|
||||||
|
**--printsize**::
|
||||||
|
Print out the module install size
|
||||||
|
|
||||||
|
**--profile**:
|
||||||
|
Output profile information of the build process
|
||||||
|
|
||||||
|
**--ro-mnt**:
|
||||||
|
Mount / and /usr read-only by default.
|
||||||
|
|
||||||
|
**-L, --stdlog** _<level>_::
|
||||||
|
[0-6] Specify logging level (to standard error)
|
||||||
|
----
|
||||||
|
0 - suppress any messages
|
||||||
|
1 - only fatal errors
|
||||||
|
2 - all errors
|
||||||
|
3 - warnings
|
||||||
|
4 - info
|
||||||
|
5 - debug info (here starts lots of output)
|
||||||
|
6 - trace info (and even more)
|
||||||
|
----
|
||||||
|
|
||||||
|
**--regenerate-all**::
|
||||||
|
Regenerate all initramfs images at the default location with the kernel
|
||||||
|
versions found on the system. Additional parameters are passed through.
|
||||||
|
|
||||||
|
**--loginstall _<DIR>_**::
|
||||||
|
Log all files installed from the host to _<DIR>_.
|
||||||
|
|
||||||
|
**--uefi**::
|
||||||
|
Instead of creating an initramfs image, dracut will create an UEFI executable,
|
||||||
|
which can be executed by an UEFI BIOS. The default output filename is
|
||||||
|
_<EFI>/EFI/Linux/linux-$kernel$-<MACHINE_ID>-<BUILD_ID>.efi_. <EFI> might be
|
||||||
|
_/efi_, _/boot_ or _/boot/efi_ depending on where the ESP partition is mounted.
|
||||||
|
The <BUILD_ID> is taken from BUILD_ID in _/usr/lib/os-release_ or if it exists
|
||||||
|
_/etc/os-release_ and is left out, if BUILD_ID is non-existant or empty.
|
||||||
|
|
||||||
|
**--no-machineid**::
|
||||||
|
affects the default output filename of **--uefi** and will discard the <MACHINE_ID>
|
||||||
|
part.
|
||||||
|
|
||||||
|
**--uefi-stub _<FILE>_**::
|
||||||
|
Specifies the UEFI stub loader, which will load the attached kernel, initramfs and
|
||||||
|
kernel command line and boots the kernel. The default is
|
||||||
|
_$prefix/lib/systemd/boot/efi/linux<EFI-MACHINE-TYPE-NAME>.efi.stub_
|
||||||
|
or _$prefix/lib/gummiboot/linux<EFI-MACHINE-TYPE-NAME>.efi.stub_
|
||||||
|
|
||||||
|
**--kernel-image _<FILE>_**::
|
||||||
|
Specifies the kernel image, which to include in the UEFI executable. The default is
|
||||||
|
_/lib/modules/<KERNEL-VERSION>/vmlinuz_ or _/boot/vmlinuz-<KERNEL-VERSION>_
|
||||||
|
|
||||||
|
ENVIRONMENT
|
||||||
|
-----------
|
||||||
|
|
||||||
|
_INITRD_COMPRESS_::
|
||||||
|
sets the default compression program. See **--compress**.
|
||||||
|
|
||||||
|
FILES
|
||||||
|
-----
|
||||||
|
_/var/log/dracut.log_::
|
||||||
|
logfile of initramfs image creation
|
||||||
|
|
||||||
|
_/tmp/dracut.log_::
|
||||||
|
logfile of initramfs image creation, if _/var/log/dracut.log_ is not
|
||||||
|
writable
|
||||||
|
|
||||||
|
_/etc/dracut.conf_::
|
||||||
|
see dracut.conf5
|
||||||
|
|
||||||
|
_/etc/dracut.conf.d/*.conf_::
|
||||||
|
see dracut.conf5
|
||||||
|
|
||||||
|
_/usr/lib/dracut/dracut.conf.d/*.conf_::
|
||||||
|
see dracut.conf5
|
||||||
|
|
||||||
|
Configuration in the initramfs
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
_/etc/conf.d/_::
|
||||||
|
Any files found in _/etc/conf.d/_ will be sourced in the initramfs to
|
||||||
|
set initial values. Command line options will override these values
|
||||||
|
set in the configuration files.
|
||||||
|
|
||||||
|
_/etc/cmdline_::
|
||||||
|
Can contain additional command line options. Deprecated, better use
|
||||||
|
/etc/cmdline.d/*.conf.
|
||||||
|
|
||||||
|
_/etc/cmdline.d/*.conf_::
|
||||||
|
Can contain additional command line options.
|
||||||
|
|
||||||
|
AVAILABILITY
|
||||||
|
------------
|
||||||
|
The dracut command is part of the dracut package and is available from
|
||||||
|
link:$$https://dracut.wiki.kernel.org$$[https://dracut.wiki.kernel.org]
|
||||||
|
|
||||||
|
AUTHORS
|
||||||
|
-------
|
||||||
|
Harald Hoyer
|
||||||
|
|
||||||
|
Victor Lowther
|
||||||
|
|
||||||
|
Philippe Seewer
|
||||||
|
|
||||||
|
Warren Togami
|
||||||
|
|
||||||
|
Amadeusz Żołnowski
|
||||||
|
|
||||||
|
Jeremy Katz
|
||||||
|
|
||||||
|
David Dillow
|
||||||
|
|
||||||
|
Will Woods
|
||||||
|
|
||||||
|
SEE ALSO
|
||||||
|
--------
|
||||||
|
*dracut.cmdline*(7) *dracut.conf*(5) *lsinitrd*(1)
|
||||||
185
dracut.asc
Normal file
185
dracut.asc
Normal file
@@ -0,0 +1,185 @@
|
|||||||
|
dracut
|
||||||
|
======
|
||||||
|
Harald Hoyer <harald@redhat.com>
|
||||||
|
v3.0, October 2013
|
||||||
|
|
||||||
|
:language: bash
|
||||||
|
|
||||||
|
= Introduction
|
||||||
|
This section is a modified version of
|
||||||
|
http://en.wikipedia.org/wiki/Initrd which is licensed under the
|
||||||
|
Creative Commons Attribution/Share-Alike License.
|
||||||
|
|
||||||
|
== Definition
|
||||||
|
An _initial ramdisk_ is a temporary file system used in the boot process of the
|
||||||
|
Linux kernel. _initrd_ and _initramfs_ refer to slightly different schemes for
|
||||||
|
loading this file system into memory. Both are commonly used to make
|
||||||
|
preparations before the real root file system can be mounted.
|
||||||
|
|
||||||
|
== Rationale
|
||||||
|
Many Linux distributions ship a single, generic kernel image that is intended to
|
||||||
|
boot as wide a variety of hardware as possible. The device drivers for this
|
||||||
|
generic kernel image are included as loadable modules, as it is not possible to
|
||||||
|
statically compile them all into the one kernel without making it too large to
|
||||||
|
boot from computers with limited memory or from lower-capacity media like floppy
|
||||||
|
disks.
|
||||||
|
|
||||||
|
This then raises the problem of detecting and loading the modules necessary to
|
||||||
|
mount the root file system at boot time (or, for that matter, deducing where or
|
||||||
|
what the root file system is).
|
||||||
|
|
||||||
|
To further complicate matters, the root file system may be on a software RAID
|
||||||
|
volume, LVM, NFS (on diskless workstations), or on an encrypted partition. All
|
||||||
|
of these require special preparations to mount.
|
||||||
|
|
||||||
|
Another complication is kernel support for hibernation, which suspends the
|
||||||
|
computer to disk by dumping an image of the entire system to a swap partition or
|
||||||
|
a regular file, then powering off. On next boot, this image has to be made
|
||||||
|
accessible before it can be loaded back into memory.
|
||||||
|
|
||||||
|
To avoid having to hardcode handling for so many special cases into the kernel,
|
||||||
|
an initial boot stage with a temporary root file system
|
||||||
|
—now dubbed early user space— is used. This root file system would contain
|
||||||
|
user-space helpers that would do the hardware detection, module loading and
|
||||||
|
device discovery necessary to get the real root file system mounted.
|
||||||
|
|
||||||
|
== Implementation
|
||||||
|
An image of this initial root file system (along with the kernel image) must be
|
||||||
|
stored somewhere accessible by the Linux bootloader or the boot firmware of the
|
||||||
|
computer. This can be:
|
||||||
|
|
||||||
|
* The root file system itself
|
||||||
|
* A boot image on an optical disc
|
||||||
|
* A small ext2/ext3 or FAT-formatted partition on a local disk
|
||||||
|
(a _boot partition_)
|
||||||
|
* A TFTP server (on systems that can boot from Ethernet)
|
||||||
|
|
||||||
|
The bootloader will load the kernel and initial root file system image into
|
||||||
|
memory and then start the kernel, passing in the memory address of the image.
|
||||||
|
|
||||||
|
Depending on which algorithms were compiled statically into it, the kernel can
|
||||||
|
currently unpack initrd/initramfs images compressed with gzip, bzip2 and LZMA.
|
||||||
|
|
||||||
|
== Mount preparations
|
||||||
|
dracut can generate a customized initrams image which contains only whatever is
|
||||||
|
necessary to boot some particular computer, such as ATA, SCSI and filesystem
|
||||||
|
kernel modules (host-only mode).
|
||||||
|
|
||||||
|
dracut can also generate a more generic initramfs image (default mode).
|
||||||
|
|
||||||
|
dracut's initramfs starts only with the device name of the root file system (or
|
||||||
|
its UUID) and must discover everything else at boot time. A complex cascade of
|
||||||
|
tasks must be performed to get the root file system mounted:
|
||||||
|
|
||||||
|
* Any hardware drivers that the boot process depends on must be loaded. All
|
||||||
|
kernel modules for common storage devices are packed onto the initramfs and then
|
||||||
|
udev pulls in modules matching the computer's detected hardware.
|
||||||
|
|
||||||
|
* On systems which display a boot rd.splash screen, the video hardware must be
|
||||||
|
initialized and a user-space helper started to paint animations onto the display
|
||||||
|
in lockstep with the boot process.
|
||||||
|
|
||||||
|
* If the root file system is on NFS, dracut does then:
|
||||||
|
** Bring up the primary network interface.
|
||||||
|
** Invoke a DHCP client, with which it can obtain a DHCP lease.
|
||||||
|
** Extract the name of the NFS share and the address of the NFS server from the
|
||||||
|
lease.
|
||||||
|
** Mount the NFS share.
|
||||||
|
|
||||||
|
* If the root file system appears to be on a software RAID device, there is no
|
||||||
|
way of knowing which devices the RAID volume spans; the standard MD utilities
|
||||||
|
must be invoked to scan all available block devices with a raid signature and
|
||||||
|
bring the required ones online.
|
||||||
|
|
||||||
|
* If the root file system appears to be on a logical volume, the LVM utilities
|
||||||
|
must be invoked to scan for and activate the volume group containing it.
|
||||||
|
|
||||||
|
* If the root file system is on an encrypted block device:
|
||||||
|
** Invoke a helper script to prompt the user to type in a passphrase and/or
|
||||||
|
insert a hardware token (such as a smart card or a USB security dongle).
|
||||||
|
|
||||||
|
* Create a decryption target with the device mapper.
|
||||||
|
|
||||||
|
dracut uses udev, an event-driven hotplug agent, which invokes helper programs
|
||||||
|
as hardware devices, disk partitions and storage volumes matching certain rules
|
||||||
|
come online. This allows discovery to run in parallel, and to progressively
|
||||||
|
cascade into arbitrary nestings of LVM, RAID or encryption to get at the root
|
||||||
|
file system.
|
||||||
|
|
||||||
|
When the root file system finally becomes visible:
|
||||||
|
|
||||||
|
* Any maintenance tasks which cannot run on a mounted root file system
|
||||||
|
are done.
|
||||||
|
* The root file system is mounted read-only.
|
||||||
|
* Any processes which must continue running (such as the rd.splash screen helper
|
||||||
|
and its command FIFO) are hoisted into the newly-mounted root file system.
|
||||||
|
|
||||||
|
The final root file system cannot simply be mounted over /, since that would
|
||||||
|
make the scripts and tools on the initial root file system inaccessible for any
|
||||||
|
final cleanup tasks. On an initramfs, the initial root file system cannot be
|
||||||
|
rotated away. Instead, it is simply emptied and the final root file system
|
||||||
|
mounted over the top.
|
||||||
|
|
||||||
|
If the systemd module is used in the initramfs, the ordering of the services
|
||||||
|
started looks like <<dracutbootup7>>.
|
||||||
|
|
||||||
|
== Dracut on shutdown
|
||||||
|
|
||||||
|
On a systemd driven system, the dracut initramfs is also used for the shutdown
|
||||||
|
procedure.
|
||||||
|
|
||||||
|
The following steps are executed during a shutdown:
|
||||||
|
|
||||||
|
* systemd switches to the shutdown.target
|
||||||
|
* systemd starts
|
||||||
|
$prefix/lib/systemd/system/shutdown.target.wants/dracut-shutdown.service
|
||||||
|
* dracut-shutdown.service executes /usr/lib/dracut/dracut-initramfs-restore
|
||||||
|
which unpacks the initramfs to /run/initramfs
|
||||||
|
* systemd finishes shutdown.target
|
||||||
|
* systemd kills all processes
|
||||||
|
* systemd tries to unmount everything and mounts the remaining read-only
|
||||||
|
* systemd checks, if there is a /run/initramfs/shutdown executable
|
||||||
|
* if yes, it does a pivot_root to /run/initramfs and executes ./shutdown.
|
||||||
|
The old root is then mounted on /oldroot.
|
||||||
|
/usr/lib/dracut/modules.d/99shutdown/shutdown.sh is the shutdown executable.
|
||||||
|
* shutdown will try to umount every /oldroot mount and calls the various
|
||||||
|
shutdown hooks from the dracut modules
|
||||||
|
|
||||||
|
This ensures, that all devices are disassembled and unmounted cleanly.
|
||||||
|
|
||||||
|
= User Manual
|
||||||
|
|
||||||
|
:leveloffset: 1
|
||||||
|
include::dracut.8.asc[]
|
||||||
|
|
||||||
|
:leveloffset: 1
|
||||||
|
[[dracutconf5]]
|
||||||
|
include::dracut.conf.5.asc[]
|
||||||
|
|
||||||
|
[[dracutcmdline7]]
|
||||||
|
include::dracut.cmdline.7.asc[]
|
||||||
|
|
||||||
|
[[lsinitrd1]]
|
||||||
|
include::lsinitrd.1.asc[]
|
||||||
|
|
||||||
|
[[mkinitrd8]]
|
||||||
|
include::mkinitrd.8.asc[]
|
||||||
|
|
||||||
|
= Developer Manual
|
||||||
|
|
||||||
|
:leveloffset: 1
|
||||||
|
[[dracutmodules7]]
|
||||||
|
include::dracut.modules.7.asc[]
|
||||||
|
|
||||||
|
[[dracutbootup7]]
|
||||||
|
include::dracut.bootup.7.asc[]
|
||||||
|
|
||||||
|
:leveloffset: 0
|
||||||
|
[appendix]
|
||||||
|
License
|
||||||
|
-------
|
||||||
|
This work is licensed under the Creative Commons Attribution/Share-Alike
|
||||||
|
License. To view a copy of this license, visit
|
||||||
|
http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to Creative
|
||||||
|
Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
|
||||||
|
|
||||||
123
dracut.bootup.7.asc
Normal file
123
dracut.bootup.7.asc
Normal file
@@ -0,0 +1,123 @@
|
|||||||
|
DRACUT.BOOTUP(7)
|
||||||
|
================
|
||||||
|
:doctype: manpage
|
||||||
|
:man source: dracut
|
||||||
|
:man manual: dracut
|
||||||
|
|
||||||
|
NAME
|
||||||
|
----
|
||||||
|
dracut.bootup - boot ordering in the initramfs
|
||||||
|
|
||||||
|
DESCRIPTION
|
||||||
|
-----------
|
||||||
|
|
||||||
|
This flow chart illustrates the ordering of the services, if systemd is used in
|
||||||
|
the dracut initramfs.
|
||||||
|
----
|
||||||
|
|
||||||
|
systemd-journal.socket
|
||||||
|
|
|
||||||
|
v
|
||||||
|
dracut-cmdline.service
|
||||||
|
|
|
||||||
|
v
|
||||||
|
dracut-pre-udev.service
|
||||||
|
|
|
||||||
|
v
|
||||||
|
systemd-udevd.service
|
||||||
|
|
|
||||||
|
v
|
||||||
|
local-fs-pre.target dracut-pre-trigger.service
|
||||||
|
| |
|
||||||
|
v v
|
||||||
|
(various mounts) (various swap systemd-udev-trigger.service
|
||||||
|
| devices...) | (various low-level (various low-level
|
||||||
|
| | | services: seed, API VFS mounts:
|
||||||
|
v v v tmpfiles, random mqueue, configfs,
|
||||||
|
local-fs.target swap.target dracut-initqueue.service sysctl, ...) debugfs, ...)
|
||||||
|
| | | | |
|
||||||
|
\_______________|____________________ | ___________________|____________________/
|
||||||
|
\|/
|
||||||
|
v
|
||||||
|
sysinit.target
|
||||||
|
|
|
||||||
|
_________________/|\___________________
|
||||||
|
/ | \
|
||||||
|
| | |
|
||||||
|
v | v
|
||||||
|
(various | rescue.service
|
||||||
|
sockets...) | |
|
||||||
|
| | v
|
||||||
|
v | rescue.target
|
||||||
|
sockets.target |
|
||||||
|
| |
|
||||||
|
\_________________ | emergency.service
|
||||||
|
\| |
|
||||||
|
v v
|
||||||
|
basic.target emergency.target
|
||||||
|
|
|
||||||
|
______________________/|
|
||||||
|
/ |
|
||||||
|
| v
|
||||||
|
| dracut-pre-mount.service
|
||||||
|
| |
|
||||||
|
| v
|
||||||
|
| sysroot.mount
|
||||||
|
| |
|
||||||
|
| v
|
||||||
|
| initrd-root-fs.target
|
||||||
|
(custom initrd services) |
|
||||||
|
| v
|
||||||
|
| dracut-mount.service
|
||||||
|
| |
|
||||||
|
| v
|
||||||
|
| initrd-parse-etc.service
|
||||||
|
| |
|
||||||
|
| v
|
||||||
|
| (sysroot-usr.mount and
|
||||||
|
| various mounts marked
|
||||||
|
| with fstab option
|
||||||
|
| x-initrd.mount)
|
||||||
|
| |
|
||||||
|
| v
|
||||||
|
| initrd-fs.target
|
||||||
|
\______________________ |
|
||||||
|
\|
|
||||||
|
v
|
||||||
|
initrd.target
|
||||||
|
|
|
||||||
|
v
|
||||||
|
dracut-pre-pivot.service
|
||||||
|
|
|
||||||
|
v
|
||||||
|
initrd-cleanup.service
|
||||||
|
isolates to
|
||||||
|
initrd-switch-root.target
|
||||||
|
|
|
||||||
|
v
|
||||||
|
______________________/|
|
||||||
|
/ |
|
||||||
|
| initrd-udevadm-cleanup-db.service
|
||||||
|
| |
|
||||||
|
(custom initrd services) |
|
||||||
|
| |
|
||||||
|
\______________________ |
|
||||||
|
\|
|
||||||
|
v
|
||||||
|
initrd-switch-root.target
|
||||||
|
|
|
||||||
|
v
|
||||||
|
initrd-switch-root.service
|
||||||
|
|
|
||||||
|
v
|
||||||
|
switch-root
|
||||||
|
----
|
||||||
|
|
||||||
|
|
||||||
|
AUTHOR
|
||||||
|
------
|
||||||
|
Harald Hoyer
|
||||||
|
|
||||||
|
SEE ALSO
|
||||||
|
--------
|
||||||
|
*dracut*(8) *bootup*(7)
|
||||||
1277
dracut.cmdline.7.asc
Normal file
1277
dracut.cmdline.7.asc
Normal file
File diff suppressed because it is too large
Load Diff
13
dracut.conf
13
dracut.conf
@@ -1,10 +1,3 @@
|
|||||||
# Sample dracut config file
|
# PUT YOUR CONFIG IN separate files
|
||||||
|
# in /etc/dracut.conf.d named "<name>.conf"
|
||||||
# Specific list of dracut modules to use
|
# SEE man dracut.conf(5) for options
|
||||||
#dracutmodules=""
|
|
||||||
|
|
||||||
# Dracut modules to omit
|
|
||||||
#omit_dracutmodules=""
|
|
||||||
|
|
||||||
# Additional kernel modules to install
|
|
||||||
#drivers=""
|
|
||||||
|
|||||||
229
dracut.conf.5.asc
Normal file
229
dracut.conf.5.asc
Normal file
@@ -0,0 +1,229 @@
|
|||||||
|
DRACUT.CONF(5)
|
||||||
|
==============
|
||||||
|
:doctype: manpage
|
||||||
|
:man source: dracut
|
||||||
|
:man manual: dracut
|
||||||
|
|
||||||
|
NAME
|
||||||
|
----
|
||||||
|
dracut.conf - configuration file(s) for dracut
|
||||||
|
|
||||||
|
SYNOPSIS
|
||||||
|
--------
|
||||||
|
_/etc/dracut.conf_
|
||||||
|
_/etc/dracut.conf.d/\*.conf_
|
||||||
|
_/usr/lib/dracut/dracut.conf.d/*.conf_
|
||||||
|
|
||||||
|
Description
|
||||||
|
-----------
|
||||||
|
_dracut.conf_ is loaded during the initialisation phase of dracut. Command line
|
||||||
|
parameter will override any values set here.
|
||||||
|
|
||||||
|
_*.conf_ files are read from /usr/lib/dracut/dracut.conf.d and
|
||||||
|
/etc/dracut.conf.d. Files with the same name in /etc/dracut.conf.d will replace
|
||||||
|
files in /usr/lib/dracut/dracut.conf.d.
|
||||||
|
The files are then read in alphanumerical order and will override parameters
|
||||||
|
set in _/etc/dracut.conf_. Each line specifies an attribute and a value. A '#'
|
||||||
|
indicates the beginning of a comment; following characters, up to the end of the
|
||||||
|
line are not interpreted.
|
||||||
|
|
||||||
|
dracut command line options will override any values set here.
|
||||||
|
|
||||||
|
Configuration files must have the extension .conf; other extensions are ignored.
|
||||||
|
|
||||||
|
*add_dracutmodules+=*" __<dracut modules>__ "::
|
||||||
|
Add a space-separated list of dracut modules to call when building the
|
||||||
|
initramfs. Modules are located in _/usr/lib/dracut/modules.d_.
|
||||||
|
|
||||||
|
*dracutmodules+=*" __<dracut modules>__ "::
|
||||||
|
Specify a space-separated list of dracut modules to call when building the
|
||||||
|
initramfs. Modules are located in _/usr/lib/dracut/modules.d_.
|
||||||
|
This option forces dracut to only include the specified dracut modules.
|
||||||
|
In most cases the "add_dracutmodules" option is what you want to use.
|
||||||
|
|
||||||
|
*omit_dracutmodules+=*" __<dracut modules>__ "::
|
||||||
|
Omit a space-separated list of dracut modules to call when building the
|
||||||
|
initramfs. Modules are located in _/usr/lib/dracut/modules.d_.
|
||||||
|
|
||||||
|
*drivers+=*" __<kernel modules>__ "::
|
||||||
|
Specify a space-separated list of kernel modules to exclusively include in
|
||||||
|
the initramfs. The kernel modules have to be specified without the ".ko"
|
||||||
|
suffix.
|
||||||
|
|
||||||
|
*add_drivers+=*" __<kernel modules>__ "::
|
||||||
|
Specify a space-separated list of kernel modules to add to the initramfs.
|
||||||
|
The kernel modules have to be specified without the ".ko" suffix.
|
||||||
|
|
||||||
|
*force_drivers+=*" __<list of kernel modules>__ "::
|
||||||
|
See add_drivers above. But in this case it is ensured that the drivers
|
||||||
|
are tried to be loaded early via modprobe.
|
||||||
|
|
||||||
|
*omit_drivers+=*" __<kernel modules>__ "::
|
||||||
|
Specify a space-separated list of kernel modules not to add to the
|
||||||
|
initramfs. The kernel modules have to be specified without the ".ko" suffix.
|
||||||
|
|
||||||
|
*filesystems+=*" __<filesystem names>__ "::
|
||||||
|
Specify a space-separated list of kernel filesystem modules to exclusively
|
||||||
|
include in the generic initramfs.
|
||||||
|
|
||||||
|
*drivers_dir=*"__<kernel modules directory>__"::
|
||||||
|
Specify the directory, where to look for kernel modules
|
||||||
|
|
||||||
|
*fw_dir+=*" :__<dir>__[:__<dir>__ ...] "::
|
||||||
|
Specify additional directories, where to look for firmwares, separated by :
|
||||||
|
|
||||||
|
*install_items+=*" __<file>__[ __<file>__ ...] "::
|
||||||
|
Specify additional files to include in the initramfs, separated by spaces.
|
||||||
|
|
||||||
|
*install_optional_items+=*" __<file>__[ __<file>__ ...] "::
|
||||||
|
Specify additional files to include in the initramfs, separated by spaces,
|
||||||
|
if they exist.
|
||||||
|
|
||||||
|
*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
|
||||||
|
with exactly those arguments. Depending on what you pass, this may result in
|
||||||
|
an initramfs that the kernel cannot decompress.
|
||||||
|
|
||||||
|
*do_strip=*"__{yes|no}__"::
|
||||||
|
Strip binaries in the initramfs (default=yes)
|
||||||
|
|
||||||
|
*hostonly=*"__{yes|no}__"::
|
||||||
|
Host-Only mode: Install only what is needed for booting the local host
|
||||||
|
instead of a generic host and generate host-specific configuration.
|
||||||
|
|
||||||
|
*hostonly_cmdline=*"__{yes|no}__"::
|
||||||
|
If set to "yes", store the kernel command line arguments needed in the initramfs
|
||||||
|
|
||||||
|
*persistent_policy=*"__<policy>__"::
|
||||||
|
Use _<policy>_ to address disks and partitions.
|
||||||
|
_<policy>_ can be any directory name found in /dev/disk.
|
||||||
|
E.g. "by-uuid", "by-label"
|
||||||
|
|
||||||
|
*tmpdir=*"__<temporary directory>__"::
|
||||||
|
Specify temporary directory to use.
|
||||||
|
|
||||||
|
[WARNING]
|
||||||
|
====
|
||||||
|
If chrooted to another root other than the real root device, use --fstab and
|
||||||
|
provide a valid _/etc/fstab_.
|
||||||
|
====
|
||||||
|
|
||||||
|
*use_fstab=*"__{yes|no}__"::
|
||||||
|
Use _/etc/fstab_ instead of _/proc/self/mountinfo_.
|
||||||
|
|
||||||
|
*add_fstab+=*" __<filename>__ "::
|
||||||
|
Add entries of __<filename>__ to the initramfs /etc/fstab.
|
||||||
|
|
||||||
|
*add_device+=*" __<device>__ "::
|
||||||
|
Bring up _<device>_ in initramfs, _<device>_ should be the device name.
|
||||||
|
This can be useful in hostonly mode for resume support when your swap is on
|
||||||
|
LVM an encrypted partition.
|
||||||
|
|
||||||
|
*mdadmconf=*"__{yes|no}__"::
|
||||||
|
Include local _/etc/mdadm.conf_ (default=yes)
|
||||||
|
|
||||||
|
*lvmconf=*"__{yes|no}__"::
|
||||||
|
Include local _/etc/lvm/lvm.conf_ (default=yes)
|
||||||
|
|
||||||
|
*fscks=*" __<fsck tools>__ "::
|
||||||
|
Add a space-separated list of fsck tools. If nothing is specified, the
|
||||||
|
default is: "umount mount /sbin/fsck* xfs_db xfs_check xfs_repair e2fsck
|
||||||
|
jfs_fsck reiserfsck btrfsck". The installation is opportunistic
|
||||||
|
(non-existing tools are ignored).
|
||||||
|
|
||||||
|
*nofscks=*"__{yes|no}__"::
|
||||||
|
If specified, inhibit installation of any fsck tools.
|
||||||
|
|
||||||
|
*ro_mnt=*"__{yes|no}__"::
|
||||||
|
Mount _/_ and _/usr_ read-only by default.
|
||||||
|
|
||||||
|
*kernel_cmdline=*"__parameters__"::
|
||||||
|
Specify default kernel command line parameters
|
||||||
|
|
||||||
|
*kernel_only=*"__{yes|no}__"::
|
||||||
|
Only install kernel drivers and firmware files. (default=no)
|
||||||
|
|
||||||
|
*no_kernel=*"__{yes|no}__"::
|
||||||
|
Do not install kernel drivers and firmware files (default=no)
|
||||||
|
|
||||||
|
*acpi_override=*"__{yes|no}__"::
|
||||||
|
[WARNING] ONLY USE THIS IF YOU KNOW WHAT YOU ARE DOING! +
|
||||||
|
Override BIOS provided ACPI tables. For further documentation read
|
||||||
|
Documentation/acpi/initrd_table_override.txt in the kernel sources.
|
||||||
|
Search for ACPI table files (must have .aml suffix) in acpi_table_dir=
|
||||||
|
directory (see below) and add them to a separate uncompressed cpio
|
||||||
|
archive. This cpio archive gets glued (concatenated, uncompressed one
|
||||||
|
must be the first one) to the compressed cpio archive. The first,
|
||||||
|
uncompressed cpio archive is for data which the kernel must be able
|
||||||
|
to access very early (and cannot make use of uncompress alogrithms yet)
|
||||||
|
like microcode or ACPI tables (default=no).
|
||||||
|
|
||||||
|
*acpi_table_dir=*"__<dir>__"::
|
||||||
|
Directory to search for ACPI tables if acpi_override= is set to yes.
|
||||||
|
|
||||||
|
*early_microcode=*"{yes|no}"::
|
||||||
|
Combine early microcode with ramdisk (default=yes)
|
||||||
|
|
||||||
|
*stdloglvl*="__\{0-6\}__"::
|
||||||
|
Set logging to standard error level.
|
||||||
|
|
||||||
|
*sysloglvl*="__\{0-6\}__"::
|
||||||
|
Set logging to syslog level.
|
||||||
|
|
||||||
|
*fileloglvl=*"__\{0-6\}__"::
|
||||||
|
Set logging to file level.
|
||||||
|
|
||||||
|
*logfile=*"__<file>__"::
|
||||||
|
Path to log file.
|
||||||
|
|
||||||
|
*show_modules=*"__{yes|no}__"::
|
||||||
|
Print the name of the included modules to standard output during build.
|
||||||
|
|
||||||
|
*i18n_vars=*"__<variable mapping>__"::
|
||||||
|
Distribution specific variable mapping.
|
||||||
|
See dracut/modules.d/10i18n/README for a detailed description.
|
||||||
|
|
||||||
|
*i18n_default_font=*"__<fontname>__"::
|
||||||
|
The font <fontname> to install, if not specified otherwise.
|
||||||
|
Default is "LatArCyrHeb-16".
|
||||||
|
|
||||||
|
*i18n_install_all=*"__{yes|no}__"::
|
||||||
|
Install everything regardless of generic or hostonly mode.
|
||||||
|
|
||||||
|
*reproducible=*"__{yes|no}__"::
|
||||||
|
Create reproducible images.
|
||||||
|
|
||||||
|
*loginstall=*"__<DIR>__"::
|
||||||
|
Log all files installed from the host to _<DIR>_.
|
||||||
|
|
||||||
|
*uefi_stub=*"_<FILE>_"::
|
||||||
|
Specifies the UEFI stub loader, which will load the attached kernel, initramfs and
|
||||||
|
kernel command line and boots the kernel. The default is
|
||||||
|
_/lib/systemd/boot/efi/linux<EFI-MACHINE-TYPE-NAME>.efi.stub_
|
||||||
|
or _/usr/lib/gummiboot/linux<EFI-MACHINE-TYPE-NAME>.efi.stub_
|
||||||
|
|
||||||
|
*kernel_image=*"_<FILE>_"::
|
||||||
|
Specifies the kernel image, which to include in the UEFI executable. The default is
|
||||||
|
_/lib/modules/<KERNEL-VERSION>/vmlinuz_ or _/boot/vmlinuz-<KERNEL-VERSION>_
|
||||||
|
|
||||||
|
Files
|
||||||
|
-----
|
||||||
|
_/etc/dracut.conf_::
|
||||||
|
Old configuration file. You better use your own file in
|
||||||
|
_/etc/dracut.conf.d/_.
|
||||||
|
|
||||||
|
_/etc/dracut.conf.d/_::
|
||||||
|
Any _/etc/dracut.conf.d/*.conf_ file can override the values in
|
||||||
|
_/etc/dracut.conf_. The configuration files are read in alphanumerical
|
||||||
|
order.
|
||||||
|
|
||||||
|
AUTHOR
|
||||||
|
------
|
||||||
|
Harald Hoyer
|
||||||
|
|
||||||
|
See Also
|
||||||
|
--------
|
||||||
|
*dracut*(8) *dracut.cmdline*(7)
|
||||||
|
|
||||||
20
dracut.conf.d/fedora.conf.example
Normal file
20
dracut.conf.d/fedora.conf.example
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# dracut config file customized for RedHat/Fedora.
|
||||||
|
|
||||||
|
# i18n
|
||||||
|
i18n_vars="/etc/sysconfig/keyboard:KEYTABLE-KEYMAP /etc/sysconfig/i18n:SYSFONT-FONT,FONTACM-FONT_MAP,FONT_UNIMAP"
|
||||||
|
i18n_default_font="eurlatgr"
|
||||||
|
i18n_install_all="yes"
|
||||||
|
|
||||||
|
|
||||||
|
stdloglvl=3
|
||||||
|
sysloglvl=5
|
||||||
|
install_optional_items+=" vi /etc/virc ps grep cat rm "
|
||||||
|
prefix="/"
|
||||||
|
systemdutildir=/usr/lib/systemd
|
||||||
|
systemdsystemunitdir=/usr/lib/systemd/system
|
||||||
|
systemdsystemconfdir=/etc/systemd/system
|
||||||
|
udevdir=/usr/lib/udev
|
||||||
|
hostonly="yes"
|
||||||
|
hostonly_cmdline="no"
|
||||||
|
early_microcode="yes"
|
||||||
|
reproducible="yes"
|
||||||
3
dracut.conf.d/fips.conf.example
Normal file
3
dracut.conf.d/fips.conf.example
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# turn on fips module
|
||||||
|
|
||||||
|
add_dracutmodules+=" fips "
|
||||||
5
dracut.conf.d/gentoo-systemd.conf.example
Normal file
5
dracut.conf.d/gentoo-systemd.conf.example
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
# /etc/dracut.conf.d/gentoo-systemd.conf
|
||||||
|
|
||||||
|
# Paths of systemd dirs on Gentoo
|
||||||
|
systemdutildir=/usr/lib/systemd
|
||||||
|
systemdsystemunitdir=/usr/lib/systemd/system
|
||||||
15
dracut.conf.d/gentoo.conf.example
Normal file
15
dracut.conf.d/gentoo.conf.example
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
# /etc/dracut.conf.d/gentoo.conf
|
||||||
|
# dracut config file customized for Gentoo Base System release 2
|
||||||
|
|
||||||
|
udevdir=/lib/udev
|
||||||
|
ro_mnt=yes
|
||||||
|
|
||||||
|
#
|
||||||
|
# Modules
|
||||||
|
#
|
||||||
|
|
||||||
|
# i18n
|
||||||
|
i18n_vars="/etc/conf.d/keymaps:keymap-KEYMAP,extended_keymaps-EXT_KEYMAPS /etc/conf.d/consolefont:consolefont-FONT,consoletranslation-FONT_MAP /etc/rc.conf:unicode-UNICODE"
|
||||||
|
i18n_default_font="LatArCyrHeb-16"
|
||||||
|
|
||||||
|
omit_drivers+=" i2o_scsi"
|
||||||
24
dracut.conf.d/suse.conf.example
Normal file
24
dracut.conf.d/suse.conf.example
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
# SUSE specifc dracut settings
|
||||||
|
#
|
||||||
|
# SUSE by default always builds a as small as possible initrd for performance
|
||||||
|
# and resource reasons.
|
||||||
|
# If you like to build a generic initrd which works on other platforms than
|
||||||
|
# on the one dracut/mkinitrd got called comment out below setting(s).
|
||||||
|
hostonly="yes"
|
||||||
|
hostonly_cmdline="yes"
|
||||||
|
|
||||||
|
compress="xz -0 --check=crc32 --memlimit-compress=50%"
|
||||||
|
|
||||||
|
i18n_vars="/etc/sysconfig/language:RC_LANG-LANG,RC_LC_ALL-LC_ALL /etc/sysconfig/console:CONSOLE_UNICODEMAP-FONT_UNIMAP,CONSOLE_FONT-FONT,CONSOLE_SCREENMAP-FONT_MAP /etc/sysconfig/keyboard:KEYTABLE-KEYMAP"
|
||||||
|
omit_drivers+=" i2o_scsi"
|
||||||
|
|
||||||
|
# Below adds additional tools to the initrd which are not urgently necessary to
|
||||||
|
# bring up the system, but help to debug problems.
|
||||||
|
# See /usr/lib/dracut/modules.d/95debug/module-setup.sh which additional tools
|
||||||
|
# are installed and add more if you need them. This specifically helps if you
|
||||||
|
# use:
|
||||||
|
# rd.break=[cmdline|pre-udev|pre-trigger|initqueue|pre-mount|
|
||||||
|
# mount|pre-pivot|cleanup]
|
||||||
|
# boot parameter or if you are forced to enter the dracut emergency shell.
|
||||||
|
|
||||||
|
# add_dracutmodules+=debug
|
||||||
1120
dracut.css
Normal file
1120
dracut.css
Normal file
File diff suppressed because it is too large
Load Diff
6
dracut.logrotate
Normal file
6
dracut.logrotate
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
/var/log/dracut.log {
|
||||||
|
missingok
|
||||||
|
notifempty
|
||||||
|
size 30k
|
||||||
|
create 0600 root root
|
||||||
|
}
|
||||||
301
dracut.modules.7.asc
Normal file
301
dracut.modules.7.asc
Normal file
@@ -0,0 +1,301 @@
|
|||||||
|
DRACUT.MODULES(7)
|
||||||
|
=================
|
||||||
|
:doctype: manpage
|
||||||
|
:man source: dracut
|
||||||
|
:man manual: dracut
|
||||||
|
|
||||||
|
NAME
|
||||||
|
----
|
||||||
|
dracut.modules - dracut modules
|
||||||
|
|
||||||
|
DESCRIPTION
|
||||||
|
-----------
|
||||||
|
|
||||||
|
dracut uses a modular system to build and extend the initramfs image. All
|
||||||
|
modules are located in _/usr/lib/dracut/modules.d_ or in _<git-src>/modules.d_.
|
||||||
|
The most basic dracut module is _99base_. In _99base_ the initial shell script
|
||||||
|
init is defined, which gets run by the kernel after initramfs loading. Although
|
||||||
|
you can replace init with your own version of _99base_, this is not encouraged.
|
||||||
|
Instead you should use, if possible, the hooks of dracut. All hooks, and the
|
||||||
|
point of time in which they are executed, are described in <<stages>>.
|
||||||
|
|
||||||
|
The main script, which creates the initramfs is dracut itself. It parses all
|
||||||
|
arguments and sets up the directory, in which everything is installed. It then
|
||||||
|
executes all check, install, installkernel scripts found in the modules, which
|
||||||
|
are to be processed. After everything is installed, the install directory is
|
||||||
|
archived and compressed to the final initramfs image. All helper functions used
|
||||||
|
by check, install and installkernel are found in in the file _dracut-functions_.
|
||||||
|
These shell functions are available to all module installer (install,
|
||||||
|
installkernel) scripts, without the need to source _dracut-functions_.
|
||||||
|
|
||||||
|
A module can check the preconditions for install and installkernel with the
|
||||||
|
check script. Also dependencies can be expressed with check. If a module passed
|
||||||
|
check, install and installkernel will be called to install all of the necessary
|
||||||
|
files for the module. To split between kernel and non-kernel parts of the
|
||||||
|
installation, all kernel module related parts have to be in installkernel. All
|
||||||
|
other files found in a module directory are module specific and mostly are hook
|
||||||
|
scripts and udev rules.
|
||||||
|
|
||||||
|
|
||||||
|
[[stages]]
|
||||||
|
== Boot Process Stages
|
||||||
|
|
||||||
|
dracut modules can insert custom script at various points, to control the boot
|
||||||
|
process.
|
||||||
|
These hooks are plain directories containing shell scripts ending with ".sh",
|
||||||
|
which are sourced by init.
|
||||||
|
Common used functions are in _dracut-lib.sh_, which can be sourced by any script.
|
||||||
|
|
||||||
|
=== Hook: cmdline
|
||||||
|
|
||||||
|
The _cmdline_ hook is a place to insert scripts to parse the kernel command line
|
||||||
|
and prepare the later actions, like setting up udev rules and configuration
|
||||||
|
files.
|
||||||
|
|
||||||
|
In this hook the most important environment variable is defined: root. The
|
||||||
|
second one is rootok, which indicates, that a module claimed to be able to parse
|
||||||
|
the root defined. So for example, **root=**__iscsi:....__ will be claimed by the
|
||||||
|
iscsi dracut module, which then sets rootok.
|
||||||
|
|
||||||
|
=== Hook: pre-udev
|
||||||
|
|
||||||
|
This hook is executed right after the cmdline hook and a check if root and
|
||||||
|
rootok were set. Here modules can take action with the final root, and before
|
||||||
|
udev has been run.
|
||||||
|
|
||||||
|
=== Start Udev
|
||||||
|
|
||||||
|
Now udev is started and the logging for udev is setup.
|
||||||
|
|
||||||
|
=== Hook: pre-trigger
|
||||||
|
|
||||||
|
In this hook, you can set udev environment variables with **udevadm control
|
||||||
|
--property=KEY=_value_** or control the further execution of udev with
|
||||||
|
udevadm.
|
||||||
|
|
||||||
|
=== Trigger Udev
|
||||||
|
|
||||||
|
udev is triggered by calling udevadm trigger, which sends add events for all
|
||||||
|
devices and subsystems.
|
||||||
|
|
||||||
|
=== Main Loop
|
||||||
|
|
||||||
|
In the main loop of dracut loops until udev has settled and
|
||||||
|
all scripts in _initqueue/finished_ returned true.
|
||||||
|
In this loop there are three hooks, where scripts can be inserted
|
||||||
|
by calling /sbin/initqueue.
|
||||||
|
|
||||||
|
==== Initqueue
|
||||||
|
|
||||||
|
This hook gets executed every time a script is inserted here, regardless of the
|
||||||
|
udev state.
|
||||||
|
|
||||||
|
==== Initqueue settled
|
||||||
|
|
||||||
|
This hooks (initqueue/settled) gets executed every time udev has settled.
|
||||||
|
|
||||||
|
==== Initqueue timeout
|
||||||
|
|
||||||
|
This hooks (initqueue/timeout) gets executed, when the main loop counter becomes
|
||||||
|
half of the rd.retry counter.
|
||||||
|
|
||||||
|
==== Initqueue finished
|
||||||
|
|
||||||
|
This hook (initqueue/finished) is called after udev has settled and
|
||||||
|
if all scripts herein return 0 the main loop will be ended.
|
||||||
|
Abritary scripts can be added here, to loop in the
|
||||||
|
initqueue until something happens, which a dracut module wants to wait for.
|
||||||
|
|
||||||
|
=== Hook: pre-mount
|
||||||
|
|
||||||
|
Before the root device is mounted all scripts in the hook pre-mount are
|
||||||
|
executed. In some cases (e.g. NFS) the real root device is already mounted,
|
||||||
|
though.
|
||||||
|
|
||||||
|
=== Hook: mount
|
||||||
|
|
||||||
|
This hook is mainly to mount the real root device.
|
||||||
|
|
||||||
|
=== Hook: pre-pivot
|
||||||
|
|
||||||
|
This hook is called before cleanup hook, This is a good place for
|
||||||
|
actions other than cleanups which need to be called before pivot.
|
||||||
|
|
||||||
|
=== Hook: cleanup
|
||||||
|
|
||||||
|
This hook is the last hook and is called before init finally switches root to
|
||||||
|
the real root device. This is a good place to clean up and kill processes not
|
||||||
|
needed anymore.
|
||||||
|
|
||||||
|
|
||||||
|
=== Cleanup and switch_root
|
||||||
|
|
||||||
|
Init (or systemd) kills all udev processes, cleans up the environment,
|
||||||
|
sets up the arguments for the real init process and finally calls switch_root.
|
||||||
|
switch_root removes the whole filesystem hierarchy of the initramfs,
|
||||||
|
chroot()s to the real root device and calls /sbin/init with the specified
|
||||||
|
arguments.
|
||||||
|
|
||||||
|
To ensure all files in the initramfs hierarchy can be removed, all processes
|
||||||
|
still running from the initramfs should not have any open file descriptors left.
|
||||||
|
|
||||||
|
== Network Infrastructure
|
||||||
|
|
||||||
|
FIXME
|
||||||
|
|
||||||
|
== Writing a Module
|
||||||
|
|
||||||
|
A simple example module is _96insmodpost_, which modprobes a kernel module after
|
||||||
|
udev has settled and the basic device drivers have been loaded.
|
||||||
|
|
||||||
|
All module installation information is in the file module-setup.sh.
|
||||||
|
|
||||||
|
First we create a check() function, which just exits with 0 indicating that this
|
||||||
|
module should be included by default.
|
||||||
|
|
||||||
|
check():
|
||||||
|
----
|
||||||
|
return 0
|
||||||
|
----
|
||||||
|
|
||||||
|
The we create the install() function, which installs a cmdline hook with
|
||||||
|
priority number 20 called _parse-insmodpost.sh_. It also installs the
|
||||||
|
_insmodpost.sh_ script in _/sbin_.
|
||||||
|
|
||||||
|
install():
|
||||||
|
----
|
||||||
|
inst_hook cmdline 20 "$moddir/parse-insmodpost.sh"
|
||||||
|
inst_simple "$moddir/insmodpost.sh" /sbin/insmodpost.sh
|
||||||
|
----
|
||||||
|
|
||||||
|
The _parse-instmodpost.sh_ parses the kernel command line for a argument
|
||||||
|
rd.driver.post, blacklists the module from being autoloaded and installs the
|
||||||
|
hook _insmodpost.sh_ in the _initqueue/settled_.
|
||||||
|
|
||||||
|
_parse-insmodpost.sh_:
|
||||||
|
----
|
||||||
|
for p in $(getargs rd.driver.post=); do
|
||||||
|
echo "blacklist $p" >> /etc/modprobe.d/initramfsblacklist.conf
|
||||||
|
_do_insmodpost=1
|
||||||
|
done
|
||||||
|
|
||||||
|
[ -n "$_do_insmodpost" ] && /sbin/initqueue --settled --unique --onetime /sbin/insmodpost.sh
|
||||||
|
unset _do_insmodpost
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
_insmodpost.sh_, which is called in the _initqueue/settled_ hook will just
|
||||||
|
modprobe the kernel modules specified in all rd.driver.post kernel command line
|
||||||
|
parameters. It runs after udev has settled and is only called once (--onetime).
|
||||||
|
|
||||||
|
_insmodpost.sh_:
|
||||||
|
----
|
||||||
|
. /lib/dracut-lib.sh
|
||||||
|
|
||||||
|
for p in $(getargs rd.driver.post=); do
|
||||||
|
modprobe $p
|
||||||
|
done
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
|
||||||
|
=== module-setup.sh: check()
|
||||||
|
|
||||||
|
_check()_ is called by dracut to evaluate the inclusion of a dracut module in
|
||||||
|
the initramfs.
|
||||||
|
|
||||||
|
$hostonly:: If the $hostonly variable is set, then the module check() function
|
||||||
|
should be in "hostonly" mode, which means, that the check() should only return
|
||||||
|
0, if the module is really needed to boot this specific host.
|
||||||
|
|
||||||
|
check() should return with:
|
||||||
|
|
||||||
|
0:: Include the dracut module in the initramfs.
|
||||||
|
|
||||||
|
1:: Do not include the dracut module. The requirements are not fulfilled
|
||||||
|
(missing tools, etc.)
|
||||||
|
|
||||||
|
255:: Only include the dracut module, if another module requires it or if
|
||||||
|
explicitly specified in the config file or on the argument list.
|
||||||
|
|
||||||
|
|
||||||
|
=== module-setup.sh: depends()
|
||||||
|
|
||||||
|
The function depends() should echo all other dracut module names the module
|
||||||
|
depends on.
|
||||||
|
|
||||||
|
=== module-setup.sh: cmdline()
|
||||||
|
|
||||||
|
This function should print the kernel command line options needed to boot the
|
||||||
|
current machine setup. It should start with a space and should not print a
|
||||||
|
newline.
|
||||||
|
|
||||||
|
=== module-setup.sh: install()
|
||||||
|
|
||||||
|
The install() function is called to install everything non-kernel related.
|
||||||
|
To install binaries, scripts, and other files, you can use the functions
|
||||||
|
mentioned in <<creation>>.
|
||||||
|
|
||||||
|
To address a file in the current module directory, use the variable "$moddir".
|
||||||
|
|
||||||
|
=== module-setup.sh: installkernel()
|
||||||
|
|
||||||
|
In installkernel() all kernel related files should be installed. You can use all
|
||||||
|
of the functions mentioned in <<creation>> to install files.
|
||||||
|
|
||||||
|
=== [[creation]]Creation Functions
|
||||||
|
|
||||||
|
==== inst_multiple [-o] <file> [ <file> ...]
|
||||||
|
|
||||||
|
installs multiple binaries and files. If executables are specified without a
|
||||||
|
path, dracut will search the path PATH=/usr/sbin:/sbin:/usr/bin:/bin for the
|
||||||
|
binary. If the option "-o" is given as the first parameter, a missing file does
|
||||||
|
not lead to an error.
|
||||||
|
|
||||||
|
==== inst <src> [<dst>]
|
||||||
|
|
||||||
|
installs _one_ file <src> either to the same place in the initramfs or to an
|
||||||
|
optional <dst>. inst with more than two arguments is treated the same as
|
||||||
|
inst_multiple, all arguments are treated as files to install and none as
|
||||||
|
install destinations.
|
||||||
|
|
||||||
|
==== inst_hook <hookdir> <prio> <src>
|
||||||
|
|
||||||
|
installs an executable/script <src> in the dracut hook <hookdir> with priority
|
||||||
|
<prio>.
|
||||||
|
|
||||||
|
==== inst_rules <udevrule> [ <udevrule> ...]
|
||||||
|
|
||||||
|
installs one ore more udev rules. Non-existant udev rules are reported, but do
|
||||||
|
not let dracut fail.
|
||||||
|
|
||||||
|
==== instmods <kernelmodule> [ <kernelmodule> ... ]
|
||||||
|
|
||||||
|
instmods should be used only in the installkernel() function.
|
||||||
|
|
||||||
|
instmods installs one or more kernel modules in the initramfs. <kernelmodule>
|
||||||
|
can also be a whole subsystem, if prefixed with a "=", like "=drivers/net/team".
|
||||||
|
|
||||||
|
instmods will not install the kernel module, if $hostonly is set and the kernel
|
||||||
|
module is not currently needed by any /sys/*...*/uevent MODALIAS.
|
||||||
|
To install a kernel module regardless of the hostonly mode use the form:
|
||||||
|
----
|
||||||
|
hostonly='' instmods <kernelmodule>
|
||||||
|
----
|
||||||
|
|
||||||
|
=== Initramfs Functions
|
||||||
|
|
||||||
|
FIXME
|
||||||
|
|
||||||
|
|
||||||
|
=== Network Modules
|
||||||
|
|
||||||
|
FIXME
|
||||||
|
|
||||||
|
AUTHOR
|
||||||
|
------
|
||||||
|
Harald Hoyer
|
||||||
|
|
||||||
|
SEE ALSO
|
||||||
|
--------
|
||||||
|
*dracut*(8)
|
||||||
BIN
dracut.png
Normal file
BIN
dracut.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.2 KiB |
550
dracut.spec
550
dracut.spec
@@ -1,168 +1,482 @@
|
|||||||
%if 0%{?fedora} < 12
|
%define dracutlibdir %{_prefix}/lib/dracut
|
||||||
%define with_switch_root 1
|
%bcond_without doc
|
||||||
%else
|
|
||||||
%define with_switch_root 1
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%if %{defined gittag}
|
# We ship a .pc file but don't want to have a dep on pkg-config. We
|
||||||
%define rdist 1.git%{gittag}%{?dist}
|
# strip the automatically generated dep here and instead co-own the
|
||||||
%define dashgittag -%{gittag}
|
# directory.
|
||||||
%else
|
%global __requires_exclude pkg-config
|
||||||
%define rdist %{?dist}
|
%define dist_free_release xxx
|
||||||
%endif
|
|
||||||
|
|
||||||
Name: dracut
|
Name: dracut
|
||||||
Version: 0.7
|
Version: xxx
|
||||||
Release: 1%{?rdist}
|
Release: %{dist_free_release}%{?dist}
|
||||||
|
|
||||||
Summary: Initramfs generator using udev
|
Summary: Initramfs generator using udev
|
||||||
|
%if 0%{?fedora} || 0%{?rhel}
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
License: GPLv2+
|
%endif
|
||||||
URL: http://apps.sourceforge.net/trac/dracut/wiki
|
%if 0%{?suse_version}
|
||||||
Source0: dracut-%{version}%{?dashgittag}.tar.bz2
|
Group: System/Base
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
||||||
Requires: udev
|
|
||||||
Requires: util-linux-ng
|
|
||||||
Requires: module-init-tools
|
|
||||||
Requires: cpio
|
|
||||||
Requires: coreutils
|
|
||||||
Requires: findutils
|
|
||||||
Requires: binutils
|
|
||||||
Requires: grep
|
|
||||||
Requires: mktemp
|
|
||||||
Requires: mount
|
|
||||||
Requires: bash
|
|
||||||
Requires: /bin/sh
|
|
||||||
Requires: fileutils, grep, mount, gzip, tar, mktemp >= 1.5-5, findutils
|
|
||||||
Requires: lvm2 >= 2.02.33-9, dhclient
|
|
||||||
Requires: filesystem >= 2.1.0, cpio, device-mapper, initscripts >= 8.63-1
|
|
||||||
Requires: e2fsprogs >= 1.38-12, libselinux, libsepol, coreutils
|
|
||||||
Requires: mdadm, elfutils-libelf, plymouth >= 0.7.0
|
|
||||||
Requires: cryptsetup-luks
|
|
||||||
Requires: bridge-utils
|
|
||||||
%ifnarch s390 s390x
|
|
||||||
Requires: dmraid
|
|
||||||
Requires: kbd
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if ! 0%{?with_switch_root}
|
# The entire source code is GPLv2+
|
||||||
Requires: /sbin/switch_root
|
# except install/* which is LGPLv2+
|
||||||
BuildArch: noarch
|
License: GPLv2+ and LGPLv2+
|
||||||
|
|
||||||
|
URL: https://dracut.wiki.kernel.org/
|
||||||
|
|
||||||
|
# Source can be generated by
|
||||||
|
# http://git.kernel.org/?p=boot/dracut/dracut.git;a=snapshot;h=%%{version};sf=tgz
|
||||||
|
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
|
||||||
|
BuildRequires: git
|
||||||
|
BuildRequires: kmod-devel >= 23
|
||||||
|
BuildRequires: gcc
|
||||||
|
|
||||||
|
%if 0%{?fedora} || 0%{?rhel}
|
||||||
|
BuildRequires: pkgconfig
|
||||||
|
BuildRequires: systemd
|
||||||
|
%endif
|
||||||
|
%if 0%{?fedora}
|
||||||
|
BuildRequires: bash-completion
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with doc}
|
||||||
|
%if 0%{?fedora} || 0%{?rhel}
|
||||||
|
BuildRequires: docbook-style-xsl docbook-dtds libxslt
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if 0%{?suse_version}
|
||||||
|
BuildRequires: docbook-xsl-stylesheets libxslt
|
||||||
|
%endif
|
||||||
|
|
||||||
|
BuildRequires: asciidoc
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if 0%{?suse_version} > 9999
|
||||||
|
Obsoletes: mkinitrd < 2.6.1
|
||||||
|
Provides: mkinitrd = 2.6.1
|
||||||
|
%endif
|
||||||
|
|
||||||
|
Obsoletes: dracut-fips <= 047
|
||||||
|
Provides: dracut-fips = %{version}-%{release}
|
||||||
|
Obsoletes: dracut-fips-aesni <= 047
|
||||||
|
Provides: dracut-fips-aesni = %{version}-%{release}
|
||||||
|
|
||||||
|
Obsoletes: dracut-kernel < 005
|
||||||
|
Provides: dracut-kernel = %{version}-%{release}
|
||||||
|
|
||||||
|
Obsoletes: dracut < 030
|
||||||
|
Obsoletes: dracut-norescue < 030
|
||||||
|
Provides: dracut-norescue = %{version}-%{release}
|
||||||
|
|
||||||
|
Requires: bash >= 4
|
||||||
|
Requires: coreutils
|
||||||
|
Requires: cpio
|
||||||
|
Requires: filesystem >= 2.1.0
|
||||||
|
Requires: findutils
|
||||||
|
Requires: grep
|
||||||
|
Requires: kmod
|
||||||
|
Requires: sed
|
||||||
|
Requires: xz
|
||||||
|
Requires: gzip
|
||||||
|
|
||||||
|
%if 0%{?fedora} || 0%{?rhel}
|
||||||
|
Recommends: hardlink
|
||||||
|
Recommends: pigz
|
||||||
|
Recommends: kpartx
|
||||||
|
Requires: util-linux >= 2.21
|
||||||
|
Requires: systemd >= 219
|
||||||
|
Requires: systemd-udev >= 219
|
||||||
|
Requires: procps-ng
|
||||||
|
%else
|
||||||
|
Requires: hardlink
|
||||||
|
Requires: gzip
|
||||||
|
Requires: kpartx
|
||||||
|
Requires: udev > 166
|
||||||
|
Requires: util-linux-ng >= 2.21
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version}
|
||||||
|
Requires: libkcapi-hmaccalc
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%description
|
%description
|
||||||
dracut is a new, event-driven initramfs infrastructure based around udev.
|
dracut contains tools to create bootable initramfses for the Linux
|
||||||
|
kernel. Unlike previous implementations, dracut hard-codes as little
|
||||||
|
as possible into the initramfs. dracut contains various modules which
|
||||||
|
are driven by the event-based udev. Having root on MD, DM, LVM2, LUKS
|
||||||
|
is supported as well as NFS, iSCSI, NBD, FCoE with the dracut-network
|
||||||
|
package.
|
||||||
|
|
||||||
%package generic
|
%package network
|
||||||
Summary: Metapackage to build a generic initramfs with dracut
|
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}
|
Requires: %{name} = %{version}-%{release}
|
||||||
Requires: rpcbind nfs-utils
|
%endif
|
||||||
Requires: iscsi-initiator-utils
|
Requires: iputils
|
||||||
Requires: nbd
|
Requires: iproute
|
||||||
Requires: net-tools iproute
|
Requires: dhclient
|
||||||
Requires: plymouth-system-theme plymouth-theme-charge plymouth-theme-solar
|
Obsoletes: dracut-generic < 008
|
||||||
|
Provides: dracut-generic = %{version}-%{release}
|
||||||
|
|
||||||
%description generic
|
%description network
|
||||||
This package requires everything which is needed to build a generic
|
This package requires everything which is needed to build a generic
|
||||||
all purpose initramfs with dracut.
|
all purpose initramfs with network support with dracut.
|
||||||
|
|
||||||
%package kernel
|
%package caps
|
||||||
Summary: Metapackage to build generic initramfs with dracut with only kernel modules
|
Summary: dracut modules to build a dracut initramfs which drops capabilities
|
||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{name} = %{version}-%{release}
|
||||||
Requires: ql2100-firmware
|
Requires: libcap
|
||||||
Requires: ql2200-firmware
|
|
||||||
Requires: ql23xx-firmware
|
|
||||||
Requires: ql2400-firmware
|
|
||||||
Requires: ql2500-firmware
|
|
||||||
|
|
||||||
%description kernel
|
%description caps
|
||||||
This package requires everything which is needed to build a initramfs with all
|
This package requires everything which is needed to build an
|
||||||
kernel modules and firmware files needed by dracut modules.
|
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
|
||||||
|
initramfs with dracut, with live image capabilities, like Live CDs.
|
||||||
|
|
||||||
|
%package config-generic
|
||||||
|
Summary: dracut configuration to turn off hostonly image generation
|
||||||
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
Obsoletes: dracut-nohostonly < 030
|
||||||
|
Provides: dracut-nohostonly = %{version}-%{release}
|
||||||
|
|
||||||
|
%description config-generic
|
||||||
|
This package provides the configuration to turn off the host specific initramfs
|
||||||
|
generation with dracut and generates a generic image by default.
|
||||||
|
|
||||||
|
%package config-rescue
|
||||||
|
Summary: dracut configuration to turn on rescue image generation
|
||||||
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
Obsoletes: dracut < 030
|
||||||
|
|
||||||
|
%description config-rescue
|
||||||
|
This package provides the configuration to turn on the rescue initramfs
|
||||||
|
generation with dracut.
|
||||||
|
|
||||||
%package tools
|
%package tools
|
||||||
Summary: dracut tools to build the local initramfs
|
Summary: dracut tools to build the local initramfs
|
||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{name} = %{version}-%{release}
|
||||||
Requires: ql2100-firmware
|
|
||||||
Requires: ql2200-firmware
|
|
||||||
Requires: ql23xx-firmware
|
|
||||||
Requires: ql2400-firmware
|
|
||||||
Requires: ql2500-firmware
|
|
||||||
|
|
||||||
%description tools
|
%description tools
|
||||||
This package contains tools to assemble the local initrd and host configuration.
|
This package contains tools to assemble the local initrd and host configuration.
|
||||||
|
|
||||||
|
%package squash
|
||||||
|
Summary: dracut module to build an initramfs with most files in a squashfs image
|
||||||
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
Requires: squashfs-tools
|
||||||
|
|
||||||
|
%description squash
|
||||||
|
This package provides a dracut module to build an initramfs, but store most files
|
||||||
|
in a squashfs image, result in a smaller initramfs size and reduce runtime memory
|
||||||
|
usage.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}-%{version}%{?dashgittag}
|
%autosetup -n %{name}-%{version} -S git_am
|
||||||
|
cp %{SOURCE1} .
|
||||||
|
|
||||||
%build
|
%build
|
||||||
make
|
%configure --systemdsystemunitdir=%{_unitdir} \
|
||||||
|
--bashcompletiondir=$(pkg-config --variable=completionsdir bash-completion) \
|
||||||
|
--libdir=%{_prefix}/lib \
|
||||||
|
%if %{without doc}
|
||||||
|
--disable-documentation \
|
||||||
|
%endif
|
||||||
|
${NULL}
|
||||||
|
|
||||||
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf $RPM_BUILD_ROOT
|
make %{?_smp_mflags} install \
|
||||||
make install DESTDIR=$RPM_BUILD_ROOT sbindir=/sbin sysconfdir=/etc mandir=%{_mandir}
|
DESTDIR=$RPM_BUILD_ROOT \
|
||||||
|
libdir=%{_prefix}/lib
|
||||||
|
|
||||||
%if ! 0%{?with_switch_root}
|
echo "DRACUT_VERSION=%{version}-%{release}" > $RPM_BUILD_ROOT/%{dracutlibdir}/dracut-version.sh
|
||||||
rm -f $RPM_BUILD_ROOT/sbin/switch_root
|
|
||||||
|
%if 0%{?fedora} == 0 && 0%{?rhel} == 0 && 0%{?suse_version} == 0
|
||||||
|
rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/01fips
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{defined _unitdir}
|
||||||
|
# for systemd, better use systemd-bootchart
|
||||||
|
rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/00bootchart
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# we do not support dash in the initramfs
|
||||||
|
rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/00dash
|
||||||
|
|
||||||
|
# remove gentoo specific modules
|
||||||
|
rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/50gensplash
|
||||||
|
|
||||||
|
%if %{defined _unitdir}
|
||||||
|
# with systemd IMA and selinux modules do not make sense
|
||||||
|
rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/96securityfs
|
||||||
|
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/95qeth_rules
|
||||||
|
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
|
||||||
|
%else
|
||||||
|
rm -fr -- $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/00warpclock
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
mkdir -p $RPM_BUILD_ROOT/boot/dracut
|
mkdir -p $RPM_BUILD_ROOT/boot/dracut
|
||||||
mkdir -p $RPM_BUILD_ROOT/var/lib/dracut/overlay
|
mkdir -p $RPM_BUILD_ROOT/var/lib/dracut/overlay
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log
|
||||||
|
touch $RPM_BUILD_ROOT%{_localstatedir}/log/dracut.log
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_sharedstatedir}/initramfs
|
||||||
|
|
||||||
%clean
|
%if 0%{?fedora} || 0%{?rhel}
|
||||||
rm -rf $RPM_BUILD_ROOT
|
install -m 0644 dracut.conf.d/fedora.conf.example $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/01-dist.conf
|
||||||
|
rm -f $RPM_BUILD_ROOT%{_mandir}/man?/*suse*
|
||||||
|
%endif
|
||||||
|
%if 0%{?suse_version}
|
||||||
|
install -m 0644 dracut.conf.d/suse.conf.example $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/01-dist.conf
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if 0%{?fedora} == 0 && 0%{?rhel} == 0 && 0%{?suse_version} <= 9999
|
||||||
|
rm -f -- $RPM_BUILD_ROOT%{_bindir}/mkinitrd
|
||||||
|
rm -f -- $RPM_BUILD_ROOT%{_bindir}/lsinitrd
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if 0%{?fedora} || 0%{?rhel}
|
||||||
|
echo 'hostonly="no"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/02-generic-image.conf
|
||||||
|
echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/02-rescue.conf
|
||||||
|
|
||||||
|
# FIXME: remove after F30
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/kernel/postinst.d
|
||||||
|
install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kernel/postinst.d/51-dracut-rescue-postinst.sh
|
||||||
|
%endif
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,0755)
|
%if %{with doc}
|
||||||
%doc README HACKING TODO COPYING AUTHORS
|
%doc README HACKING TODO AUTHORS NEWS dracut.html dracut.png dracut.svg
|
||||||
/sbin/dracut
|
|
||||||
%if 0%{?with_switch_root}
|
|
||||||
/sbin/switch_root
|
|
||||||
%endif
|
%endif
|
||||||
%dir %{_datadir}/dracut
|
%{!?_licensedir:%global license %%doc}
|
||||||
%{_datadir}/dracut/dracut-functions
|
%license COPYING lgpl-2.1.txt
|
||||||
%{_datadir}/dracut/modules.d
|
%{_bindir}/dracut
|
||||||
%config(noreplace) /etc/dracut.conf
|
%{_datadir}/bash-completion/completions/dracut
|
||||||
|
%{_datadir}/bash-completion/completions/lsinitrd
|
||||||
|
%if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version} > 9999
|
||||||
|
%{_bindir}/mkinitrd
|
||||||
|
%{_bindir}/lsinitrd
|
||||||
|
%endif
|
||||||
|
%dir %{dracutlibdir}
|
||||||
|
%dir %{dracutlibdir}/modules.d
|
||||||
|
%{dracutlibdir}/dracut-functions.sh
|
||||||
|
%{dracutlibdir}/dracut-init.sh
|
||||||
|
%{dracutlibdir}/dracut-functions
|
||||||
|
%{dracutlibdir}/dracut-version.sh
|
||||||
|
%{dracutlibdir}/dracut-logger.sh
|
||||||
|
%{dracutlibdir}/dracut-initramfs-restore
|
||||||
|
%{dracutlibdir}/dracut-install
|
||||||
|
%{dracutlibdir}/skipcpio
|
||||||
|
%config(noreplace) %{_sysconfdir}/dracut.conf
|
||||||
|
%if 0%{?fedora} || 0%{?suse_version} || 0%{?rhel}
|
||||||
|
%{dracutlibdir}/dracut.conf.d/01-dist.conf
|
||||||
|
%endif
|
||||||
|
%dir %{_sysconfdir}/dracut.conf.d
|
||||||
|
%dir %{dracutlibdir}/dracut.conf.d
|
||||||
|
%dir %{_datadir}/pkgconfig
|
||||||
|
%{_datadir}/pkgconfig/dracut.pc
|
||||||
|
|
||||||
|
%if %{with doc}
|
||||||
%{_mandir}/man8/dracut.8*
|
%{_mandir}/man8/dracut.8*
|
||||||
|
%{_mandir}/man8/*service.8*
|
||||||
|
%if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version} > 9999
|
||||||
|
%{_mandir}/man8/mkinitrd.8*
|
||||||
|
%{_mandir}/man1/lsinitrd.1*
|
||||||
|
%endif
|
||||||
|
%{_mandir}/man7/dracut.kernel.7*
|
||||||
|
%{_mandir}/man7/dracut.cmdline.7*
|
||||||
|
%{_mandir}/man7/dracut.modules.7*
|
||||||
|
%{_mandir}/man7/dracut.bootup.7*
|
||||||
|
%{_mandir}/man5/dracut.conf.5*
|
||||||
|
%endif
|
||||||
|
|
||||||
%files generic
|
%if %{undefined _unitdir}
|
||||||
%defattr(-,root,root,0755)
|
%{dracutlibdir}/modules.d/00bootchart
|
||||||
%doc README.generic
|
%endif
|
||||||
|
%{dracutlibdir}/modules.d/00bash
|
||||||
|
%{dracutlibdir}/modules.d/00systemd
|
||||||
|
%ifnarch s390 s390x
|
||||||
|
%{dracutlibdir}/modules.d/00warpclock
|
||||||
|
%endif
|
||||||
|
%if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version}
|
||||||
|
%{dracutlibdir}/modules.d/01fips
|
||||||
|
%endif
|
||||||
|
%{dracutlibdir}/modules.d/01systemd-initrd
|
||||||
|
%{dracutlibdir}/modules.d/03modsign
|
||||||
|
%{dracutlibdir}/modules.d/03rescue
|
||||||
|
%{dracutlibdir}/modules.d/04watchdog
|
||||||
|
%{dracutlibdir}/modules.d/05busybox
|
||||||
|
%{dracutlibdir}/modules.d/06rngd
|
||||||
|
%{dracutlibdir}/modules.d/10i18n
|
||||||
|
%{dracutlibdir}/modules.d/30convertfs
|
||||||
|
%{dracutlibdir}/modules.d/45url-lib
|
||||||
|
%{dracutlibdir}/modules.d/50drm
|
||||||
|
%{dracutlibdir}/modules.d/50plymouth
|
||||||
|
%{dracutlibdir}/modules.d/80lvmmerge
|
||||||
|
%{dracutlibdir}/modules.d/90btrfs
|
||||||
|
%{dracutlibdir}/modules.d/90crypt
|
||||||
|
%{dracutlibdir}/modules.d/90dm
|
||||||
|
%{dracutlibdir}/modules.d/90dmraid
|
||||||
|
%{dracutlibdir}/modules.d/90kernel-modules
|
||||||
|
%{dracutlibdir}/modules.d/90kernel-modules-extra
|
||||||
|
%{dracutlibdir}/modules.d/90lvm
|
||||||
|
%{dracutlibdir}/modules.d/90mdraid
|
||||||
|
%{dracutlibdir}/modules.d/90multipath
|
||||||
|
%{dracutlibdir}/modules.d/90stratis
|
||||||
|
%{dracutlibdir}/modules.d/90qemu
|
||||||
|
%{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/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/95qeth_rules
|
||||||
|
%{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/98usrmount
|
||||||
|
%{dracutlibdir}/modules.d/99base
|
||||||
|
%{dracutlibdir}/modules.d/99fs-lib
|
||||||
|
%{dracutlibdir}/modules.d/99shutdown
|
||||||
|
%attr(0644,root,root) %ghost %config(missingok,noreplace) %{_localstatedir}/log/dracut.log
|
||||||
|
%dir %{_sharedstatedir}/initramfs
|
||||||
|
%if %{defined _unitdir}
|
||||||
|
%{_unitdir}/dracut-shutdown.service
|
||||||
|
%{_unitdir}/sysinit.target.wants/dracut-shutdown.service
|
||||||
|
%{_unitdir}/dracut-cmdline.service
|
||||||
|
%{_unitdir}/dracut-initqueue.service
|
||||||
|
%{_unitdir}/dracut-mount.service
|
||||||
|
%{_unitdir}/dracut-pre-mount.service
|
||||||
|
%{_unitdir}/dracut-pre-pivot.service
|
||||||
|
%{_unitdir}/dracut-pre-trigger.service
|
||||||
|
%{_unitdir}/dracut-pre-udev.service
|
||||||
|
%{_unitdir}/initrd.target.wants/dracut-cmdline.service
|
||||||
|
%{_unitdir}/initrd.target.wants/dracut-initqueue.service
|
||||||
|
%{_unitdir}/initrd.target.wants/dracut-mount.service
|
||||||
|
%{_unitdir}/initrd.target.wants/dracut-pre-mount.service
|
||||||
|
%{_unitdir}/initrd.target.wants/dracut-pre-pivot.service
|
||||||
|
%{_unitdir}/initrd.target.wants/dracut-pre-trigger.service
|
||||||
|
%{_unitdir}/initrd.target.wants/dracut-pre-udev.service
|
||||||
|
|
||||||
%files kernel
|
%endif
|
||||||
%defattr(-,root,root,0755)
|
%if 0%{?fedora} || 0%{?rhel}
|
||||||
%doc README.kernel
|
%{_prefix}/lib/kernel/install.d/50-dracut.install
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%files network
|
||||||
|
%{dracutlibdir}/modules.d/02systemd-networkd
|
||||||
|
%{dracutlibdir}/modules.d/35network-manager
|
||||||
|
%{dracutlibdir}/modules.d/35network-legacy
|
||||||
|
%{dracutlibdir}/modules.d/40network
|
||||||
|
%{dracutlibdir}/modules.d/45ifcfg
|
||||||
|
%{dracutlibdir}/modules.d/90kernel-network-modules
|
||||||
|
%{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
|
||||||
|
%ifarch s390 s390x
|
||||||
|
%{dracutlibdir}/modules.d/95znet
|
||||||
|
%endif
|
||||||
|
%{dracutlibdir}/modules.d/99uefi-lib
|
||||||
|
|
||||||
|
%files caps
|
||||||
|
%{dracutlibdir}/modules.d/02caps
|
||||||
|
|
||||||
|
%files live
|
||||||
|
%{dracutlibdir}/modules.d/99img-lib
|
||||||
|
%{dracutlibdir}/modules.d/90dmsquash-live
|
||||||
|
%{dracutlibdir}/modules.d/90dmsquash-live-ntfs
|
||||||
|
%{dracutlibdir}/modules.d/90livenet
|
||||||
|
|
||||||
%files tools
|
%files tools
|
||||||
%defattr(-,root,root,0755)
|
%if %{with doc}
|
||||||
%doc COPYING
|
%doc %{_mandir}/man8/dracut-catimages.8*
|
||||||
/sbin/dracut-gencmdline
|
%endif
|
||||||
/sbin/dracut-catimages
|
|
||||||
|
%{_bindir}/dracut-catimages
|
||||||
%dir /boot/dracut
|
%dir /boot/dracut
|
||||||
%dir /var/lib/dracut
|
%dir /var/lib/dracut
|
||||||
%dir /var/lib/dracut/overlay
|
%dir /var/lib/dracut/overlay
|
||||||
|
|
||||||
|
%files squash
|
||||||
|
%{dracutlibdir}/modules.d/99squash
|
||||||
|
|
||||||
|
%files config-generic
|
||||||
|
%{dracutlibdir}/dracut.conf.d/02-generic-image.conf
|
||||||
|
|
||||||
|
%files config-rescue
|
||||||
|
%{dracutlibdir}/dracut.conf.d/02-rescue.conf
|
||||||
|
%if 0%{?fedora} || 0%{?rhel}
|
||||||
|
%{_prefix}/lib/kernel/install.d/51-dracut-rescue.install
|
||||||
|
# FIXME: remove after F30
|
||||||
|
%{_sysconfdir}/kernel/postinst.d/51-dracut-rescue-postinst.sh
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Fri Jul 24 2009 Harald Hoyer <harald@redhat.com> 0.7-1
|
|
||||||
- version 0.7
|
|
||||||
|
|
||||||
* Wed Jul 22 2009 Harald Hoyer <harald@redhat.com> 0.6-1
|
|
||||||
- version 0.6
|
|
||||||
|
|
||||||
* Fri Jul 17 2009 Harald Hoyer <harald@redhat.com> 0.5-1
|
|
||||||
- version 0.5
|
|
||||||
|
|
||||||
* Sat Jul 04 2009 Harald Hoyer <harald@redhat.com> 0.4-1
|
|
||||||
- version 0.4
|
|
||||||
|
|
||||||
* Thu Jul 02 2009 Harald Hoyer <harald@redhat.com> 0.3-1
|
|
||||||
- version 0.3
|
|
||||||
|
|
||||||
* Wed Jul 01 2009 Harald Hoyer <harald@redhat.com> 0.2-1
|
|
||||||
- version 0.2
|
|
||||||
|
|
||||||
* Fri Jun 19 2009 Harald Hoyer <harald@redhat.com> 0.1-1
|
|
||||||
- first release
|
|
||||||
|
|
||||||
* Thu Dec 18 2008 Jeremy Katz <katzj@redhat.com> - 0.0-1
|
|
||||||
- Initial build
|
|
||||||
|
|
||||||
|
|||||||
1701
dracut.svg
Normal file
1701
dracut.svg
Normal file
File diff suppressed because it is too large
Load Diff
|
After Width: | Height: | Size: 68 KiB |
518
dracut.usage.asc
Normal file
518
dracut.usage.asc
Normal file
@@ -0,0 +1,518 @@
|
|||||||
|
To create a initramfs image, the most simple command is:
|
||||||
|
----
|
||||||
|
# dracut
|
||||||
|
----
|
||||||
|
|
||||||
|
This will generate a general purpose initramfs image, with all possible
|
||||||
|
functionality resulting of the combination of the installed dracut modules and
|
||||||
|
system tools. The image is /boot/initramfs-_++<kernel version>++_.img and
|
||||||
|
contains the kernel modules of the currently active kernel with version
|
||||||
|
_++<kernel version>++_.
|
||||||
|
|
||||||
|
If the initramfs image already exists, dracut will display an error message, and
|
||||||
|
to overwrite the existing image, you have to use the --force option.
|
||||||
|
----
|
||||||
|
# dracut --force
|
||||||
|
----
|
||||||
|
|
||||||
|
If you want to specify another filename for the resulting image you would issue
|
||||||
|
a command like:
|
||||||
|
----
|
||||||
|
# dracut foobar.img
|
||||||
|
----
|
||||||
|
|
||||||
|
To generate an image for a specific kernel version, the command would be:
|
||||||
|
----
|
||||||
|
# dracut foobar.img 2.6.40-1.rc5.f20
|
||||||
|
----
|
||||||
|
|
||||||
|
A shortcut to generate the image at the default location for a specific kernel
|
||||||
|
version is:
|
||||||
|
----
|
||||||
|
# dracut --kver 2.6.40-1.rc5.f20
|
||||||
|
----
|
||||||
|
|
||||||
|
If you want to create lighter, smaller initramfs images, you may want to specify
|
||||||
|
the --hostonly or -H option. Using this option, the resulting image will
|
||||||
|
contain only those dracut modules, kernel modules and filesystems, which are
|
||||||
|
needed to boot this specific machine. This has the drawback, that you can't put
|
||||||
|
the disk on another controller or machine, and that you can't switch to another
|
||||||
|
root filesystem, without recreating the initramfs image. The usage of the
|
||||||
|
--hostonly option is only for experts and you will have to keep the broken
|
||||||
|
pieces. At least keep a copy of a general purpose image (and corresponding
|
||||||
|
kernel) as a fallback to rescue your system.
|
||||||
|
|
||||||
|
=== Inspecting the Contents
|
||||||
|
To see the contents of the image created by dracut, you can use the lsinitrd
|
||||||
|
tool.
|
||||||
|
----
|
||||||
|
# lsinitrd | less
|
||||||
|
----
|
||||||
|
|
||||||
|
To display the contents of a file in the initramfs also use the lsinitrd tool:
|
||||||
|
----
|
||||||
|
# lsinitrd -f /etc/ld.so.conf
|
||||||
|
include ld.so.conf.d/*.conf
|
||||||
|
----
|
||||||
|
|
||||||
|
=== Adding dracut Modules
|
||||||
|
Some dracut modules are turned off by default and have to be activated manually.
|
||||||
|
You can do this by adding the dracut modules to the configuration file
|
||||||
|
_/etc/dracut.conf_ or _/etc/dracut.conf.d/myconf.conf_. See *dracut.conf*(5).
|
||||||
|
You can also add dracut modules on the command line
|
||||||
|
by using the -a or --add option:
|
||||||
|
----
|
||||||
|
# dracut --add bootchart initramfs-bootchart.img
|
||||||
|
----
|
||||||
|
|
||||||
|
To see a list of available dracut modules, use the --list-modules option:
|
||||||
|
----
|
||||||
|
# dracut --list-modules
|
||||||
|
----
|
||||||
|
|
||||||
|
=== Omitting dracut Modules
|
||||||
|
Sometimes you don't want a dracut module to be included for reasons of speed,
|
||||||
|
size or functionality. To do this, either specify the omit_dracutmodules
|
||||||
|
variable in the _dracut.conf_ or _/etc/dracut.conf.d/myconf.conf_ configuration
|
||||||
|
file (see *dracut.conf*(5)), or use the -o or --omit option
|
||||||
|
on the command line:
|
||||||
|
----
|
||||||
|
# dracut -o "multipath lvm" no-multipath-lvm.img
|
||||||
|
----
|
||||||
|
|
||||||
|
=== Adding Kernel Modules
|
||||||
|
If you need a special kernel module in the initramfs, which is not
|
||||||
|
automatically picked up by dracut, you have the use the --add-drivers option
|
||||||
|
on the command line or the drivers vaiable in the _/etc/dracut.conf_
|
||||||
|
or _/etc/dracut.conf.d/myconf.conf_ configuration file (see *dracut.conf*(5)):
|
||||||
|
----
|
||||||
|
# dracut --add-drivers mymod initramfs-with-mymod.img
|
||||||
|
----
|
||||||
|
|
||||||
|
=== Boot parameters
|
||||||
|
An initramfs generated without the "hostonly" mode, does not contain any system
|
||||||
|
configuration files (except for some special exceptions), so the configuration
|
||||||
|
has to be done on the kernel command line. With this flexibility, you can easily
|
||||||
|
boot from a changed root partition, without the need to recompile the initramfs
|
||||||
|
image. So, you could completly change your root partition (move it inside a md
|
||||||
|
raid with encryption and LVM on top), as long as you specify the correct
|
||||||
|
filesystem LABEL or UUID on the kernel command line for your root device, dracut
|
||||||
|
will find it and boot from it.
|
||||||
|
|
||||||
|
The kernel command line can also be provided by the dhcp server with the
|
||||||
|
root-path option. See <<NetworkBoot>>.
|
||||||
|
|
||||||
|
For a full reference of all kernel command line parameters,
|
||||||
|
see *dracut.cmdline*(5).
|
||||||
|
|
||||||
|
To get a quick start for the suitable kernel command line on your system,
|
||||||
|
use the __--print-cmdline__ option:
|
||||||
|
----
|
||||||
|
# dracut --print-cmdline
|
||||||
|
root=UUID=8b8b6f91-95c7-4da2-831b-171e12179081 rootflags=rw,relatime,discard,data=ordered rootfstype=ext4
|
||||||
|
----
|
||||||
|
|
||||||
|
==== Specifying the root Device
|
||||||
|
This is the only option dracut really needs to boot from your root partition.
|
||||||
|
Because your root partition can live in various environments, there are a lot of
|
||||||
|
formats for the root= option. The most basic one is root=_++<path to device
|
||||||
|
node>++_:
|
||||||
|
----
|
||||||
|
root=/dev/sda2
|
||||||
|
----
|
||||||
|
|
||||||
|
Because device node names can change, dependent on the drive ordering, you are
|
||||||
|
encouraged to use the filesystem identifier (UUID) or filesystem label (LABEL)
|
||||||
|
to specify your root partition:
|
||||||
|
----
|
||||||
|
root=UUID=19e9dda3-5a38-484d-a9b0-fa6b067d0331
|
||||||
|
----
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
----
|
||||||
|
root=LABEL=myrootpartitionlabel
|
||||||
|
----
|
||||||
|
|
||||||
|
To see all UUIDs or LABELs on your system, do:
|
||||||
|
----
|
||||||
|
# ls -l /dev/disk/by-uuid
|
||||||
|
----
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
----
|
||||||
|
# ls -l /dev/disk/by-label
|
||||||
|
----
|
||||||
|
|
||||||
|
If your root partition is on the network see <<NetworkBoot>>.
|
||||||
|
|
||||||
|
==== Keyboard Settings
|
||||||
|
If you have to input passwords for encrypted disk volumes, you might want to set
|
||||||
|
the keyboard layout and specify a display font.
|
||||||
|
|
||||||
|
A typical german kernel command would contain:
|
||||||
|
----
|
||||||
|
rd.vconsole.font=latarcyrheb-sun16 rd.vconsole.keymap=de-latin1-nodeadkeys rd.locale.LANG=de_DE.UTF-8
|
||||||
|
----
|
||||||
|
|
||||||
|
Setting these options can override the setting stored on your system, if you use
|
||||||
|
a modern init system, like systemd.
|
||||||
|
|
||||||
|
==== Blacklisting Kernel Modules
|
||||||
|
Sometimes it is required to prevent the automatic kernel module loading of a
|
||||||
|
specific kernel module. To do this, just add rd.blacklist=_++<kernel module
|
||||||
|
name>++_, with _++<kernel module name>++_ not containing the _.ko_
|
||||||
|
suffix, to the kernel command line. For example:
|
||||||
|
----
|
||||||
|
rd.driver.blacklist=mptsas rd.driver.blacklist=nouveau
|
||||||
|
----
|
||||||
|
|
||||||
|
The option can be specified multiple times on the kernel command line.
|
||||||
|
|
||||||
|
==== Speeding up the Boot Process
|
||||||
|
If you want to speed up the boot process, you can specify as much information
|
||||||
|
for dracut on the kernel command as possible. For example, you can tell dracut,
|
||||||
|
that you root partition is not on a LVM volume or not on a raid partition, or
|
||||||
|
that it lives inside a specific crypto LUKS encrypted volume. By default, dracut
|
||||||
|
searches everywhere. A typical dracut kernel command line for a plain primary or
|
||||||
|
logical partition would contain:
|
||||||
|
----
|
||||||
|
rd.luks=0 rd.lvm=0 rd.md=0 rd.dm=0
|
||||||
|
----
|
||||||
|
|
||||||
|
This turns off every automatic assembly of LVM, MD raids, DM raids and
|
||||||
|
crypto LUKS.
|
||||||
|
|
||||||
|
Of course, you could also omit the dracut modules in the initramfs creation
|
||||||
|
process, but then you would lose the posibility to turn it on on demand.
|
||||||
|
|
||||||
|
|
||||||
|
[[Injecting]]
|
||||||
|
=== Injecting custom Files
|
||||||
|
To add your own files to the initramfs image, you have several possibilities.
|
||||||
|
|
||||||
|
The --include option let you specify a source path and a target path.
|
||||||
|
For example
|
||||||
|
----
|
||||||
|
# dracut --include cmdline-preset /etc/cmdline.d/mycmdline.conf initramfs-cmdline-pre.img
|
||||||
|
----
|
||||||
|
will create an initramfs image, where the file cmdline-preset will be copied
|
||||||
|
inside the initramfs to _/etc/cmdline.d/mycmdline.conf_. --include can only
|
||||||
|
be specified once.
|
||||||
|
|
||||||
|
|
||||||
|
----
|
||||||
|
# mkdir -p rd.live.overlay/etc/cmdline.d
|
||||||
|
# mkdir -p rd.live.overlay/etc/conf.d
|
||||||
|
# echo "ip=dhcp" >> rd.live.overlay/etc/cmdline.d/mycmdline.conf
|
||||||
|
# echo export FOO=testtest >> rd.live.overlay/etc/conf.d/testvar.conf
|
||||||
|
# echo export BAR=testtest >> rd.live.overlay/etc/conf.d/testvar.conf
|
||||||
|
# tree rd.live.overlay/
|
||||||
|
rd.live.overlay/
|
||||||
|
`-- etc
|
||||||
|
|-- cmdline.d
|
||||||
|
| `-- mycmdline.conf
|
||||||
|
`-- conf.d
|
||||||
|
`-- testvar.conf
|
||||||
|
|
||||||
|
# dracut --include rd.live.overlay / initramfs-rd.live.overlay.img
|
||||||
|
----
|
||||||
|
|
||||||
|
This will put the contents of the rd.live.overlay directory into the root of the
|
||||||
|
initramfs image.
|
||||||
|
|
||||||
|
The --install option let you specify several files, which will get installed in
|
||||||
|
the initramfs image at the same location, as they are present on initramfs
|
||||||
|
creation time.
|
||||||
|
|
||||||
|
|
||||||
|
----
|
||||||
|
# dracut --install 'strace fsck.ext3 ssh' initramfs-dbg.img
|
||||||
|
----
|
||||||
|
|
||||||
|
This will create an initramfs with the strace, fsck.ext3 and ssh executables,
|
||||||
|
together with the libraries needed to start those. The --install option can be
|
||||||
|
specified multiple times.
|
||||||
|
|
||||||
|
|
||||||
|
[[NetworkBoot]]
|
||||||
|
=== Network Boot
|
||||||
|
|
||||||
|
If your root partition is on a network drive, you have to have the network
|
||||||
|
dracut modules installed to create a network aware initramfs image.
|
||||||
|
|
||||||
|
If you specify ip=dhcp on the kernel command line, then dracut asks a dhcp
|
||||||
|
server about the ip address for the machine. The dhcp server can also serve an
|
||||||
|
additional root-path, which will set the root device for dracut. With this
|
||||||
|
mechanism, you have static configuration on your client machine and a
|
||||||
|
centralized boot configuration on your TFTP/DHCP server. If you can't pass a
|
||||||
|
kernel command line, then you can inject _/etc/cmdline.d/mycmdline.conf_, with a
|
||||||
|
method described in <<Injecting>>.
|
||||||
|
|
||||||
|
==== Reducing the Image Size
|
||||||
|
|
||||||
|
To reduce the size of the initramfs, you should create it with by omitting all
|
||||||
|
dracut modules, which you know, you don't need to boot the machine.
|
||||||
|
|
||||||
|
You can also specify the exact dracut and kernel modules to produce a very tiny
|
||||||
|
initramfs image.
|
||||||
|
|
||||||
|
For example for a NFS image, you would do:
|
||||||
|
|
||||||
|
|
||||||
|
----
|
||||||
|
# dracut -m "nfs network base" initramfs-nfs-only.img
|
||||||
|
----
|
||||||
|
|
||||||
|
Then you would boot from this image with your target machine and reduce the size
|
||||||
|
once more by creating it on the target machine with the --host-only option:
|
||||||
|
|
||||||
|
|
||||||
|
----
|
||||||
|
# dracut -m "nfs network base" --host-only initramfs-nfs-host-only.img
|
||||||
|
----
|
||||||
|
|
||||||
|
This will reduce the size of the initramfs image significantly.
|
||||||
|
|
||||||
|
|
||||||
|
== Troubleshooting
|
||||||
|
|
||||||
|
If the boot process does not succeed, you have several options to debug the
|
||||||
|
situation. Some of the basic operations are covered here. For more information
|
||||||
|
you should also visit:
|
||||||
|
https://www.kernel.org/pub/linux/utils/boot/dracut/dracut.html
|
||||||
|
|
||||||
|
|
||||||
|
[[identifying-your-problem-area]]
|
||||||
|
=== Identifying your problem area
|
||||||
|
. Remove ''rhgb'' and ''quiet'' from the kernel command line
|
||||||
|
. Add ''rd.shell'' to the kernel command line. This will present a shell should
|
||||||
|
dracut be unable to locate your root device
|
||||||
|
. Add ''rd.shell rd.debug log_buf_len=1M'' to the kernel command line so that
|
||||||
|
dracut shell commands are printed as they are executed
|
||||||
|
. The file /run/initramfs/rdsosreport.txt is generated,
|
||||||
|
which contains all the logs and the output of all significant tools, which are
|
||||||
|
mentioned later.
|
||||||
|
|
||||||
|
If you want to save that output, simply mount /boot by hand or insert an USB
|
||||||
|
stick and mount that. Then you can store the output for later inspection.
|
||||||
|
|
||||||
|
[[information-to-include-in-your-report]]
|
||||||
|
=== Information to include in your report
|
||||||
|
|
||||||
|
[[all-bug-reports]]
|
||||||
|
==== All bug reports
|
||||||
|
In all cases, the following should be mentioned and attached to your bug report:
|
||||||
|
|
||||||
|
* The exact kernel command-line used. Typically from the bootloader
|
||||||
|
configuration file (e.g. _/boot/grub2/grub.cfg_) or from _/proc/cmdline_.
|
||||||
|
* A copy of your disk partition information from _/etc/fstab_, which might be
|
||||||
|
obtained booting an old working initramfs or a rescue medium.
|
||||||
|
* Turn on dracut debugging (see _the 'debugging dracut' section_), and attach
|
||||||
|
the file /run/initramfs/rdsosreport.txt.
|
||||||
|
* If you use a dracut configuration file, please include _/etc/dracut.conf_ and
|
||||||
|
all files in _/etc/dracut.conf.d/*.conf_
|
||||||
|
|
||||||
|
[[network-root-device-related-problems]]
|
||||||
|
==== Network root device related problems
|
||||||
|
This section details information to include when experiencing problems on a
|
||||||
|
system whose root device is located on a network attached volume (e.g. iSCSI,
|
||||||
|
NFS or NBD). As well as the information from <<all-bug-reports>>, include the
|
||||||
|
following information:
|
||||||
|
|
||||||
|
|
||||||
|
* Please include the output of
|
||||||
|
+
|
||||||
|
----
|
||||||
|
# /sbin/ifup <interfacename>
|
||||||
|
# ip addr show
|
||||||
|
----
|
||||||
|
|
||||||
|
[[debugging-dracut]]
|
||||||
|
=== Debugging dracut
|
||||||
|
|
||||||
|
|
||||||
|
[[configure-a-serial-console]]
|
||||||
|
==== Configure a serial console
|
||||||
|
|
||||||
|
Successfully debugging dracut will require some form of console
|
||||||
|
logging during the system boot. This section documents configuring a
|
||||||
|
serial console connection to record boot messages.
|
||||||
|
|
||||||
|
. First, enable serial console output for both the kernel and the bootloader.
|
||||||
|
. Open the file _/boot/grub2/grub.cfg_ for editing. Below the line ''timeout=5'', add
|
||||||
|
the following:
|
||||||
|
+
|
||||||
|
----
|
||||||
|
serial --unit=0 --speed=9600
|
||||||
|
terminal --timeout=5 serial console
|
||||||
|
----
|
||||||
|
+
|
||||||
|
. Also in _/boot/grub2/grub.cfg_, add the following boot arguemnts to the ''kernel''
|
||||||
|
line:
|
||||||
|
+
|
||||||
|
----
|
||||||
|
console=tty0 console=ttyS0,9600
|
||||||
|
----
|
||||||
|
+
|
||||||
|
. When finished, the _/boot/grub2/grub.cfg_ file should look similar to the example
|
||||||
|
below.
|
||||||
|
+
|
||||||
|
----
|
||||||
|
default=0
|
||||||
|
timeout=5
|
||||||
|
serial --unit=0 --speed=9600
|
||||||
|
terminal --timeout=5 serial console
|
||||||
|
title Fedora (2.6.29.5-191.fc11.x86_64)
|
||||||
|
root (hd0,0)
|
||||||
|
kernel /vmlinuz-2.6.29.5-191.fc11.x86_64 ro root=/dev/mapper/vg_uc1-lv_root console=tty0 console=ttyS0,9600
|
||||||
|
initrd /dracut-2.6.29.5-191.fc11.x86_64.img
|
||||||
|
----
|
||||||
|
+
|
||||||
|
. More detailed information on how to configure the kernel for console output
|
||||||
|
can be found at
|
||||||
|
http://www.faqs.org/docs/Linux-HOWTO/Remote-Serial-Console-HOWTO.html#CONFIGURE-KERNEL.
|
||||||
|
. Redirecting non-interactive output
|
||||||
|
+
|
||||||
|
--
|
||||||
|
NOTE: You can redirect all non-interactive output to _/dev/kmsg_ and the kernel
|
||||||
|
will put it out on the console when it reaches the kernel buffer by doing
|
||||||
|
|
||||||
|
----
|
||||||
|
# exec >/dev/kmsg 2>&1 </dev/console
|
||||||
|
----
|
||||||
|
--
|
||||||
|
|
||||||
|
[[using-the-dracut-shell]]
|
||||||
|
==== Using the dracut shell
|
||||||
|
|
||||||
|
dracut offers a shell for interactive debugging in the event dracut fails to
|
||||||
|
locate your root filesystem. To enable the shell:
|
||||||
|
|
||||||
|
. Add the boot parameter ''rd.shell'' to your bootloader configuration file
|
||||||
|
(e.g. _/boot/grub2/grub.cfg_)
|
||||||
|
. Remove the boot arguments ''rhgb'' and ''quiet''
|
||||||
|
+
|
||||||
|
A sample _/boot/grub2/grub.cfg_ bootloader configuration file is listed below.
|
||||||
|
+
|
||||||
|
----
|
||||||
|
default=0
|
||||||
|
timeout=5
|
||||||
|
serial --unit=0 --speed=9600
|
||||||
|
terminal --timeout=5 serial console
|
||||||
|
title Fedora (2.6.29.5-191.fc11.x86_64)
|
||||||
|
root (hd0,0)
|
||||||
|
kernel /vmlinuz-2.6.29.5-191.fc11.x86_64 ro root=/dev/mapper/vg_uc1-lv_root console=tty0 rd.shell
|
||||||
|
initrd /dracut-2.6.29.5-191.fc11.x86_64.img
|
||||||
|
----
|
||||||
|
+
|
||||||
|
. If system boot fails, you will be dropped into a shell as seen in the example
|
||||||
|
below.
|
||||||
|
+
|
||||||
|
----
|
||||||
|
No root device found
|
||||||
|
Dropping to debug shell.
|
||||||
|
|
||||||
|
#
|
||||||
|
----
|
||||||
|
+
|
||||||
|
. Use this shell prompt to gather the information requested above
|
||||||
|
(see <<all-bug-reports>>).
|
||||||
|
|
||||||
|
[[accessing-the-root-volume-from-the-dracut-shell]]
|
||||||
|
==== Accessing the root volume from the dracut shell
|
||||||
|
From the dracut debug shell, you can manually perform the task of locating and
|
||||||
|
preparing your root volume for boot. The required steps will depend on how your
|
||||||
|
root volume is configured. Common scenarios include:
|
||||||
|
|
||||||
|
* A block device (e.g. _/dev/sda7_)
|
||||||
|
* A LVM logical volume (e.g. _/dev/VolGroup00/LogVol00_)
|
||||||
|
* An encrypted device
|
||||||
|
(e.g. _/dev/mapper/luks-4d5972ea-901c-4584-bd75-1da802417d83_)
|
||||||
|
* A network attached device
|
||||||
|
(e.g. _netroot=iscsi:@192.168.0.4::3260::iqn.2009-02.org.example:for.all_)
|
||||||
|
|
||||||
|
The exact method for locating and preparing will vary. However, to continue with
|
||||||
|
a successful boot, the objective is to locate your root volume and create a
|
||||||
|
symlink _/dev/root_ which points to the file system. For example, the following
|
||||||
|
example demonstrates accessing and booting a root volume that is an encrypted
|
||||||
|
LVM Logical volume.
|
||||||
|
|
||||||
|
. Inspect your partitions using parted
|
||||||
|
+
|
||||||
|
----
|
||||||
|
# parted /dev/sda -s p
|
||||||
|
Model: ATA HTS541060G9AT00 (scsi)
|
||||||
|
Disk /dev/sda: 60.0GB
|
||||||
|
Sector size (logical/physical): 512B/512B
|
||||||
|
Partition Table: msdos
|
||||||
|
Number Start End Size Type File system Flags
|
||||||
|
1 32.3kB 10.8GB 107MB primary ext4 boot
|
||||||
|
2 10.8GB 55.6GB 44.7GB logical lvm
|
||||||
|
----
|
||||||
|
+
|
||||||
|
. You recall that your root volume was a LVM logical volume. Scan and activate
|
||||||
|
any logical volumes.
|
||||||
|
+
|
||||||
|
----
|
||||||
|
# lvm vgscan
|
||||||
|
# lvm vgchange -ay
|
||||||
|
----
|
||||||
|
+
|
||||||
|
. You should see any logical volumes now using the command blkid:
|
||||||
|
+
|
||||||
|
----
|
||||||
|
# blkid
|
||||||
|
/dev/sda1: UUID="3de247f3-5de4-4a44-afc5-1fe179750cf7" TYPE="ext4"
|
||||||
|
/dev/sda2: UUID="Ek4dQw-cOtq-5MJu-OGRF-xz5k-O2l8-wdDj0I" TYPE="LVM2_member"
|
||||||
|
/dev/mapper/linux-root: UUID="def0269e-424b-4752-acf3-1077bf96ad2c" TYPE="crypto_LUKS"
|
||||||
|
/dev/mapper/linux-home: UUID="c69127c1-f153-4ea2-b58e-4cbfa9257c5e" TYPE="ext3"
|
||||||
|
/dev/mapper/linux-swap: UUID="47b4d329-975c-4c08-b218-f9c9bf3635f1" TYPE="swap"
|
||||||
|
----
|
||||||
|
+
|
||||||
|
. From the output above, you recall that your root volume exists on an encrypted
|
||||||
|
block device. Following the guidance disk encryption guidance from the
|
||||||
|
Installation Guide, you unlock your encrypted root volume.
|
||||||
|
+
|
||||||
|
----
|
||||||
|
# UUID=$(cryptsetup luksUUID /dev/mapper/linux-root)
|
||||||
|
# cryptsetup luksOpen /dev/mapper/linux-root luks-$UUID
|
||||||
|
Enter passphrase for /dev/mapper/linux-root:
|
||||||
|
Key slot 0 unlocked.
|
||||||
|
----
|
||||||
|
+
|
||||||
|
. Next, make a symbolic link to the unlocked root volume
|
||||||
|
+
|
||||||
|
----
|
||||||
|
# ln -s /dev/mapper/luks-$UUID /dev/root
|
||||||
|
----
|
||||||
|
+
|
||||||
|
. With the root volume available, you may continue booting the system by exiting
|
||||||
|
the dracut shell
|
||||||
|
+
|
||||||
|
----
|
||||||
|
# exit
|
||||||
|
----
|
||||||
|
|
||||||
|
[[additional-dracut-boot-parameters]]
|
||||||
|
==== Additional dracut boot parameters
|
||||||
|
For more debugging options, see *dracut.cmdline*(7).
|
||||||
|
|
||||||
|
|
||||||
|
[[debugging-dracut-on-shutdown]]
|
||||||
|
==== Debugging dracut on shutdown
|
||||||
|
|
||||||
|
To debug the shutdown sequence on systemd systems, you can _rd.break_
|
||||||
|
on _pre-shutdown_ or _shutdown_.
|
||||||
|
|
||||||
|
To do this from an already booted system:
|
||||||
|
----
|
||||||
|
# mkdir -p /run/initramfs/etc/cmdline.d
|
||||||
|
# echo "rd.debug rd.break=pre-shutdown rd.break=shutdown" > /run/initramfs/etc/cmdline.d/debug.conf
|
||||||
|
# touch /run/initramfs/.need_shutdown
|
||||||
|
----
|
||||||
|
|
||||||
|
This will give you a dracut shell after the system pivot'ed back in the
|
||||||
|
initramfs.
|
||||||
|
|
||||||
61
fedora-test.sh
Executable file
61
fedora-test.sh
Executable file
@@ -0,0 +1,61 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
[[ -d ${0%/*} ]] && cd ${0%/*}
|
||||||
|
|
||||||
|
RUN_ID="$1"
|
||||||
|
TESTS=$2
|
||||||
|
|
||||||
|
dnf -y update --best --allowerasing &>/dev/null
|
||||||
|
|
||||||
|
dnf -y install --best --allowerasing \
|
||||||
|
dash \
|
||||||
|
asciidoc \
|
||||||
|
mdadm \
|
||||||
|
lvm2 \
|
||||||
|
dmraid \
|
||||||
|
cryptsetup \
|
||||||
|
nfs-utils \
|
||||||
|
nbd \
|
||||||
|
dhcp-server \
|
||||||
|
scsi-target-utils \
|
||||||
|
iscsi-initiator-utils \
|
||||||
|
strace \
|
||||||
|
btrfs-progs \
|
||||||
|
kmod-devel \
|
||||||
|
gcc \
|
||||||
|
bzip2 \
|
||||||
|
xz \
|
||||||
|
tar \
|
||||||
|
wget \
|
||||||
|
rpm-build \
|
||||||
|
make \
|
||||||
|
git \
|
||||||
|
bash-completion \
|
||||||
|
sudo \
|
||||||
|
kernel \
|
||||||
|
dhcp-client \
|
||||||
|
/usr/bin/qemu-kvm \
|
||||||
|
/usr/bin/qemu-system-$(uname -i) \
|
||||||
|
e2fsprogs \
|
||||||
|
$NULL &>/dev/null
|
||||||
|
|
||||||
|
./configure
|
||||||
|
|
||||||
|
NCPU=$(getconf _NPROCESSORS_ONLN)
|
||||||
|
|
||||||
|
if ! [[ $TESTS ]]; then
|
||||||
|
make -j$NCPU all syncheck rpm logtee
|
||||||
|
else
|
||||||
|
make -j$NCPU all logtee
|
||||||
|
|
||||||
|
cd test
|
||||||
|
|
||||||
|
time sudo make \
|
||||||
|
KVERSION=$(rpm -qa kernel --qf '%{VERSION}-%{RELEASE}.%{ARCH}\n' | sort -rn | head -1) \
|
||||||
|
TEST_RUN_ID=$RUN_ID \
|
||||||
|
${TESTS:+TESTS="$TESTS"} \
|
||||||
|
-k V=2 \
|
||||||
|
check
|
||||||
|
fi
|
||||||
64
git2spec.pl
Executable file
64
git2spec.pl
Executable file
@@ -0,0 +1,64 @@
|
|||||||
|
#!/usr/bin/perl
|
||||||
|
|
||||||
|
sub create_patches {
|
||||||
|
my $tag=shift;
|
||||||
|
my $pdir=shift;
|
||||||
|
my $n=1;
|
||||||
|
my @lines;
|
||||||
|
my $fname;
|
||||||
|
my $f=0;
|
||||||
|
|
||||||
|
mkdir $pdir, 0755;
|
||||||
|
|
||||||
|
open( GIT, 'git log -p --pretty=email --stat -m --first-parent --reverse '.$tag.'..HEAD |');
|
||||||
|
|
||||||
|
while (<GIT>) {
|
||||||
|
if (/^From [a-z0-9]{40} .*$/) {
|
||||||
|
$fname = sprintf("%04d", $n++).".patch";
|
||||||
|
open FH, ">".$pdir."/".$fname;
|
||||||
|
$f=1;
|
||||||
|
}
|
||||||
|
if (/^---$/ && $f == 1) {
|
||||||
|
push @lines, $fname;
|
||||||
|
$f=0;
|
||||||
|
}
|
||||||
|
print FH;
|
||||||
|
}
|
||||||
|
|
||||||
|
return @lines;
|
||||||
|
};
|
||||||
|
|
||||||
|
use POSIX qw(strftime);
|
||||||
|
my $datestr = strftime "%Y%m%d", gmtime;
|
||||||
|
|
||||||
|
my $tag=shift;
|
||||||
|
my $pdir=shift;
|
||||||
|
$tag=`git describe --abbrev=0 --tags` if not defined $tag;
|
||||||
|
chomp($tag);
|
||||||
|
my @patches=&create_patches($tag, $pdir);
|
||||||
|
my $num=$#patches + 2;
|
||||||
|
$tag=~s/[^0-9]+?([0-9]+)/$1/ if $tag !~ /\b[0-9a-f]{5,40}\b/;
|
||||||
|
my $release="$num.git$datestr";
|
||||||
|
$release="1" if $num == 1;
|
||||||
|
|
||||||
|
while(<>) {
|
||||||
|
if (/^Version:/) {
|
||||||
|
print "Version: $tag\n";
|
||||||
|
}
|
||||||
|
elsif (/^%define dist_free_release/) {
|
||||||
|
print "%define dist_free_release $release\n";
|
||||||
|
}
|
||||||
|
elsif ((/^Source0:/) || (/^Source:/)) {
|
||||||
|
print $_;
|
||||||
|
$num=1;
|
||||||
|
for(@patches) {
|
||||||
|
s/.*\///g;
|
||||||
|
print "Patch$num: $_\n";
|
||||||
|
$num++;
|
||||||
|
}
|
||||||
|
print "\n";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
print $_;
|
||||||
|
}
|
||||||
|
}
|
||||||
1
install/.kateconfig
Normal file
1
install/.kateconfig
Normal file
@@ -0,0 +1 @@
|
|||||||
|
kate: space-indent on; tab-width 8; indent-width 8; replace-tabs on; eol unix;
|
||||||
7
install/Makefile
Normal file
7
install/Makefile
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
all:
|
||||||
|
$(MAKE) -C ..
|
||||||
|
|
||||||
|
clean:
|
||||||
|
$(MAKE) -C .. clean
|
||||||
|
|
||||||
|
.PHONY: all clean
|
||||||
1821
install/dracut-install.c
Normal file
1821
install/dracut-install.c
Normal file
File diff suppressed because it is too large
Load Diff
729
install/hashmap.c
Normal file
729
install/hashmap.c
Normal file
@@ -0,0 +1,729 @@
|
|||||||
|
/***
|
||||||
|
This file is part of systemd.
|
||||||
|
|
||||||
|
Copyright 2010 Lennart Poettering
|
||||||
|
|
||||||
|
systemd is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU Lesser General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2.1 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
systemd is distributed in the hope that it will be useful, but
|
||||||
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public License
|
||||||
|
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
***/
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
|
#include "util.h"
|
||||||
|
#include "hashmap.h"
|
||||||
|
#include "macro.h"
|
||||||
|
|
||||||
|
#define NBUCKETS 127
|
||||||
|
|
||||||
|
struct hashmap_entry {
|
||||||
|
const void *key;
|
||||||
|
void *value;
|
||||||
|
struct hashmap_entry *bucket_next, *bucket_previous;
|
||||||
|
struct hashmap_entry *iterate_next, *iterate_previous;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct Hashmap {
|
||||||
|
hash_func_t hash_func;
|
||||||
|
compare_func_t compare_func;
|
||||||
|
|
||||||
|
struct hashmap_entry *iterate_list_head, *iterate_list_tail;
|
||||||
|
unsigned n_entries;
|
||||||
|
|
||||||
|
bool from_pool;
|
||||||
|
};
|
||||||
|
|
||||||
|
#define BY_HASH(h) ((struct hashmap_entry**) ((uint8_t*) (h) + ALIGN(sizeof(Hashmap))))
|
||||||
|
|
||||||
|
struct pool {
|
||||||
|
struct pool *next;
|
||||||
|
unsigned n_tiles;
|
||||||
|
unsigned n_used;
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct pool *first_hashmap_pool = NULL;
|
||||||
|
static void *first_hashmap_tile = NULL;
|
||||||
|
|
||||||
|
static struct pool *first_entry_pool = NULL;
|
||||||
|
static void *first_entry_tile = NULL;
|
||||||
|
|
||||||
|
static void* allocate_tile(struct pool **first_pool, void **first_tile, size_t tile_size) {
|
||||||
|
unsigned i;
|
||||||
|
|
||||||
|
if (*first_tile) {
|
||||||
|
void *r;
|
||||||
|
|
||||||
|
r = *first_tile;
|
||||||
|
*first_tile = * (void**) (*first_tile);
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_unlikely_(!*first_pool) || _unlikely_((*first_pool)->n_used >= (*first_pool)->n_tiles)) {
|
||||||
|
unsigned n;
|
||||||
|
size_t size;
|
||||||
|
struct pool *p;
|
||||||
|
|
||||||
|
n = *first_pool ? (*first_pool)->n_tiles : 0;
|
||||||
|
n = MAX(512U, n * 2);
|
||||||
|
size = PAGE_ALIGN(ALIGN(sizeof(struct pool)) + n*tile_size);
|
||||||
|
n = (size - ALIGN(sizeof(struct pool))) / tile_size;
|
||||||
|
|
||||||
|
p = malloc(size);
|
||||||
|
if (!p)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
p->next = *first_pool;
|
||||||
|
p->n_tiles = n;
|
||||||
|
p->n_used = 0;
|
||||||
|
|
||||||
|
*first_pool = p;
|
||||||
|
}
|
||||||
|
|
||||||
|
i = (*first_pool)->n_used++;
|
||||||
|
|
||||||
|
return ((uint8_t*) (*first_pool)) + ALIGN(sizeof(struct pool)) + i*tile_size;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void deallocate_tile(void **first_tile, void *p) {
|
||||||
|
* (void**) p = *first_tile;
|
||||||
|
*first_tile = p;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifndef __OPTIMIZE__
|
||||||
|
|
||||||
|
static void drop_pool(struct pool *p) {
|
||||||
|
while (p) {
|
||||||
|
struct pool *n;
|
||||||
|
n = p->next;
|
||||||
|
free(p);
|
||||||
|
p = n;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__((destructor)) static void cleanup_pool(void) {
|
||||||
|
/* Be nice to valgrind */
|
||||||
|
|
||||||
|
drop_pool(first_hashmap_pool);
|
||||||
|
drop_pool(first_entry_pool);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
unsigned string_hash_func(const void *p) {
|
||||||
|
unsigned hash = 5381;
|
||||||
|
const signed char *c;
|
||||||
|
|
||||||
|
/* DJB's hash function */
|
||||||
|
|
||||||
|
for (c = p; *c; c++)
|
||||||
|
hash = (hash << 5) + hash + (unsigned) *c;
|
||||||
|
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
int string_compare_func(const void *a, const void *b) {
|
||||||
|
return strcmp(a, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned trivial_hash_func(const void *p) {
|
||||||
|
return PTR_TO_UINT(p);
|
||||||
|
}
|
||||||
|
|
||||||
|
int trivial_compare_func(const void *a, const void *b) {
|
||||||
|
return a < b ? -1 : (a > b ? 1 : 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
Hashmap *hashmap_new(hash_func_t hash_func, compare_func_t compare_func) {
|
||||||
|
bool b;
|
||||||
|
Hashmap *h;
|
||||||
|
size_t size;
|
||||||
|
|
||||||
|
b = is_main_thread();
|
||||||
|
|
||||||
|
size = ALIGN(sizeof(Hashmap)) + NBUCKETS * sizeof(struct hashmap_entry*);
|
||||||
|
|
||||||
|
if (b) {
|
||||||
|
h = allocate_tile(&first_hashmap_pool, &first_hashmap_tile, size);
|
||||||
|
if (!h)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
memset(h, 0, size);
|
||||||
|
} else {
|
||||||
|
h = malloc0(size);
|
||||||
|
|
||||||
|
if (!h)
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
h->hash_func = hash_func ? hash_func : trivial_hash_func;
|
||||||
|
h->compare_func = compare_func ? compare_func : trivial_compare_func;
|
||||||
|
|
||||||
|
h->n_entries = 0;
|
||||||
|
h->iterate_list_head = h->iterate_list_tail = NULL;
|
||||||
|
|
||||||
|
h->from_pool = b;
|
||||||
|
|
||||||
|
return h;
|
||||||
|
}
|
||||||
|
|
||||||
|
int hashmap_ensure_allocated(Hashmap **h, hash_func_t hash_func, compare_func_t compare_func) {
|
||||||
|
assert(h);
|
||||||
|
|
||||||
|
if (*h)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
if (!(*h = hashmap_new(hash_func, compare_func)))
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void link_entry(Hashmap *h, struct hashmap_entry *e, unsigned hash) {
|
||||||
|
assert(h);
|
||||||
|
assert(e);
|
||||||
|
|
||||||
|
/* Insert into hash table */
|
||||||
|
e->bucket_next = BY_HASH(h)[hash];
|
||||||
|
e->bucket_previous = NULL;
|
||||||
|
if (BY_HASH(h)[hash])
|
||||||
|
BY_HASH(h)[hash]->bucket_previous = e;
|
||||||
|
BY_HASH(h)[hash] = e;
|
||||||
|
|
||||||
|
/* Insert into iteration list */
|
||||||
|
e->iterate_previous = h->iterate_list_tail;
|
||||||
|
e->iterate_next = NULL;
|
||||||
|
if (h->iterate_list_tail) {
|
||||||
|
assert(h->iterate_list_head);
|
||||||
|
h->iterate_list_tail->iterate_next = e;
|
||||||
|
} else {
|
||||||
|
assert(!h->iterate_list_head);
|
||||||
|
h->iterate_list_head = e;
|
||||||
|
}
|
||||||
|
h->iterate_list_tail = e;
|
||||||
|
|
||||||
|
h->n_entries++;
|
||||||
|
assert(h->n_entries >= 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void unlink_entry(Hashmap *h, struct hashmap_entry *e, unsigned hash) {
|
||||||
|
assert(h);
|
||||||
|
assert(e);
|
||||||
|
|
||||||
|
/* Remove from iteration list */
|
||||||
|
if (e->iterate_next)
|
||||||
|
e->iterate_next->iterate_previous = e->iterate_previous;
|
||||||
|
else
|
||||||
|
h->iterate_list_tail = e->iterate_previous;
|
||||||
|
|
||||||
|
if (e->iterate_previous)
|
||||||
|
e->iterate_previous->iterate_next = e->iterate_next;
|
||||||
|
else
|
||||||
|
h->iterate_list_head = e->iterate_next;
|
||||||
|
|
||||||
|
/* Remove from hash table bucket list */
|
||||||
|
if (e->bucket_next)
|
||||||
|
e->bucket_next->bucket_previous = e->bucket_previous;
|
||||||
|
|
||||||
|
if (e->bucket_previous)
|
||||||
|
e->bucket_previous->bucket_next = e->bucket_next;
|
||||||
|
else
|
||||||
|
BY_HASH(h)[hash] = e->bucket_next;
|
||||||
|
|
||||||
|
assert(h->n_entries >= 1);
|
||||||
|
h->n_entries--;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void remove_entry(Hashmap *h, struct hashmap_entry *e) {
|
||||||
|
unsigned hash;
|
||||||
|
|
||||||
|
assert(h);
|
||||||
|
assert(e);
|
||||||
|
|
||||||
|
hash = h->hash_func(e->key) % NBUCKETS;
|
||||||
|
|
||||||
|
unlink_entry(h, e, hash);
|
||||||
|
|
||||||
|
if (h->from_pool)
|
||||||
|
deallocate_tile(&first_entry_tile, e);
|
||||||
|
else
|
||||||
|
free(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
void hashmap_free(Hashmap*h) {
|
||||||
|
|
||||||
|
if (!h)
|
||||||
|
return;
|
||||||
|
|
||||||
|
hashmap_clear(h);
|
||||||
|
|
||||||
|
if (h->from_pool)
|
||||||
|
deallocate_tile(&first_hashmap_tile, h);
|
||||||
|
else
|
||||||
|
free(h);
|
||||||
|
}
|
||||||
|
|
||||||
|
void hashmap_free_free(Hashmap *h) {
|
||||||
|
void *p;
|
||||||
|
|
||||||
|
while ((p = hashmap_steal_first(h)))
|
||||||
|
free(p);
|
||||||
|
|
||||||
|
hashmap_free(h);
|
||||||
|
}
|
||||||
|
|
||||||
|
void hashmap_clear(Hashmap *h) {
|
||||||
|
if (!h)
|
||||||
|
return;
|
||||||
|
|
||||||
|
while (h->iterate_list_head)
|
||||||
|
remove_entry(h, h->iterate_list_head);
|
||||||
|
}
|
||||||
|
|
||||||
|
static struct hashmap_entry *hash_scan(Hashmap *h, unsigned hash, const void *key) {
|
||||||
|
struct hashmap_entry *e;
|
||||||
|
assert(h);
|
||||||
|
assert(hash < NBUCKETS);
|
||||||
|
|
||||||
|
for (e = BY_HASH(h)[hash]; e; e = e->bucket_next)
|
||||||
|
if (h->compare_func(e->key, key) == 0)
|
||||||
|
return e;
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
int hashmap_put(Hashmap *h, const void *key, void *value) {
|
||||||
|
struct hashmap_entry *e;
|
||||||
|
unsigned hash;
|
||||||
|
|
||||||
|
assert(h);
|
||||||
|
|
||||||
|
hash = h->hash_func(key) % NBUCKETS;
|
||||||
|
|
||||||
|
if ((e = hash_scan(h, hash, key))) {
|
||||||
|
|
||||||
|
if (e->value == value)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return -EEXIST;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (h->from_pool)
|
||||||
|
e = allocate_tile(&first_entry_pool, &first_entry_tile, sizeof(struct hashmap_entry));
|
||||||
|
else
|
||||||
|
e = new(struct hashmap_entry, 1);
|
||||||
|
|
||||||
|
if (!e)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
|
e->key = key;
|
||||||
|
e->value = value;
|
||||||
|
|
||||||
|
link_entry(h, e, hash);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int hashmap_replace(Hashmap *h, const void *key, void *value) {
|
||||||
|
struct hashmap_entry *e;
|
||||||
|
unsigned hash;
|
||||||
|
|
||||||
|
assert(h);
|
||||||
|
|
||||||
|
hash = h->hash_func(key) % NBUCKETS;
|
||||||
|
|
||||||
|
if ((e = hash_scan(h, hash, key))) {
|
||||||
|
e->key = key;
|
||||||
|
e->value = value;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return hashmap_put(h, key, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
void* hashmap_get(Hashmap *h, const void *key) {
|
||||||
|
unsigned hash;
|
||||||
|
struct hashmap_entry *e;
|
||||||
|
|
||||||
|
if (!h)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
hash = h->hash_func(key) % NBUCKETS;
|
||||||
|
|
||||||
|
if (!(e = hash_scan(h, hash, key)))
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
return e->value;
|
||||||
|
}
|
||||||
|
|
||||||
|
void* hashmap_remove(Hashmap *h, const void *key) {
|
||||||
|
struct hashmap_entry *e;
|
||||||
|
unsigned hash;
|
||||||
|
void *data;
|
||||||
|
|
||||||
|
if (!h)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
hash = h->hash_func(key) % NBUCKETS;
|
||||||
|
|
||||||
|
if (!(e = hash_scan(h, hash, key)))
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
data = e->value;
|
||||||
|
remove_entry(h, e);
|
||||||
|
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
int hashmap_remove_and_put(Hashmap *h, const void *old_key, const void *new_key, void *value) {
|
||||||
|
struct hashmap_entry *e;
|
||||||
|
unsigned old_hash, new_hash;
|
||||||
|
|
||||||
|
if (!h)
|
||||||
|
return -ENOENT;
|
||||||
|
|
||||||
|
old_hash = h->hash_func(old_key) % NBUCKETS;
|
||||||
|
if (!(e = hash_scan(h, old_hash, old_key)))
|
||||||
|
return -ENOENT;
|
||||||
|
|
||||||
|
new_hash = h->hash_func(new_key) % NBUCKETS;
|
||||||
|
if (hash_scan(h, new_hash, new_key))
|
||||||
|
return -EEXIST;
|
||||||
|
|
||||||
|
unlink_entry(h, e, old_hash);
|
||||||
|
|
||||||
|
e->key = new_key;
|
||||||
|
e->value = value;
|
||||||
|
|
||||||
|
link_entry(h, e, new_hash);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int hashmap_remove_and_replace(Hashmap *h, const void *old_key, const void *new_key, void *value) {
|
||||||
|
struct hashmap_entry *e, *k;
|
||||||
|
unsigned old_hash, new_hash;
|
||||||
|
|
||||||
|
if (!h)
|
||||||
|
return -ENOENT;
|
||||||
|
|
||||||
|
old_hash = h->hash_func(old_key) % NBUCKETS;
|
||||||
|
if (!(e = hash_scan(h, old_hash, old_key)))
|
||||||
|
return -ENOENT;
|
||||||
|
|
||||||
|
new_hash = h->hash_func(new_key) % NBUCKETS;
|
||||||
|
|
||||||
|
if ((k = hash_scan(h, new_hash, new_key)))
|
||||||
|
if (e != k)
|
||||||
|
remove_entry(h, k);
|
||||||
|
|
||||||
|
unlink_entry(h, e, old_hash);
|
||||||
|
|
||||||
|
e->key = new_key;
|
||||||
|
e->value = value;
|
||||||
|
|
||||||
|
link_entry(h, e, new_hash);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void* hashmap_remove_value(Hashmap *h, const void *key, void *value) {
|
||||||
|
struct hashmap_entry *e;
|
||||||
|
unsigned hash;
|
||||||
|
|
||||||
|
if (!h)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
hash = h->hash_func(key) % NBUCKETS;
|
||||||
|
|
||||||
|
if (!(e = hash_scan(h, hash, key)))
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
if (e->value != value)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
remove_entry(h, e);
|
||||||
|
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
void *hashmap_iterate(Hashmap *h, Iterator *i, const void **key) {
|
||||||
|
struct hashmap_entry *e;
|
||||||
|
|
||||||
|
assert(i);
|
||||||
|
|
||||||
|
if (!h)
|
||||||
|
goto at_end;
|
||||||
|
|
||||||
|
if (*i == ITERATOR_LAST)
|
||||||
|
goto at_end;
|
||||||
|
|
||||||
|
if (*i == ITERATOR_FIRST && !h->iterate_list_head)
|
||||||
|
goto at_end;
|
||||||
|
|
||||||
|
e = *i == ITERATOR_FIRST ? h->iterate_list_head : (struct hashmap_entry*) *i;
|
||||||
|
|
||||||
|
if (e->iterate_next)
|
||||||
|
*i = (Iterator) e->iterate_next;
|
||||||
|
else
|
||||||
|
*i = ITERATOR_LAST;
|
||||||
|
|
||||||
|
if (key)
|
||||||
|
*key = e->key;
|
||||||
|
|
||||||
|
return e->value;
|
||||||
|
|
||||||
|
at_end:
|
||||||
|
*i = ITERATOR_LAST;
|
||||||
|
|
||||||
|
if (key)
|
||||||
|
*key = NULL;
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
void *hashmap_iterate_backwards(Hashmap *h, Iterator *i, const void **key) {
|
||||||
|
struct hashmap_entry *e;
|
||||||
|
|
||||||
|
assert(i);
|
||||||
|
|
||||||
|
if (!h)
|
||||||
|
goto at_beginning;
|
||||||
|
|
||||||
|
if (*i == ITERATOR_FIRST)
|
||||||
|
goto at_beginning;
|
||||||
|
|
||||||
|
if (*i == ITERATOR_LAST && !h->iterate_list_tail)
|
||||||
|
goto at_beginning;
|
||||||
|
|
||||||
|
e = *i == ITERATOR_LAST ? h->iterate_list_tail : (struct hashmap_entry*) *i;
|
||||||
|
|
||||||
|
if (e->iterate_previous)
|
||||||
|
*i = (Iterator) e->iterate_previous;
|
||||||
|
else
|
||||||
|
*i = ITERATOR_FIRST;
|
||||||
|
|
||||||
|
if (key)
|
||||||
|
*key = e->key;
|
||||||
|
|
||||||
|
return e->value;
|
||||||
|
|
||||||
|
at_beginning:
|
||||||
|
*i = ITERATOR_FIRST;
|
||||||
|
|
||||||
|
if (key)
|
||||||
|
*key = NULL;
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
void *hashmap_iterate_skip(Hashmap *h, const void *key, Iterator *i) {
|
||||||
|
unsigned hash;
|
||||||
|
struct hashmap_entry *e;
|
||||||
|
|
||||||
|
if (!h)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
hash = h->hash_func(key) % NBUCKETS;
|
||||||
|
|
||||||
|
if (!(e = hash_scan(h, hash, key)))
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
*i = (Iterator) e;
|
||||||
|
|
||||||
|
return e->value;
|
||||||
|
}
|
||||||
|
|
||||||
|
void* hashmap_first(Hashmap *h) {
|
||||||
|
|
||||||
|
if (!h)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
if (!h->iterate_list_head)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
return h->iterate_list_head->value;
|
||||||
|
}
|
||||||
|
|
||||||
|
void* hashmap_first_key(Hashmap *h) {
|
||||||
|
|
||||||
|
if (!h)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
if (!h->iterate_list_head)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
return (void*) h->iterate_list_head->key;
|
||||||
|
}
|
||||||
|
|
||||||
|
void* hashmap_last(Hashmap *h) {
|
||||||
|
|
||||||
|
if (!h)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
if (!h->iterate_list_tail)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
return h->iterate_list_tail->value;
|
||||||
|
}
|
||||||
|
|
||||||
|
void* hashmap_steal_first(Hashmap *h) {
|
||||||
|
void *data;
|
||||||
|
|
||||||
|
if (!h)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
if (!h->iterate_list_head)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
data = h->iterate_list_head->value;
|
||||||
|
remove_entry(h, h->iterate_list_head);
|
||||||
|
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
void* hashmap_steal_first_key(Hashmap *h) {
|
||||||
|
void *key;
|
||||||
|
|
||||||
|
if (!h)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
if (!h->iterate_list_head)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
key = (void*) h->iterate_list_head->key;
|
||||||
|
remove_entry(h, h->iterate_list_head);
|
||||||
|
|
||||||
|
return key;
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned hashmap_size(Hashmap *h) {
|
||||||
|
|
||||||
|
if (!h)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return h->n_entries;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool hashmap_isempty(Hashmap *h) {
|
||||||
|
|
||||||
|
if (!h)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return h->n_entries == 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int hashmap_merge(Hashmap *h, Hashmap *other) {
|
||||||
|
struct hashmap_entry *e;
|
||||||
|
|
||||||
|
assert(h);
|
||||||
|
|
||||||
|
if (!other)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
for (e = other->iterate_list_head; e; e = e->iterate_next) {
|
||||||
|
int r;
|
||||||
|
|
||||||
|
if ((r = hashmap_put(h, e->key, e->value)) < 0)
|
||||||
|
if (r != -EEXIST)
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void hashmap_move(Hashmap *h, Hashmap *other) {
|
||||||
|
struct hashmap_entry *e, *n;
|
||||||
|
|
||||||
|
assert(h);
|
||||||
|
|
||||||
|
/* The same as hashmap_merge(), but every new item from other
|
||||||
|
* is moved to h. This function is guaranteed to succeed. */
|
||||||
|
|
||||||
|
if (!other)
|
||||||
|
return;
|
||||||
|
|
||||||
|
for (e = other->iterate_list_head; e; e = n) {
|
||||||
|
unsigned h_hash, other_hash;
|
||||||
|
|
||||||
|
n = e->iterate_next;
|
||||||
|
|
||||||
|
h_hash = h->hash_func(e->key) % NBUCKETS;
|
||||||
|
|
||||||
|
if (hash_scan(h, h_hash, e->key))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
other_hash = other->hash_func(e->key) % NBUCKETS;
|
||||||
|
|
||||||
|
unlink_entry(other, e, other_hash);
|
||||||
|
link_entry(h, e, h_hash);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int hashmap_move_one(Hashmap *h, Hashmap *other, const void *key) {
|
||||||
|
unsigned h_hash, other_hash;
|
||||||
|
struct hashmap_entry *e;
|
||||||
|
|
||||||
|
if (!other)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
assert(h);
|
||||||
|
|
||||||
|
h_hash = h->hash_func(key) % NBUCKETS;
|
||||||
|
if (hash_scan(h, h_hash, key))
|
||||||
|
return -EEXIST;
|
||||||
|
|
||||||
|
other_hash = other->hash_func(key) % NBUCKETS;
|
||||||
|
if (!(e = hash_scan(other, other_hash, key)))
|
||||||
|
return -ENOENT;
|
||||||
|
|
||||||
|
unlink_entry(other, e, other_hash);
|
||||||
|
link_entry(h, e, h_hash);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
Hashmap *hashmap_copy(Hashmap *h) {
|
||||||
|
Hashmap *copy;
|
||||||
|
|
||||||
|
assert(h);
|
||||||
|
|
||||||
|
if (!(copy = hashmap_new(h->hash_func, h->compare_func)))
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
if (hashmap_merge(copy, h) < 0) {
|
||||||
|
hashmap_free(copy);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return copy;
|
||||||
|
}
|
||||||
|
|
||||||
|
char **hashmap_get_strv(Hashmap *h) {
|
||||||
|
char **sv;
|
||||||
|
Iterator it;
|
||||||
|
char *item;
|
||||||
|
int n;
|
||||||
|
|
||||||
|
sv = new(char*, h->n_entries+1);
|
||||||
|
if (!sv)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
n = 0;
|
||||||
|
HASHMAP_FOREACH(item, h, it)
|
||||||
|
sv[n++] = item;
|
||||||
|
sv[n] = NULL;
|
||||||
|
|
||||||
|
return sv;
|
||||||
|
}
|
||||||
89
install/hashmap.h
Normal file
89
install/hashmap.h
Normal file
@@ -0,0 +1,89 @@
|
|||||||
|
#ifndef foohashmaphfoo
|
||||||
|
#define foohashmaphfoo
|
||||||
|
|
||||||
|
/***
|
||||||
|
This file is part of systemd.
|
||||||
|
|
||||||
|
Copyright 2010 Lennart Poettering
|
||||||
|
|
||||||
|
systemd is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU Lesser General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2.1 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
systemd is distributed in the hope that it will be useful, but
|
||||||
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public License
|
||||||
|
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
***/
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
/* Pretty straightforward hash table implementation. As a minor
|
||||||
|
* optimization a NULL hashmap object will be treated as empty hashmap
|
||||||
|
* for all read operations. That way it is not necessary to
|
||||||
|
* instantiate an object for each Hashmap use. */
|
||||||
|
|
||||||
|
typedef struct Hashmap Hashmap;
|
||||||
|
typedef struct _IteratorStruct _IteratorStruct;
|
||||||
|
typedef _IteratorStruct* Iterator;
|
||||||
|
|
||||||
|
#define ITERATOR_FIRST ((Iterator) 0)
|
||||||
|
#define ITERATOR_LAST ((Iterator) -1)
|
||||||
|
|
||||||
|
typedef unsigned (*hash_func_t)(const void *p);
|
||||||
|
typedef int (*compare_func_t)(const void *a, const void *b);
|
||||||
|
|
||||||
|
unsigned string_hash_func(const void *p);
|
||||||
|
int string_compare_func(const void *a, const void *b);
|
||||||
|
|
||||||
|
unsigned trivial_hash_func(const void *p);
|
||||||
|
int trivial_compare_func(const void *a, const void *b);
|
||||||
|
|
||||||
|
Hashmap *hashmap_new(hash_func_t hash_func, compare_func_t compare_func);
|
||||||
|
void hashmap_free(Hashmap *h);
|
||||||
|
void hashmap_free_free(Hashmap *h);
|
||||||
|
Hashmap *hashmap_copy(Hashmap *h);
|
||||||
|
int hashmap_ensure_allocated(Hashmap **h, hash_func_t hash_func, compare_func_t compare_func);
|
||||||
|
|
||||||
|
int hashmap_put(Hashmap *h, const void *key, void *value);
|
||||||
|
int hashmap_replace(Hashmap *h, const void *key, void *value);
|
||||||
|
void* hashmap_get(Hashmap *h, const void *key);
|
||||||
|
void* hashmap_remove(Hashmap *h, const void *key);
|
||||||
|
void* hashmap_remove_value(Hashmap *h, const void *key, void *value);
|
||||||
|
int hashmap_remove_and_put(Hashmap *h, const void *old_key, const void *new_key, void *value);
|
||||||
|
int hashmap_remove_and_replace(Hashmap *h, const void *old_key, const void *new_key, void *value);
|
||||||
|
|
||||||
|
int hashmap_merge(Hashmap *h, Hashmap *other);
|
||||||
|
void hashmap_move(Hashmap *h, Hashmap *other);
|
||||||
|
int hashmap_move_one(Hashmap *h, Hashmap *other, const void *key);
|
||||||
|
|
||||||
|
unsigned hashmap_size(Hashmap *h);
|
||||||
|
bool hashmap_isempty(Hashmap *h);
|
||||||
|
|
||||||
|
void *hashmap_iterate(Hashmap *h, Iterator *i, const void **key);
|
||||||
|
void *hashmap_iterate_backwards(Hashmap *h, Iterator *i, const void **key);
|
||||||
|
void *hashmap_iterate_skip(Hashmap *h, const void *key, Iterator *i);
|
||||||
|
|
||||||
|
void hashmap_clear(Hashmap *h);
|
||||||
|
void *hashmap_steal_first(Hashmap *h);
|
||||||
|
void *hashmap_steal_first_key(Hashmap *h);
|
||||||
|
void* hashmap_first(Hashmap *h);
|
||||||
|
void* hashmap_first_key(Hashmap *h);
|
||||||
|
void* hashmap_last(Hashmap *h);
|
||||||
|
|
||||||
|
char **hashmap_get_strv(Hashmap *h);
|
||||||
|
|
||||||
|
#define HASHMAP_FOREACH(e, h, i) \
|
||||||
|
for ((i) = ITERATOR_FIRST, (e) = hashmap_iterate((h), &(i), NULL); (e); (e) = hashmap_iterate((h), &(i), NULL))
|
||||||
|
|
||||||
|
#define HASHMAP_FOREACH_KEY(e, k, h, i) \
|
||||||
|
for ((i) = ITERATOR_FIRST, (e) = hashmap_iterate((h), &(i), (const void**) &(k)); (e); (e) = hashmap_iterate((h), &(i), (const void**) &(k)))
|
||||||
|
|
||||||
|
#define HASHMAP_FOREACH_BACKWARDS(e, h, i) \
|
||||||
|
for ((i) = ITERATOR_LAST, (e) = hashmap_iterate_backwards((h), &(i), NULL); (e); (e) = hashmap_iterate_backwards((h), &(i), NULL))
|
||||||
|
|
||||||
|
#endif
|
||||||
12
install/hashmap.lo
Normal file
12
install/hashmap.lo
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# src/shared/hashmap.lo - a libtool object file
|
||||||
|
# Generated by libtool (GNU libtool) 2.4.2
|
||||||
|
#
|
||||||
|
# Please DO NOT delete this file!
|
||||||
|
# It is necessary for linking the library.
|
||||||
|
|
||||||
|
# Name of the PIC object.
|
||||||
|
pic_object='.libs/hashmap.o'
|
||||||
|
|
||||||
|
# Name of the non-PIC object
|
||||||
|
non_pic_object='hashmap.o'
|
||||||
|
|
||||||
293
install/log.c
Normal file
293
install/log.c
Normal file
@@ -0,0 +1,293 @@
|
|||||||
|
/***
|
||||||
|
This file is part of systemd.
|
||||||
|
|
||||||
|
Copyright 2010 Lennart Poettering
|
||||||
|
|
||||||
|
systemd is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU Lesser General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2.1 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
systemd is distributed in the hope that it will be useful, but
|
||||||
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public License
|
||||||
|
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
***/
|
||||||
|
|
||||||
|
#include <stdarg.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#include <sys/un.h>
|
||||||
|
#include <stddef.h>
|
||||||
|
|
||||||
|
#include "log.h"
|
||||||
|
#include "util.h"
|
||||||
|
#include "macro.h"
|
||||||
|
|
||||||
|
#define SNDBUF_SIZE (8*1024*1024)
|
||||||
|
|
||||||
|
static LogTarget log_target = LOG_TARGET_CONSOLE;
|
||||||
|
static int log_max_level = LOG_WARNING;
|
||||||
|
static int log_facility = LOG_DAEMON;
|
||||||
|
|
||||||
|
static int console_fd = STDERR_FILENO;
|
||||||
|
|
||||||
|
static bool show_location = false;
|
||||||
|
|
||||||
|
/* Akin to glibc's __abort_msg; which is private and we hence cannot
|
||||||
|
* use here. */
|
||||||
|
static char *log_abort_msg = NULL;
|
||||||
|
|
||||||
|
void log_close_console(void) {
|
||||||
|
|
||||||
|
if (console_fd < 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (getpid() == 1) {
|
||||||
|
if (console_fd >= 3)
|
||||||
|
close_nointr_nofail(console_fd);
|
||||||
|
|
||||||
|
console_fd = -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static int log_open_console(void) {
|
||||||
|
|
||||||
|
if (console_fd >= 0)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
if (getpid() == 1) {
|
||||||
|
|
||||||
|
console_fd = open_terminal("/dev/console", O_WRONLY|O_NOCTTY|O_CLOEXEC);
|
||||||
|
if (console_fd < 0) {
|
||||||
|
log_error("Failed to open /dev/console for logging: %s", strerror(-console_fd));
|
||||||
|
return console_fd;
|
||||||
|
}
|
||||||
|
|
||||||
|
log_debug("Successfully opened /dev/console for logging.");
|
||||||
|
} else
|
||||||
|
console_fd = STDERR_FILENO;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int log_open(void) {
|
||||||
|
return log_open_console();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void log_close(void) {
|
||||||
|
log_close_console();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void log_set_max_level(int level) {
|
||||||
|
assert((level & LOG_PRIMASK) == level);
|
||||||
|
|
||||||
|
log_max_level = level;
|
||||||
|
}
|
||||||
|
|
||||||
|
void log_set_facility(int facility) {
|
||||||
|
log_facility = facility;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int write_to_console(
|
||||||
|
int level,
|
||||||
|
const char*file,
|
||||||
|
unsigned int line,
|
||||||
|
const char *func,
|
||||||
|
const char *buffer) {
|
||||||
|
|
||||||
|
struct iovec iovec[5];
|
||||||
|
unsigned n = 0;
|
||||||
|
|
||||||
|
if (console_fd < 0)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
zero(iovec);
|
||||||
|
|
||||||
|
IOVEC_SET_STRING(iovec[n++], "dracut-install: ");
|
||||||
|
|
||||||
|
if (show_location) {
|
||||||
|
char location[64];
|
||||||
|
if (snprintf(location, sizeof(location), "(%s:%u) ", file, line) <= 0)
|
||||||
|
return -errno;
|
||||||
|
IOVEC_SET_STRING(iovec[n++], location);
|
||||||
|
}
|
||||||
|
|
||||||
|
IOVEC_SET_STRING(iovec[n++], buffer);
|
||||||
|
IOVEC_SET_STRING(iovec[n++], "\n");
|
||||||
|
|
||||||
|
if (writev(console_fd, iovec, n) < 0)
|
||||||
|
return -errno;
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int log_dispatch(
|
||||||
|
int level,
|
||||||
|
const char*file,
|
||||||
|
int line,
|
||||||
|
const char *func,
|
||||||
|
char *buffer) {
|
||||||
|
|
||||||
|
int r = 0;
|
||||||
|
|
||||||
|
if (log_target == LOG_TARGET_NULL)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
/* Patch in LOG_DAEMON facility if necessary */
|
||||||
|
if ((level & LOG_FACMASK) == 0)
|
||||||
|
level = log_facility | LOG_PRI(level);
|
||||||
|
|
||||||
|
do {
|
||||||
|
char *e;
|
||||||
|
int k = 0;
|
||||||
|
|
||||||
|
buffer += strspn(buffer, NEWLINE);
|
||||||
|
|
||||||
|
if (buffer[0] == 0)
|
||||||
|
break;
|
||||||
|
|
||||||
|
if ((e = strpbrk(buffer, NEWLINE)))
|
||||||
|
*(e++) = 0;
|
||||||
|
|
||||||
|
k = write_to_console(level, file, line, func, buffer);
|
||||||
|
if (k < 0)
|
||||||
|
return k;
|
||||||
|
buffer = e;
|
||||||
|
} while (buffer);
|
||||||
|
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
int log_metav(
|
||||||
|
int level,
|
||||||
|
const char*file,
|
||||||
|
int line,
|
||||||
|
const char *func,
|
||||||
|
const char *format,
|
||||||
|
va_list ap) {
|
||||||
|
|
||||||
|
char buffer[LINE_MAX];
|
||||||
|
int saved_errno, r;
|
||||||
|
|
||||||
|
if (_likely_(LOG_PRI(level) > log_max_level))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
saved_errno = errno;
|
||||||
|
vsnprintf(buffer, sizeof(buffer), format, ap);
|
||||||
|
char_array_0(buffer);
|
||||||
|
|
||||||
|
r = log_dispatch(level, file, line, func, buffer);
|
||||||
|
errno = saved_errno;
|
||||||
|
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
int log_meta(
|
||||||
|
int level,
|
||||||
|
const char*file,
|
||||||
|
int line,
|
||||||
|
const char *func,
|
||||||
|
const char *format, ...) {
|
||||||
|
|
||||||
|
int r;
|
||||||
|
va_list ap;
|
||||||
|
|
||||||
|
va_start(ap, format);
|
||||||
|
r = log_metav(level, file, line, func, format, ap);
|
||||||
|
va_end(ap);
|
||||||
|
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
|
||||||
|
_noreturn_ static void log_assert(const char *text, const char *file, int line, const char *func, const char *format) {
|
||||||
|
static char buffer[LINE_MAX];
|
||||||
|
|
||||||
|
snprintf(buffer, sizeof(buffer), format, text, file, line, func);
|
||||||
|
|
||||||
|
char_array_0(buffer);
|
||||||
|
log_abort_msg = buffer;
|
||||||
|
|
||||||
|
log_dispatch(LOG_CRIT, file, line, func, buffer);
|
||||||
|
abort();
|
||||||
|
}
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
|
||||||
|
_noreturn_ void log_assert_failed(const char *text, const char *file, int line, const char *func) {
|
||||||
|
log_assert(text, file, line, func, "Assertion '%s' failed at %s:%u, function %s(). Aborting.");
|
||||||
|
}
|
||||||
|
|
||||||
|
_noreturn_ void log_assert_failed_unreachable(const char *text, const char *file, int line, const char *func) {
|
||||||
|
log_assert(text, file, line, func, "Code should not be reached '%s' at %s:%u, function %s(). Aborting.");
|
||||||
|
}
|
||||||
|
|
||||||
|
void log_set_target(LogTarget target) {
|
||||||
|
assert(target >= 0);
|
||||||
|
assert(target < _LOG_TARGET_MAX);
|
||||||
|
|
||||||
|
log_target = target;
|
||||||
|
}
|
||||||
|
|
||||||
|
int log_set_target_from_string(const char *e) {
|
||||||
|
LogTarget t;
|
||||||
|
|
||||||
|
t = log_target_from_string(e);
|
||||||
|
if (t < 0)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
|
log_set_target(t);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int log_set_max_level_from_string(const char *e) {
|
||||||
|
int t;
|
||||||
|
|
||||||
|
t = log_level_from_string(e);
|
||||||
|
if (t < 0)
|
||||||
|
return t;
|
||||||
|
|
||||||
|
log_set_max_level(t);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void log_parse_environment(void) {
|
||||||
|
const char *e;
|
||||||
|
|
||||||
|
if ((e = getenv("DRACUT_LOG_TARGET")))
|
||||||
|
if (log_set_target_from_string(e) < 0)
|
||||||
|
log_warning("Failed to parse log target %s. Ignoring.", e);
|
||||||
|
|
||||||
|
if ((e = getenv("DRACUT_LOG_LEVEL")))
|
||||||
|
if (log_set_max_level_from_string(e) < 0)
|
||||||
|
log_warning("Failed to parse log level %s. Ignoring.", e);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
LogTarget log_get_target(void) {
|
||||||
|
return log_target;
|
||||||
|
}
|
||||||
|
|
||||||
|
int log_get_max_level(void) {
|
||||||
|
return log_max_level;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static const char *const log_target_table[] = {
|
||||||
|
[LOG_TARGET_CONSOLE] = "console",
|
||||||
|
[LOG_TARGET_AUTO] = "auto",
|
||||||
|
[LOG_TARGET_SAFE] = "safe",
|
||||||
|
[LOG_TARGET_NULL] = "null"
|
||||||
|
};
|
||||||
|
|
||||||
|
DEFINE_STRING_TABLE_LOOKUP(log_target, LogTarget);
|
||||||
113
install/log.h
Normal file
113
install/log.h
Normal file
@@ -0,0 +1,113 @@
|
|||||||
|
#ifndef foologhfoo
|
||||||
|
#define foologhfoo
|
||||||
|
|
||||||
|
/***
|
||||||
|
This file is part of systemd.
|
||||||
|
|
||||||
|
Copyright 2010 Lennart Poettering
|
||||||
|
|
||||||
|
systemd is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU Lesser General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2.1 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
systemd is distributed in the hope that it will be useful, but
|
||||||
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public License
|
||||||
|
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
***/
|
||||||
|
|
||||||
|
#include <syslog.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
#include "macro.h"
|
||||||
|
|
||||||
|
typedef enum LogTarget{
|
||||||
|
LOG_TARGET_CONSOLE,
|
||||||
|
LOG_TARGET_KMSG,
|
||||||
|
LOG_TARGET_JOURNAL,
|
||||||
|
LOG_TARGET_JOURNAL_OR_KMSG,
|
||||||
|
LOG_TARGET_SYSLOG,
|
||||||
|
LOG_TARGET_SYSLOG_OR_KMSG,
|
||||||
|
LOG_TARGET_AUTO, /* console if stderr is tty, JOURNAL_OR_KMSG otherwise */
|
||||||
|
LOG_TARGET_SAFE, /* console if stderr is tty, KMSG otherwise */
|
||||||
|
LOG_TARGET_NULL,
|
||||||
|
_LOG_TARGET_MAX,
|
||||||
|
_LOG_TARGET_INVALID = -1
|
||||||
|
} LogTarget;
|
||||||
|
|
||||||
|
void log_set_target(LogTarget target);
|
||||||
|
void log_set_max_level(int level);
|
||||||
|
void log_set_facility(int facility);
|
||||||
|
|
||||||
|
int log_set_target_from_string(const char *e);
|
||||||
|
int log_set_max_level_from_string(const char *e);
|
||||||
|
|
||||||
|
void log_show_color(bool b);
|
||||||
|
void log_show_location(bool b);
|
||||||
|
|
||||||
|
int log_show_color_from_string(const char *e);
|
||||||
|
int log_show_location_from_string(const char *e);
|
||||||
|
|
||||||
|
LogTarget log_get_target(void);
|
||||||
|
int log_get_max_level(void);
|
||||||
|
|
||||||
|
int log_open(void);
|
||||||
|
void log_close(void);
|
||||||
|
void log_forget_fds(void);
|
||||||
|
|
||||||
|
void log_close_syslog(void);
|
||||||
|
void log_close_journal(void);
|
||||||
|
void log_close_kmsg(void);
|
||||||
|
void log_close_console(void);
|
||||||
|
|
||||||
|
void log_parse_environment(void);
|
||||||
|
|
||||||
|
int log_meta(
|
||||||
|
int level,
|
||||||
|
const char*file,
|
||||||
|
int line,
|
||||||
|
const char *func,
|
||||||
|
const char *format, ...) _printf_attr_(5,6);
|
||||||
|
|
||||||
|
int log_metav(
|
||||||
|
int level,
|
||||||
|
const char*file,
|
||||||
|
int line,
|
||||||
|
const char *func,
|
||||||
|
const char *format,
|
||||||
|
va_list ap);
|
||||||
|
|
||||||
|
_noreturn_ void log_assert_failed(const char *text, const char *file, int line, const char *func);
|
||||||
|
_noreturn_ void log_assert_failed_unreachable(const char *text, const char *file, int line, const char *func);
|
||||||
|
|
||||||
|
/* This modifies the buffer passed! */
|
||||||
|
int log_dump_internal(
|
||||||
|
int level,
|
||||||
|
const char*file,
|
||||||
|
int line,
|
||||||
|
const char *func,
|
||||||
|
char *buffer);
|
||||||
|
|
||||||
|
#define log_full(level, ...) log_meta(level, __FILE__, __LINE__, __func__, __VA_ARGS__)
|
||||||
|
|
||||||
|
#define log_debug(...) log_meta(LOG_DEBUG, __FILE__, __LINE__, __func__, __VA_ARGS__)
|
||||||
|
#define log_info(...) log_meta(LOG_INFO, __FILE__, __LINE__, __func__, __VA_ARGS__)
|
||||||
|
#define log_notice(...) log_meta(LOG_NOTICE, __FILE__, __LINE__, __func__, __VA_ARGS__)
|
||||||
|
#define log_warning(...) log_meta(LOG_WARNING, __FILE__, __LINE__, __func__, __VA_ARGS__)
|
||||||
|
#define log_error(...) log_meta(LOG_ERR, __FILE__, __LINE__, __func__, __VA_ARGS__)
|
||||||
|
|
||||||
|
/* This modifies the buffer passed! */
|
||||||
|
#define log_dump(level, buffer) log_dump_internal(level, __FILE__, __LINE__, __func__, buffer)
|
||||||
|
|
||||||
|
const char *log_target_to_string(LogTarget target);
|
||||||
|
LogTarget log_target_from_string(const char *s);
|
||||||
|
|
||||||
|
const char *log_level_to_string(int i);
|
||||||
|
int log_level_from_string(const char *s);
|
||||||
|
|
||||||
|
#endif
|
||||||
282
install/macro.h
Normal file
282
install/macro.h
Normal file
@@ -0,0 +1,282 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
/***
|
||||||
|
This file is part of systemd.
|
||||||
|
|
||||||
|
Copyright 2010 Lennart Poettering
|
||||||
|
|
||||||
|
systemd is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU Lesser General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2.1 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
systemd is distributed in the hope that it will be useful, but
|
||||||
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public License
|
||||||
|
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
***/
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
|
#include <sys/param.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/uio.h>
|
||||||
|
#include <inttypes.h>
|
||||||
|
|
||||||
|
#define _printf_attr_(a,b) __attribute__ ((format (printf, a, b)))
|
||||||
|
#define _sentinel_ __attribute__ ((sentinel))
|
||||||
|
#define _noreturn_ __attribute__((noreturn))
|
||||||
|
#define _unused_ __attribute__ ((unused))
|
||||||
|
#define _destructor_ __attribute__ ((destructor))
|
||||||
|
#define _pure_ __attribute__ ((pure))
|
||||||
|
#define _const_ __attribute__ ((const))
|
||||||
|
#define _deprecated_ __attribute__ ((deprecated))
|
||||||
|
#define _packed_ __attribute__ ((packed))
|
||||||
|
#define _malloc_ __attribute__ ((malloc))
|
||||||
|
#define _weak_ __attribute__ ((weak))
|
||||||
|
#define _likely_(x) (__builtin_expect(!!(x),1))
|
||||||
|
#define _unlikely_(x) (__builtin_expect(!!(x),0))
|
||||||
|
#define _public_ __attribute__ ((visibility("default")))
|
||||||
|
#define _hidden_ __attribute__ ((visibility("hidden")))
|
||||||
|
#define _weakref_(x) __attribute__((weakref(#x)))
|
||||||
|
#define _introspect_(x) __attribute__((section("introspect." x)))
|
||||||
|
#define _alignas_(x) __attribute__((aligned(__alignof(x))))
|
||||||
|
#define _cleanup_(x) __attribute__((cleanup(x)))
|
||||||
|
|
||||||
|
/* automake test harness */
|
||||||
|
#define EXIT_TEST_SKIP 77
|
||||||
|
|
||||||
|
#define XSTRINGIFY(x) #x
|
||||||
|
#define STRINGIFY(x) XSTRINGIFY(x)
|
||||||
|
|
||||||
|
/* Rounds up */
|
||||||
|
|
||||||
|
#define ALIGN4(l) (((l) + 3) & ~3)
|
||||||
|
#define ALIGN8(l) (((l) + 7) & ~7)
|
||||||
|
|
||||||
|
#if __SIZEOF_POINTER__ == 8
|
||||||
|
#define ALIGN(l) ALIGN8(l)
|
||||||
|
#elif __SIZEOF_POINTER__ == 4
|
||||||
|
#define ALIGN(l) ALIGN4(l)
|
||||||
|
#else
|
||||||
|
#error "Wut? Pointers are neither 4 nor 8 bytes long?"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define ALIGN_PTR(p) ((void*) ALIGN((unsigned long) p))
|
||||||
|
#define ALIGN4_PTR(p) ((void*) ALIGN4((unsigned long) p))
|
||||||
|
#define ALIGN8_PTR(p) ((void*) ALIGN8((unsigned long) p))
|
||||||
|
|
||||||
|
static inline size_t ALIGN_TO(size_t l, size_t ali) {
|
||||||
|
return ((l + ali - 1) & ~(ali - 1));
|
||||||
|
}
|
||||||
|
|
||||||
|
#define ALIGN_TO_PTR(p, ali) ((void*) ALIGN_TO((unsigned long) p))
|
||||||
|
|
||||||
|
#define ELEMENTSOF(x) (sizeof(x)/sizeof((x)[0]))
|
||||||
|
|
||||||
|
/*
|
||||||
|
* container_of - cast a member of a structure out to the containing structure
|
||||||
|
* @ptr: the pointer to the member.
|
||||||
|
* @type: the type of the container struct this is embedded in.
|
||||||
|
* @member: the name of the member within the struct.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#define container_of(ptr, type, member) \
|
||||||
|
__extension__ ({ \
|
||||||
|
const typeof( ((type *)0)->member ) *__mptr = (ptr); \
|
||||||
|
(type *)( (char *)__mptr - offsetof(type,member) ); \
|
||||||
|
})
|
||||||
|
|
||||||
|
#undef MAX
|
||||||
|
#define MAX(a,b) \
|
||||||
|
__extension__ ({ \
|
||||||
|
typeof(a) _a = (a); \
|
||||||
|
typeof(b) _b = (b); \
|
||||||
|
_a > _b ? _a : _b; \
|
||||||
|
})
|
||||||
|
|
||||||
|
#define MAX3(x,y,z) \
|
||||||
|
__extension__ ({ \
|
||||||
|
typeof(x) _c = MAX(x,y); \
|
||||||
|
MAX(_c, z); \
|
||||||
|
})
|
||||||
|
|
||||||
|
#undef MIN
|
||||||
|
#define MIN(a,b) \
|
||||||
|
__extension__ ({ \
|
||||||
|
typeof(a) _a = (a); \
|
||||||
|
typeof(b) _b = (b); \
|
||||||
|
_a < _b ? _a : _b; \
|
||||||
|
})
|
||||||
|
|
||||||
|
#ifndef CLAMP
|
||||||
|
#define CLAMP(x, low, high) \
|
||||||
|
__extension__ ({ \
|
||||||
|
typeof(x) _x = (x); \
|
||||||
|
typeof(low) _low = (low); \
|
||||||
|
typeof(high) _high = (high); \
|
||||||
|
((_x > _high) ? _high : ((_x < _low) ? _low : _x)); \
|
||||||
|
})
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define assert_se(expr) \
|
||||||
|
do { \
|
||||||
|
if (_unlikely_(!(expr))) \
|
||||||
|
log_assert_failed(#expr, __FILE__, __LINE__, __PRETTY_FUNCTION__); \
|
||||||
|
} while (false) \
|
||||||
|
|
||||||
|
/* We override the glibc assert() here. */
|
||||||
|
#undef assert
|
||||||
|
#ifdef NDEBUG
|
||||||
|
#define assert(expr) do {} while(false)
|
||||||
|
#else
|
||||||
|
#define assert(expr) assert_se(expr)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define assert_not_reached(t) \
|
||||||
|
do { \
|
||||||
|
log_assert_failed_unreachable(t, __FILE__, __LINE__, __PRETTY_FUNCTION__); \
|
||||||
|
} while (false)
|
||||||
|
|
||||||
|
#if defined(static_assert)
|
||||||
|
#define assert_cc(expr) \
|
||||||
|
do { \
|
||||||
|
static_assert(expr, #expr); \
|
||||||
|
} while (false)
|
||||||
|
#else
|
||||||
|
#define assert_cc(expr) \
|
||||||
|
do { \
|
||||||
|
switch (0) { \
|
||||||
|
case 0: \
|
||||||
|
case !!(expr): \
|
||||||
|
; \
|
||||||
|
} \
|
||||||
|
} while (false)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define PTR_TO_UINT(p) ((unsigned int) ((uintptr_t) (p)))
|
||||||
|
#define UINT_TO_PTR(u) ((void*) ((uintptr_t) (u)))
|
||||||
|
|
||||||
|
#define PTR_TO_UINT32(p) ((uint32_t) ((uintptr_t) (p)))
|
||||||
|
#define UINT32_TO_PTR(u) ((void*) ((uintptr_t) (u)))
|
||||||
|
|
||||||
|
#define PTR_TO_ULONG(p) ((unsigned long) ((uintptr_t) (p)))
|
||||||
|
#define ULONG_TO_PTR(u) ((void*) ((uintptr_t) (u)))
|
||||||
|
|
||||||
|
#define PTR_TO_INT(p) ((int) ((intptr_t) (p)))
|
||||||
|
#define INT_TO_PTR(u) ((void*) ((intptr_t) (u)))
|
||||||
|
|
||||||
|
#define TO_INT32(p) ((int32_t) ((intptr_t) (p)))
|
||||||
|
#define INT32_TO_PTR(u) ((void*) ((intptr_t) (u)))
|
||||||
|
|
||||||
|
#define PTR_TO_LONG(p) ((long) ((intptr_t) (p)))
|
||||||
|
#define LONG_TO_PTR(u) ((void*) ((intptr_t) (u)))
|
||||||
|
|
||||||
|
#define memzero(x,l) (memset((x), 0, (l)))
|
||||||
|
#define zero(x) (memzero(&(x), sizeof(x)))
|
||||||
|
|
||||||
|
#define CHAR_TO_STR(x) ((char[2]) { x, 0 })
|
||||||
|
|
||||||
|
#define char_array_0(x) x[sizeof(x)-1] = 0;
|
||||||
|
|
||||||
|
#define IOVEC_SET_STRING(i, s) \
|
||||||
|
do { \
|
||||||
|
struct iovec *_i = &(i); \
|
||||||
|
char *_s = (char *)(s); \
|
||||||
|
_i->iov_base = _s; \
|
||||||
|
_i->iov_len = strlen(_s); \
|
||||||
|
} while(false)
|
||||||
|
|
||||||
|
static inline size_t IOVEC_TOTAL_SIZE(const struct iovec *i, unsigned n) {
|
||||||
|
unsigned j;
|
||||||
|
size_t r = 0;
|
||||||
|
|
||||||
|
for (j = 0; j < n; j++)
|
||||||
|
r += i[j].iov_len;
|
||||||
|
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline size_t IOVEC_INCREMENT(struct iovec *i, unsigned n, size_t k) {
|
||||||
|
unsigned j;
|
||||||
|
|
||||||
|
for (j = 0; j < n; j++) {
|
||||||
|
size_t sub;
|
||||||
|
|
||||||
|
if (_unlikely_(k == 0))
|
||||||
|
break;
|
||||||
|
|
||||||
|
sub = MIN(i[j].iov_len, k);
|
||||||
|
i[j].iov_len -= sub;
|
||||||
|
i[j].iov_base = (uint8_t*) i[j].iov_base + sub;
|
||||||
|
k -= sub;
|
||||||
|
}
|
||||||
|
|
||||||
|
return k;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define VA_FORMAT_ADVANCE(format, ap) \
|
||||||
|
do { \
|
||||||
|
int _argtypes[128]; \
|
||||||
|
size_t _i, _k; \
|
||||||
|
_k = parse_printf_format((format), ELEMENTSOF(_argtypes), _argtypes); \
|
||||||
|
assert(_k < ELEMENTSOF(_argtypes)); \
|
||||||
|
for (_i = 0; _i < _k; _i++) { \
|
||||||
|
if (_argtypes[_i] & PA_FLAG_PTR) { \
|
||||||
|
(void) va_arg(ap, void*); \
|
||||||
|
continue; \
|
||||||
|
} \
|
||||||
|
\
|
||||||
|
switch (_argtypes[_i]) { \
|
||||||
|
case PA_INT: \
|
||||||
|
case PA_INT|PA_FLAG_SHORT: \
|
||||||
|
case PA_CHAR: \
|
||||||
|
(void) va_arg(ap, int); \
|
||||||
|
break; \
|
||||||
|
case PA_INT|PA_FLAG_LONG: \
|
||||||
|
(void) va_arg(ap, long int); \
|
||||||
|
break; \
|
||||||
|
case PA_INT|PA_FLAG_LONG_LONG: \
|
||||||
|
(void) va_arg(ap, long long int); \
|
||||||
|
break; \
|
||||||
|
case PA_WCHAR: \
|
||||||
|
(void) va_arg(ap, wchar_t); \
|
||||||
|
break; \
|
||||||
|
case PA_WSTRING: \
|
||||||
|
case PA_STRING: \
|
||||||
|
case PA_POINTER: \
|
||||||
|
(void) va_arg(ap, void*); \
|
||||||
|
break; \
|
||||||
|
case PA_FLOAT: \
|
||||||
|
case PA_DOUBLE: \
|
||||||
|
(void) va_arg(ap, double); \
|
||||||
|
break; \
|
||||||
|
case PA_DOUBLE|PA_FLAG_LONG_DOUBLE: \
|
||||||
|
(void) va_arg(ap, long double); \
|
||||||
|
break; \
|
||||||
|
default: \
|
||||||
|
assert_not_reached("Unknown format string argument."); \
|
||||||
|
} \
|
||||||
|
} \
|
||||||
|
} while(false)
|
||||||
|
|
||||||
|
/* Because statfs.t_type can be int on some architecures, we have to cast
|
||||||
|
* the const magic to the type, otherwise the compiler warns about
|
||||||
|
* signed/unsigned comparison, because the magic can be 32 bit unsigned.
|
||||||
|
*/
|
||||||
|
#define F_TYPE_CMP(a, b) (a == (typeof(a)) b)
|
||||||
|
|
||||||
|
|
||||||
|
/* Returns the number of chars needed to format variables of the
|
||||||
|
* specified type as a decimal string. Adds in extra space for a
|
||||||
|
* negative '-' prefix. */
|
||||||
|
|
||||||
|
#define DECIMAL_STR_MAX(type) \
|
||||||
|
(1+(sizeof(type) <= 1 ? 3 : \
|
||||||
|
sizeof(type) <= 2 ? 5 : \
|
||||||
|
sizeof(type) <= 4 ? 10 : \
|
||||||
|
sizeof(type) <= 8 ? 20 : sizeof(int[-2*(sizeof(type) > 8)])))
|
||||||
|
|
||||||
|
#include "log.h"
|
||||||
585
install/strv.c
Normal file
585
install/strv.c
Normal file
@@ -0,0 +1,585 @@
|
|||||||
|
/***
|
||||||
|
This file is part of systemd.
|
||||||
|
|
||||||
|
Copyright 2010 Lennart Poettering
|
||||||
|
|
||||||
|
systemd is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU Lesser General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2.1 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
systemd is distributed in the hope that it will be useful, but
|
||||||
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public License
|
||||||
|
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
***/
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
|
#include "util.h"
|
||||||
|
#include "strv.h"
|
||||||
|
|
||||||
|
char *strv_find(char **l, const char *name) {
|
||||||
|
char **i;
|
||||||
|
|
||||||
|
assert(name);
|
||||||
|
|
||||||
|
STRV_FOREACH(i, l)
|
||||||
|
if (streq(*i, name))
|
||||||
|
return *i;
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
char *strv_find_prefix(char **l, const char *name) {
|
||||||
|
char **i;
|
||||||
|
|
||||||
|
assert(name);
|
||||||
|
|
||||||
|
STRV_FOREACH(i, l)
|
||||||
|
if (startswith(*i, name))
|
||||||
|
return *i;
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
void strv_free(char **l) {
|
||||||
|
char **k;
|
||||||
|
|
||||||
|
if (!l)
|
||||||
|
return;
|
||||||
|
|
||||||
|
for (k = l; *k; k++)
|
||||||
|
free(*k);
|
||||||
|
|
||||||
|
free(l);
|
||||||
|
}
|
||||||
|
|
||||||
|
char **strv_copy(char * const *l) {
|
||||||
|
char **r, **k;
|
||||||
|
|
||||||
|
k = r = new(char*, strv_length(l) + 1);
|
||||||
|
if (!r)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
if (l)
|
||||||
|
for (; *l; k++, l++) {
|
||||||
|
*k = strdup(*l);
|
||||||
|
if (!*k) {
|
||||||
|
strv_free(r);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
*k = NULL;
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned int strv_length(char * const *l) {
|
||||||
|
unsigned n = 0;
|
||||||
|
|
||||||
|
if (!l)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
for (; *l; l++)
|
||||||
|
n++;
|
||||||
|
|
||||||
|
return n;
|
||||||
|
}
|
||||||
|
|
||||||
|
char **strv_new_ap(const char *x, va_list ap) {
|
||||||
|
const char *s;
|
||||||
|
char **a;
|
||||||
|
unsigned n = 0, i = 0;
|
||||||
|
va_list aq;
|
||||||
|
|
||||||
|
/* As a special trick we ignore all listed strings that equal
|
||||||
|
* (const char*) -1. This is supposed to be used with the
|
||||||
|
* STRV_IFNOTNULL() macro to include possibly NULL strings in
|
||||||
|
* the string list. */
|
||||||
|
|
||||||
|
if (x) {
|
||||||
|
n = x == (const char*) -1 ? 0 : 1;
|
||||||
|
|
||||||
|
va_copy(aq, ap);
|
||||||
|
while ((s = va_arg(aq, const char*))) {
|
||||||
|
if (s == (const char*) -1)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
n++;
|
||||||
|
}
|
||||||
|
|
||||||
|
va_end(aq);
|
||||||
|
}
|
||||||
|
|
||||||
|
a = new(char*, n+1);
|
||||||
|
if (!a)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
if (x) {
|
||||||
|
if (x != (const char*) -1) {
|
||||||
|
a[i] = strdup(x);
|
||||||
|
if (!a[i])
|
||||||
|
goto fail;
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
while ((s = va_arg(ap, const char*))) {
|
||||||
|
|
||||||
|
if (s == (const char*) -1)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
a[i] = strdup(s);
|
||||||
|
if (!a[i])
|
||||||
|
goto fail;
|
||||||
|
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
a[i] = NULL;
|
||||||
|
|
||||||
|
return a;
|
||||||
|
|
||||||
|
fail:
|
||||||
|
strv_free(a);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
char **strv_new(const char *x, ...) {
|
||||||
|
char **r;
|
||||||
|
va_list ap;
|
||||||
|
|
||||||
|
va_start(ap, x);
|
||||||
|
r = strv_new_ap(x, ap);
|
||||||
|
va_end(ap);
|
||||||
|
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
char **strv_merge(char **a, char **b) {
|
||||||
|
char **r, **k;
|
||||||
|
|
||||||
|
if (!a)
|
||||||
|
return strv_copy(b);
|
||||||
|
|
||||||
|
if (!b)
|
||||||
|
return strv_copy(a);
|
||||||
|
|
||||||
|
r = new(char*, strv_length(a) + strv_length(b) + 1);
|
||||||
|
if (!r)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
for (k = r; *a; k++, a++) {
|
||||||
|
*k = strdup(*a);
|
||||||
|
if (!*k)
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (; *b; k++, b++) {
|
||||||
|
*k = strdup(*b);
|
||||||
|
if (!*k)
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
|
*k = NULL;
|
||||||
|
return r;
|
||||||
|
|
||||||
|
fail:
|
||||||
|
strv_free(r);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
char **strv_merge_concat(char **a, char **b, const char *suffix) {
|
||||||
|
char **r, **k;
|
||||||
|
|
||||||
|
/* Like strv_merge(), but appends suffix to all strings in b, before adding */
|
||||||
|
|
||||||
|
if (!b)
|
||||||
|
return strv_copy(a);
|
||||||
|
|
||||||
|
r = new(char*, strv_length(a) + strv_length(b) + 1);
|
||||||
|
if (!r)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
k = r;
|
||||||
|
if (a)
|
||||||
|
for (; *a; k++, a++) {
|
||||||
|
*k = strdup(*a);
|
||||||
|
if (!*k)
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (; *b; k++, b++) {
|
||||||
|
*k = strappend(*b, suffix);
|
||||||
|
if (!*k)
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
|
*k = NULL;
|
||||||
|
return r;
|
||||||
|
|
||||||
|
fail:
|
||||||
|
strv_free(r);
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
char **strv_split(const char *s, const char *separator) {
|
||||||
|
char *state;
|
||||||
|
char *w;
|
||||||
|
size_t l;
|
||||||
|
unsigned n, i;
|
||||||
|
char **r;
|
||||||
|
|
||||||
|
assert(s);
|
||||||
|
|
||||||
|
n = 0;
|
||||||
|
FOREACH_WORD_SEPARATOR(w, l, s, separator, state)
|
||||||
|
n++;
|
||||||
|
|
||||||
|
r = new(char*, n+1);
|
||||||
|
if (!r)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
i = 0;
|
||||||
|
FOREACH_WORD_SEPARATOR(w, l, s, separator, state) {
|
||||||
|
r[i] = strndup(w, l);
|
||||||
|
if (!r[i]) {
|
||||||
|
strv_free(r);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
r[i] = NULL;
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
char **strv_split_quoted(const char *s) {
|
||||||
|
char *state;
|
||||||
|
char *w;
|
||||||
|
size_t l;
|
||||||
|
unsigned n, i;
|
||||||
|
char **r;
|
||||||
|
|
||||||
|
assert(s);
|
||||||
|
|
||||||
|
n = 0;
|
||||||
|
FOREACH_WORD_QUOTED(w, l, s, state)
|
||||||
|
n++;
|
||||||
|
|
||||||
|
r = new(char*, n+1);
|
||||||
|
if (!r)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
i = 0;
|
||||||
|
FOREACH_WORD_QUOTED(w, l, s, state) {
|
||||||
|
r[i] = cunescape_length(w, l);
|
||||||
|
if (!r[i]) {
|
||||||
|
strv_free(r);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
r[i] = NULL;
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
char **strv_split_newlines(const char *s) {
|
||||||
|
char **l;
|
||||||
|
unsigned int n;
|
||||||
|
|
||||||
|
assert(s);
|
||||||
|
|
||||||
|
/* Special version of strv_split() that splits on newlines and
|
||||||
|
* suppresses an empty string at the end */
|
||||||
|
|
||||||
|
l = strv_split(s, NEWLINE);
|
||||||
|
if (!l)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
n = strv_length(l);
|
||||||
|
if (n == 0)
|
||||||
|
return l;
|
||||||
|
|
||||||
|
if (isempty(l[n-1])) {
|
||||||
|
free(l[n-1]);
|
||||||
|
l[n-1] = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return l;
|
||||||
|
}
|
||||||
|
|
||||||
|
char *strv_join(char **l, const char *separator) {
|
||||||
|
char *r, *e;
|
||||||
|
char **s;
|
||||||
|
size_t n, k;
|
||||||
|
|
||||||
|
if (!separator)
|
||||||
|
separator = " ";
|
||||||
|
|
||||||
|
k = strlen(separator);
|
||||||
|
|
||||||
|
n = 0;
|
||||||
|
STRV_FOREACH(s, l) {
|
||||||
|
if (n != 0)
|
||||||
|
n += k;
|
||||||
|
n += strlen(*s);
|
||||||
|
}
|
||||||
|
|
||||||
|
r = new(char, n+1);
|
||||||
|
if (!r)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
e = r;
|
||||||
|
STRV_FOREACH(s, l) {
|
||||||
|
if (e != r)
|
||||||
|
e = stpcpy(e, separator);
|
||||||
|
|
||||||
|
e = stpcpy(e, *s);
|
||||||
|
}
|
||||||
|
|
||||||
|
*e = 0;
|
||||||
|
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
char **strv_append(char **l, const char *s) {
|
||||||
|
char **r, **k;
|
||||||
|
|
||||||
|
if (!l)
|
||||||
|
return strv_new(s, NULL);
|
||||||
|
|
||||||
|
if (!s)
|
||||||
|
return strv_copy(l);
|
||||||
|
|
||||||
|
r = new(char*, strv_length(l)+2);
|
||||||
|
if (!r)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
for (k = r; *l; k++, l++) {
|
||||||
|
*k = strdup(*l);
|
||||||
|
if (!*k)
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
|
k[0] = strdup(s);
|
||||||
|
if (!k[0])
|
||||||
|
goto fail;
|
||||||
|
|
||||||
|
k[1] = NULL;
|
||||||
|
return r;
|
||||||
|
|
||||||
|
fail:
|
||||||
|
strv_free(r);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
int strv_push(char ***l, char *value) {
|
||||||
|
char **c;
|
||||||
|
unsigned n;
|
||||||
|
|
||||||
|
if (!value)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
n = strv_length(*l);
|
||||||
|
c = realloc(*l, sizeof(char*) * (n + 2));
|
||||||
|
if (!c)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
|
c[n] = value;
|
||||||
|
c[n+1] = NULL;
|
||||||
|
|
||||||
|
*l = c;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int strv_extend(char ***l, const char *value) {
|
||||||
|
char *v;
|
||||||
|
int r;
|
||||||
|
|
||||||
|
if (!value)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
v = strdup(value);
|
||||||
|
if (!v)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
|
r = strv_push(l, v);
|
||||||
|
if (r < 0)
|
||||||
|
free(v);
|
||||||
|
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
char **strv_uniq(char **l) {
|
||||||
|
char **i;
|
||||||
|
|
||||||
|
/* Drops duplicate entries. The first identical string will be
|
||||||
|
* kept, the others dropped */
|
||||||
|
|
||||||
|
STRV_FOREACH(i, l)
|
||||||
|
strv_remove(i+1, *i);
|
||||||
|
|
||||||
|
return l;
|
||||||
|
}
|
||||||
|
|
||||||
|
char **strv_remove(char **l, const char *s) {
|
||||||
|
char **f, **t;
|
||||||
|
|
||||||
|
if (!l)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
assert(s);
|
||||||
|
|
||||||
|
/* Drops every occurrence of s in the string list, edits
|
||||||
|
* in-place. */
|
||||||
|
|
||||||
|
for (f = t = l; *f; f++) {
|
||||||
|
|
||||||
|
if (streq(*f, s)) {
|
||||||
|
free(*f);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
*(t++) = *f;
|
||||||
|
}
|
||||||
|
|
||||||
|
*t = NULL;
|
||||||
|
return l;
|
||||||
|
}
|
||||||
|
|
||||||
|
char **strv_remove_prefix(char **l, const char *s) {
|
||||||
|
char **f, **t;
|
||||||
|
|
||||||
|
if (!l)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
assert(s);
|
||||||
|
|
||||||
|
/* Drops every occurrence of a string prefixed with s in the
|
||||||
|
* string list, edits in-place. */
|
||||||
|
|
||||||
|
for (f = t = l; *f; f++) {
|
||||||
|
|
||||||
|
if (startswith(*f, s)) {
|
||||||
|
free(*f);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
*(t++) = *f;
|
||||||
|
}
|
||||||
|
|
||||||
|
*t = NULL;
|
||||||
|
return l;
|
||||||
|
}
|
||||||
|
|
||||||
|
char **strv_parse_nulstr(const char *s, size_t l) {
|
||||||
|
const char *p;
|
||||||
|
unsigned c = 0, i = 0;
|
||||||
|
char **v;
|
||||||
|
|
||||||
|
assert(s || l == 0);
|
||||||
|
|
||||||
|
if (l == 0)
|
||||||
|
return new0(char*, 1);
|
||||||
|
|
||||||
|
for (p = s; p < s + l; p++)
|
||||||
|
if (*p == 0)
|
||||||
|
c++;
|
||||||
|
|
||||||
|
if (s[l-1] != 0)
|
||||||
|
c++;
|
||||||
|
|
||||||
|
v = new0(char*, c+1);
|
||||||
|
if (!v)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
p = s;
|
||||||
|
while (p < s + l) {
|
||||||
|
const char *e;
|
||||||
|
|
||||||
|
e = memchr(p, 0, s + l - p);
|
||||||
|
|
||||||
|
v[i] = strndup(p, e ? e - p : s + l - p);
|
||||||
|
if (!v[i]) {
|
||||||
|
strv_free(v);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
i++;
|
||||||
|
|
||||||
|
if (!e)
|
||||||
|
break;
|
||||||
|
|
||||||
|
p = e + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
assert(i == c);
|
||||||
|
|
||||||
|
return v;
|
||||||
|
}
|
||||||
|
|
||||||
|
char **strv_split_nulstr(const char *s) {
|
||||||
|
const char *i;
|
||||||
|
char **r = NULL;
|
||||||
|
|
||||||
|
NULSTR_FOREACH(i, s)
|
||||||
|
if (strv_extend(&r, i) < 0) {
|
||||||
|
strv_free(r);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!r)
|
||||||
|
return strv_new(NULL, NULL);
|
||||||
|
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool strv_overlap(char **a, char **b) {
|
||||||
|
char **i, **j;
|
||||||
|
|
||||||
|
STRV_FOREACH(i, a) {
|
||||||
|
STRV_FOREACH(j, b) {
|
||||||
|
if (streq(*i, *j))
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int str_compare(const void *_a, const void *_b) {
|
||||||
|
const char **a = (const char**) _a, **b = (const char**) _b;
|
||||||
|
|
||||||
|
return strcmp(*a, *b);
|
||||||
|
}
|
||||||
|
|
||||||
|
char **strv_sort(char **l) {
|
||||||
|
|
||||||
|
if (strv_isempty(l))
|
||||||
|
return l;
|
||||||
|
|
||||||
|
qsort(l, strv_length(l), sizeof(char*), str_compare);
|
||||||
|
return l;
|
||||||
|
}
|
||||||
|
|
||||||
|
void strv_print(char **l) {
|
||||||
|
char **s;
|
||||||
|
|
||||||
|
if (!l)
|
||||||
|
return;
|
||||||
|
|
||||||
|
STRV_FOREACH(s, l)
|
||||||
|
puts(*s);
|
||||||
|
}
|
||||||
116
install/strv.h
Normal file
116
install/strv.h
Normal file
@@ -0,0 +1,116 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
/***
|
||||||
|
This file is part of systemd.
|
||||||
|
|
||||||
|
Copyright 2010 Lennart Poettering
|
||||||
|
|
||||||
|
systemd is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU Lesser General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2.1 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
systemd is distributed in the hope that it will be useful, but
|
||||||
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public License
|
||||||
|
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
***/
|
||||||
|
|
||||||
|
#include <stdarg.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
#include "util.h"
|
||||||
|
|
||||||
|
char *strv_find(char **l, const char *name) _pure_;
|
||||||
|
char *strv_find_prefix(char **l, const char *name) _pure_;
|
||||||
|
|
||||||
|
void strv_free(char **l);
|
||||||
|
DEFINE_TRIVIAL_CLEANUP_FUNC(char**, strv_free);
|
||||||
|
#define _cleanup_strv_free_ _cleanup_(strv_freep)
|
||||||
|
|
||||||
|
char **strv_copy(char * const *l);
|
||||||
|
unsigned int strv_length(char * const *l) _pure_;
|
||||||
|
|
||||||
|
char **strv_merge(char **a, char **b);
|
||||||
|
char **strv_merge_concat(char **a, char **b, const char *suffix);
|
||||||
|
char **strv_append(char **l, const char *s);
|
||||||
|
int strv_extend(char ***l, const char *value);
|
||||||
|
int strv_push(char ***l, char *value);
|
||||||
|
|
||||||
|
char **strv_remove(char **l, const char *s);
|
||||||
|
char **strv_remove_prefix(char **l, const char *s);
|
||||||
|
char **strv_uniq(char **l);
|
||||||
|
|
||||||
|
#define strv_contains(l, s) (!!strv_find((l), (s)))
|
||||||
|
|
||||||
|
char **strv_new(const char *x, ...) _sentinel_;
|
||||||
|
char **strv_new_ap(const char *x, va_list ap);
|
||||||
|
|
||||||
|
static inline const char* STRV_IFNOTNULL(const char *x) {
|
||||||
|
return x ? x : (const char *) -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline bool strv_isempty(char * const *l) {
|
||||||
|
return !l || !*l;
|
||||||
|
}
|
||||||
|
|
||||||
|
char **strv_split(const char *s, const char *separator);
|
||||||
|
char **strv_split_quoted(const char *s);
|
||||||
|
char **strv_split_newlines(const char *s);
|
||||||
|
|
||||||
|
char *strv_join(char **l, const char *separator);
|
||||||
|
|
||||||
|
char **strv_parse_nulstr(const char *s, size_t l);
|
||||||
|
char **strv_split_nulstr(const char *s);
|
||||||
|
|
||||||
|
bool strv_overlap(char **a, char **b) _pure_;
|
||||||
|
|
||||||
|
#define STRV_FOREACH(s, l) \
|
||||||
|
for ((s) = (l); (s) && *(s); (s)++)
|
||||||
|
|
||||||
|
#define STRV_FOREACH_BACKWARDS(s, l) \
|
||||||
|
STRV_FOREACH(s, l) \
|
||||||
|
; \
|
||||||
|
for ((s)--; (l) && ((s) >= (l)); (s)--)
|
||||||
|
|
||||||
|
#define STRV_FOREACH_PAIR(x, y, l) \
|
||||||
|
for ((x) = (l), (y) = (x+1); (x) && *(x) && *(y); (x) += 2, (y) = (x + 1))
|
||||||
|
|
||||||
|
char **strv_sort(char **l);
|
||||||
|
void strv_print(char **l);
|
||||||
|
|
||||||
|
#define STRV_MAKE(...) ((char**) ((const char*[]) { __VA_ARGS__, NULL }))
|
||||||
|
|
||||||
|
#define STRV_MAKE_EMPTY ((char*[1]) { NULL })
|
||||||
|
|
||||||
|
#define strv_from_stdarg_alloca(first) \
|
||||||
|
({ \
|
||||||
|
char **_l; \
|
||||||
|
\
|
||||||
|
if (!first) \
|
||||||
|
_l = (char**) &first; \
|
||||||
|
else { \
|
||||||
|
unsigned _n; \
|
||||||
|
va_list _ap; \
|
||||||
|
\
|
||||||
|
_n = 1; \
|
||||||
|
va_start(_ap, first); \
|
||||||
|
while (va_arg(_ap, char*)) \
|
||||||
|
_n++; \
|
||||||
|
va_end(_ap); \
|
||||||
|
\
|
||||||
|
_l = newa(char*, _n+1); \
|
||||||
|
_l[_n = 0] = (char*) first; \
|
||||||
|
va_start(_ap, first); \
|
||||||
|
for (;;) { \
|
||||||
|
_l[++_n] = va_arg(_ap, char*); \
|
||||||
|
if (!_l[_n]) \
|
||||||
|
break; \
|
||||||
|
} \
|
||||||
|
va_end(_ap); \
|
||||||
|
} \
|
||||||
|
_l; \
|
||||||
|
})
|
||||||
514
install/util.c
Normal file
514
install/util.c
Normal file
@@ -0,0 +1,514 @@
|
|||||||
|
/***
|
||||||
|
This file is part of systemd.
|
||||||
|
|
||||||
|
Copyright 2010 Lennart Poettering
|
||||||
|
|
||||||
|
systemd is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU Lesser General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2.1 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
systemd is distributed in the hope that it will be useful, but
|
||||||
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public License
|
||||||
|
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
***/
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/syscall.h>
|
||||||
|
|
||||||
|
#include "util.h"
|
||||||
|
|
||||||
|
static inline pid_t gettid(void) {
|
||||||
|
return (pid_t) syscall(SYS_gettid);
|
||||||
|
}
|
||||||
|
|
||||||
|
size_t page_size(void) {
|
||||||
|
static __thread size_t pgsz = 0;
|
||||||
|
long r;
|
||||||
|
|
||||||
|
if (_likely_(pgsz > 0))
|
||||||
|
return pgsz;
|
||||||
|
|
||||||
|
assert_se((r = sysconf(_SC_PAGESIZE)) > 0);
|
||||||
|
|
||||||
|
pgsz = (size_t) r;
|
||||||
|
|
||||||
|
return pgsz;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool endswith(const char *s, const char *postfix) {
|
||||||
|
size_t sl, pl;
|
||||||
|
|
||||||
|
assert(s);
|
||||||
|
assert(postfix);
|
||||||
|
|
||||||
|
sl = strlen(s);
|
||||||
|
pl = strlen(postfix);
|
||||||
|
|
||||||
|
if (pl == 0)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if (sl < pl)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return memcmp(s + sl - pl, postfix, pl) == 0;
|
||||||
|
}
|
||||||
|
int close_nointr(int fd) {
|
||||||
|
assert(fd >= 0);
|
||||||
|
|
||||||
|
for (;;) {
|
||||||
|
int r;
|
||||||
|
|
||||||
|
r = close(fd);
|
||||||
|
if (r >= 0)
|
||||||
|
return r;
|
||||||
|
|
||||||
|
if (errno != EINTR)
|
||||||
|
return -errno;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void close_nointr_nofail(int fd) {
|
||||||
|
int saved_errno = errno;
|
||||||
|
|
||||||
|
/* like close_nointr() but cannot fail, and guarantees errno
|
||||||
|
* is unchanged */
|
||||||
|
|
||||||
|
assert_se(close_nointr(fd) == 0);
|
||||||
|
|
||||||
|
errno = saved_errno;
|
||||||
|
}
|
||||||
|
|
||||||
|
int open_terminal(const char *name, int mode) {
|
||||||
|
int fd, r;
|
||||||
|
unsigned c = 0;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If a TTY is in the process of being closed opening it might
|
||||||
|
* cause EIO. This is horribly awful, but unlikely to be
|
||||||
|
* changed in the kernel. Hence we work around this problem by
|
||||||
|
* retrying a couple of times.
|
||||||
|
*
|
||||||
|
* https://bugs.launchpad.net/ubuntu/+source/linux/+bug/554172/comments/245
|
||||||
|
*/
|
||||||
|
|
||||||
|
for (;;) {
|
||||||
|
if ((fd = open(name, mode)) >= 0)
|
||||||
|
break;
|
||||||
|
|
||||||
|
if (errno != EIO)
|
||||||
|
return -errno;
|
||||||
|
|
||||||
|
if (c >= 20)
|
||||||
|
return -errno;
|
||||||
|
|
||||||
|
usleep(50 * USEC_PER_MSEC);
|
||||||
|
c++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fd < 0)
|
||||||
|
return -errno;
|
||||||
|
|
||||||
|
if ((r = isatty(fd)) < 0) {
|
||||||
|
close_nointr_nofail(fd);
|
||||||
|
return -errno;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!r) {
|
||||||
|
close_nointr_nofail(fd);
|
||||||
|
return -ENOTTY;
|
||||||
|
}
|
||||||
|
|
||||||
|
return fd;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool streq_ptr(const char *a, const char *b) {
|
||||||
|
|
||||||
|
/* Like streq(), but tries to make sense of NULL pointers */
|
||||||
|
|
||||||
|
if (a && b)
|
||||||
|
return streq(a, b);
|
||||||
|
|
||||||
|
if (!a && !b)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
bool is_main_thread(void) {
|
||||||
|
static __thread int cached = 0;
|
||||||
|
|
||||||
|
if (_unlikely_(cached == 0))
|
||||||
|
cached = getpid() == gettid() ? 1 : -1;
|
||||||
|
|
||||||
|
return cached > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int safe_atou(const char *s, unsigned *ret_u) {
|
||||||
|
char *x = NULL;
|
||||||
|
unsigned long l;
|
||||||
|
|
||||||
|
assert(s);
|
||||||
|
assert(ret_u);
|
||||||
|
|
||||||
|
errno = 0;
|
||||||
|
l = strtoul(s, &x, 0);
|
||||||
|
|
||||||
|
if (!x || *x || errno)
|
||||||
|
return errno ? -errno : -EINVAL;
|
||||||
|
|
||||||
|
if ((unsigned long) (unsigned) l != l)
|
||||||
|
return -ERANGE;
|
||||||
|
|
||||||
|
*ret_u = (unsigned) l;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static const char *const log_level_table[] = {
|
||||||
|
[LOG_EMERG] = "emerg",
|
||||||
|
[LOG_ALERT] = "alert",
|
||||||
|
[LOG_CRIT] = "crit",
|
||||||
|
[LOG_ERR] = "err",
|
||||||
|
[LOG_WARNING] = "warning",
|
||||||
|
[LOG_NOTICE] = "notice",
|
||||||
|
[LOG_INFO] = "info",
|
||||||
|
[LOG_DEBUG] = "debug"
|
||||||
|
};
|
||||||
|
|
||||||
|
DEFINE_STRING_TABLE_LOOKUP(log_level, int);
|
||||||
|
|
||||||
|
char *strnappend(const char *s, const char *suffix, size_t b) {
|
||||||
|
size_t a;
|
||||||
|
char *r;
|
||||||
|
|
||||||
|
if (!s && !suffix)
|
||||||
|
return strdup("");
|
||||||
|
|
||||||
|
if (!s)
|
||||||
|
return strndup(suffix, b);
|
||||||
|
|
||||||
|
if (!suffix)
|
||||||
|
return strdup(s);
|
||||||
|
|
||||||
|
assert(s);
|
||||||
|
assert(suffix);
|
||||||
|
|
||||||
|
a = strlen(s);
|
||||||
|
if (b > ((size_t) -1) - a)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
r = new(char, a+b+1);
|
||||||
|
if (!r)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
memcpy(r, s, a);
|
||||||
|
memcpy(r+a, suffix, b);
|
||||||
|
r[a+b] = 0;
|
||||||
|
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
char *strappend(const char *s, const char *suffix) {
|
||||||
|
return strnappend(s, suffix, suffix ? strlen(suffix) : 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
char *strjoin(const char *x, ...) {
|
||||||
|
va_list ap;
|
||||||
|
size_t l;
|
||||||
|
char *r;
|
||||||
|
|
||||||
|
va_start(ap, x);
|
||||||
|
|
||||||
|
if (x) {
|
||||||
|
l = strlen(x);
|
||||||
|
|
||||||
|
for (;;) {
|
||||||
|
const char *t;
|
||||||
|
size_t n;
|
||||||
|
|
||||||
|
t = va_arg(ap, const char *);
|
||||||
|
if (!t)
|
||||||
|
break;
|
||||||
|
|
||||||
|
n = strlen(t);
|
||||||
|
if (n > ((size_t) -1) - l) {
|
||||||
|
va_end(ap);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
l += n;
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
l = 0;
|
||||||
|
|
||||||
|
va_end(ap);
|
||||||
|
|
||||||
|
r = new(char, l+1);
|
||||||
|
if (!r)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
if (x) {
|
||||||
|
char *p;
|
||||||
|
|
||||||
|
p = stpcpy(r, x);
|
||||||
|
|
||||||
|
va_start(ap, x);
|
||||||
|
|
||||||
|
for (;;) {
|
||||||
|
const char *t;
|
||||||
|
|
||||||
|
t = va_arg(ap, const char *);
|
||||||
|
if (!t)
|
||||||
|
break;
|
||||||
|
|
||||||
|
p = stpcpy(p, t);
|
||||||
|
}
|
||||||
|
|
||||||
|
va_end(ap);
|
||||||
|
} else
|
||||||
|
r[0] = 0;
|
||||||
|
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
char *cunescape_length_with_prefix(const char *s, size_t length, const char *prefix) {
|
||||||
|
char *r, *t;
|
||||||
|
const char *f;
|
||||||
|
size_t pl;
|
||||||
|
|
||||||
|
assert(s);
|
||||||
|
|
||||||
|
/* Undoes C style string escaping, and optionally prefixes it. */
|
||||||
|
|
||||||
|
pl = prefix ? strlen(prefix) : 0;
|
||||||
|
|
||||||
|
r = new(char, pl+length+1);
|
||||||
|
if (!r)
|
||||||
|
return r;
|
||||||
|
|
||||||
|
if (prefix)
|
||||||
|
memcpy(r, prefix, pl);
|
||||||
|
|
||||||
|
for (f = s, t = r + pl; f < s + length; f++) {
|
||||||
|
|
||||||
|
if (*f != '\\') {
|
||||||
|
*(t++) = *f;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
f++;
|
||||||
|
|
||||||
|
switch (*f) {
|
||||||
|
|
||||||
|
case 'a':
|
||||||
|
*(t++) = '\a';
|
||||||
|
break;
|
||||||
|
case 'b':
|
||||||
|
*(t++) = '\b';
|
||||||
|
break;
|
||||||
|
case 'f':
|
||||||
|
*(t++) = '\f';
|
||||||
|
break;
|
||||||
|
case 'n':
|
||||||
|
*(t++) = '\n';
|
||||||
|
break;
|
||||||
|
case 'r':
|
||||||
|
*(t++) = '\r';
|
||||||
|
break;
|
||||||
|
case 't':
|
||||||
|
*(t++) = '\t';
|
||||||
|
break;
|
||||||
|
case 'v':
|
||||||
|
*(t++) = '\v';
|
||||||
|
break;
|
||||||
|
case '\\':
|
||||||
|
*(t++) = '\\';
|
||||||
|
break;
|
||||||
|
case '"':
|
||||||
|
*(t++) = '"';
|
||||||
|
break;
|
||||||
|
case '\'':
|
||||||
|
*(t++) = '\'';
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 's':
|
||||||
|
/* This is an extension of the XDG syntax files */
|
||||||
|
*(t++) = ' ';
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'x': {
|
||||||
|
/* hexadecimal encoding */
|
||||||
|
int a, b;
|
||||||
|
|
||||||
|
a = unhexchar(f[1]);
|
||||||
|
b = unhexchar(f[2]);
|
||||||
|
|
||||||
|
if (a < 0 || b < 0) {
|
||||||
|
/* Invalid escape code, let's take it literal then */
|
||||||
|
*(t++) = '\\';
|
||||||
|
*(t++) = 'x';
|
||||||
|
} else {
|
||||||
|
*(t++) = (char) ((a << 4) | b);
|
||||||
|
f += 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case '0':
|
||||||
|
case '1':
|
||||||
|
case '2':
|
||||||
|
case '3':
|
||||||
|
case '4':
|
||||||
|
case '5':
|
||||||
|
case '6':
|
||||||
|
case '7': {
|
||||||
|
/* octal encoding */
|
||||||
|
int a, b, c;
|
||||||
|
|
||||||
|
a = unoctchar(f[0]);
|
||||||
|
b = unoctchar(f[1]);
|
||||||
|
c = unoctchar(f[2]);
|
||||||
|
|
||||||
|
if (a < 0 || b < 0 || c < 0) {
|
||||||
|
/* Invalid escape code, let's take it literal then */
|
||||||
|
*(t++) = '\\';
|
||||||
|
*(t++) = f[0];
|
||||||
|
} else {
|
||||||
|
*(t++) = (char) ((a << 6) | (b << 3) | c);
|
||||||
|
f += 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case 0:
|
||||||
|
/* premature end of string.*/
|
||||||
|
*(t++) = '\\';
|
||||||
|
goto finish;
|
||||||
|
|
||||||
|
default:
|
||||||
|
/* Invalid escape code, let's take it literal then */
|
||||||
|
*(t++) = '\\';
|
||||||
|
*(t++) = *f;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
finish:
|
||||||
|
*t = 0;
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
char *cunescape_length(const char *s, size_t length) {
|
||||||
|
return cunescape_length_with_prefix(s, length, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Split a string into words, but consider strings enclosed in '' and
|
||||||
|
* "" as words even if they include spaces. */
|
||||||
|
char *split_quoted(const char *c, size_t *l, char **state) {
|
||||||
|
const char *current, *e;
|
||||||
|
bool escaped = false;
|
||||||
|
|
||||||
|
assert(c);
|
||||||
|
assert(l);
|
||||||
|
assert(state);
|
||||||
|
|
||||||
|
current = *state ? *state : c;
|
||||||
|
|
||||||
|
current += strspn(current, WHITESPACE);
|
||||||
|
|
||||||
|
if (*current == 0)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
else if (*current == '\'') {
|
||||||
|
current ++;
|
||||||
|
|
||||||
|
for (e = current; *e; e++) {
|
||||||
|
if (escaped)
|
||||||
|
escaped = false;
|
||||||
|
else if (*e == '\\')
|
||||||
|
escaped = true;
|
||||||
|
else if (*e == '\'')
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
*l = e-current;
|
||||||
|
*state = (char*) (*e == 0 ? e : e+1);
|
||||||
|
|
||||||
|
} else if (*current == '\"') {
|
||||||
|
current ++;
|
||||||
|
|
||||||
|
for (e = current; *e; e++) {
|
||||||
|
if (escaped)
|
||||||
|
escaped = false;
|
||||||
|
else if (*e == '\\')
|
||||||
|
escaped = true;
|
||||||
|
else if (*e == '\"')
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
*l = e-current;
|
||||||
|
*state = (char*) (*e == 0 ? e : e+1);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
for (e = current; *e; e++) {
|
||||||
|
if (escaped)
|
||||||
|
escaped = false;
|
||||||
|
else if (*e == '\\')
|
||||||
|
escaped = true;
|
||||||
|
else if (strchr(WHITESPACE, *e))
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
*l = e-current;
|
||||||
|
*state = (char*) e;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (char*) current;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Split a string into words. */
|
||||||
|
char *split(const char *c, size_t *l, const char *separator, char **state) {
|
||||||
|
char *current;
|
||||||
|
|
||||||
|
current = *state ? *state : (char*) c;
|
||||||
|
|
||||||
|
if (!*current || *c == 0)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
current += strspn(current, separator);
|
||||||
|
*l = strcspn(current, separator);
|
||||||
|
*state = current+*l;
|
||||||
|
|
||||||
|
return (char*) current;
|
||||||
|
}
|
||||||
|
|
||||||
|
int unhexchar(char c) {
|
||||||
|
|
||||||
|
if (c >= '0' && c <= '9')
|
||||||
|
return c - '0';
|
||||||
|
|
||||||
|
if (c >= 'a' && c <= 'f')
|
||||||
|
return c - 'a' + 10;
|
||||||
|
|
||||||
|
if (c >= 'A' && c <= 'F')
|
||||||
|
return c - 'A' + 10;
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int unoctchar(char c) {
|
||||||
|
|
||||||
|
if (c >= '0' && c <= '7')
|
||||||
|
return c - '0';
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
586
install/util.h
Normal file
586
install/util.h
Normal file
@@ -0,0 +1,586 @@
|
|||||||
|
#ifndef fooutilhfoo
|
||||||
|
#define fooutilhfoo
|
||||||
|
|
||||||
|
/***
|
||||||
|
This file is part of systemd.
|
||||||
|
|
||||||
|
Copyright 2010 Lennart Poettering
|
||||||
|
|
||||||
|
systemd is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU Lesser General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2.1 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
systemd is distributed in the hope that it will be useful, but
|
||||||
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public License
|
||||||
|
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
***/
|
||||||
|
|
||||||
|
#define _GNU_SOURCE
|
||||||
|
|
||||||
|
#include <inttypes.h>
|
||||||
|
#include <time.h>
|
||||||
|
#include <sys/time.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <signal.h>
|
||||||
|
#include <sched.h>
|
||||||
|
#include <limits.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <dirent.h>
|
||||||
|
#include <sys/resource.h>
|
||||||
|
|
||||||
|
#include "macro.h"
|
||||||
|
|
||||||
|
typedef uint64_t usec_t;
|
||||||
|
typedef uint64_t nsec_t;
|
||||||
|
|
||||||
|
typedef struct dual_timestamp {
|
||||||
|
usec_t realtime;
|
||||||
|
usec_t monotonic;
|
||||||
|
} dual_timestamp;
|
||||||
|
|
||||||
|
#define MSEC_PER_SEC 1000ULL
|
||||||
|
#define USEC_PER_SEC 1000000ULL
|
||||||
|
#define USEC_PER_MSEC 1000ULL
|
||||||
|
#define NSEC_PER_SEC 1000000000ULL
|
||||||
|
#define NSEC_PER_MSEC 1000000ULL
|
||||||
|
#define NSEC_PER_USEC 1000ULL
|
||||||
|
|
||||||
|
#define USEC_PER_MINUTE (60ULL*USEC_PER_SEC)
|
||||||
|
#define NSEC_PER_MINUTE (60ULL*NSEC_PER_SEC)
|
||||||
|
#define USEC_PER_HOUR (60ULL*USEC_PER_MINUTE)
|
||||||
|
#define NSEC_PER_HOUR (60ULL*NSEC_PER_MINUTE)
|
||||||
|
#define USEC_PER_DAY (24ULL*USEC_PER_HOUR)
|
||||||
|
#define NSEC_PER_DAY (24ULL*NSEC_PER_HOUR)
|
||||||
|
#define USEC_PER_WEEK (7ULL*USEC_PER_DAY)
|
||||||
|
#define NSEC_PER_WEEK (7ULL*NSEC_PER_DAY)
|
||||||
|
#define USEC_PER_MONTH (2629800ULL*USEC_PER_SEC)
|
||||||
|
#define NSEC_PER_MONTH (2629800ULL*NSEC_PER_SEC)
|
||||||
|
#define USEC_PER_YEAR (31557600ULL*USEC_PER_SEC)
|
||||||
|
#define NSEC_PER_YEAR (31557600ULL*NSEC_PER_SEC)
|
||||||
|
|
||||||
|
/* What is interpreted as whitespace? */
|
||||||
|
#define WHITESPACE " \t\n\r"
|
||||||
|
#define NEWLINE "\n\r"
|
||||||
|
#define QUOTES "\"\'"
|
||||||
|
#define COMMENTS "#;\n"
|
||||||
|
|
||||||
|
#define FORMAT_TIMESTAMP_MAX 64
|
||||||
|
#define FORMAT_TIMESTAMP_PRETTY_MAX 256
|
||||||
|
#define FORMAT_TIMESPAN_MAX 64
|
||||||
|
#define FORMAT_BYTES_MAX 8
|
||||||
|
|
||||||
|
#define ANSI_HIGHLIGHT_ON "\x1B[1;39m"
|
||||||
|
#define ANSI_HIGHLIGHT_RED_ON "\x1B[1;31m"
|
||||||
|
#define ANSI_HIGHLIGHT_GREEN_ON "\x1B[1;32m"
|
||||||
|
#define ANSI_HIGHLIGHT_YELLOW_ON "\x1B[1;33m"
|
||||||
|
#define ANSI_HIGHLIGHT_OFF "\x1B[0m"
|
||||||
|
|
||||||
|
usec_t now(clockid_t clock);
|
||||||
|
|
||||||
|
dual_timestamp* dual_timestamp_get(dual_timestamp *ts);
|
||||||
|
dual_timestamp* dual_timestamp_from_realtime(dual_timestamp *ts, usec_t u);
|
||||||
|
|
||||||
|
#define dual_timestamp_is_set(ts) ((ts)->realtime > 0)
|
||||||
|
|
||||||
|
usec_t timespec_load(const struct timespec *ts);
|
||||||
|
struct timespec *timespec_store(struct timespec *ts, usec_t u);
|
||||||
|
|
||||||
|
usec_t timeval_load(const struct timeval *tv);
|
||||||
|
struct timeval *timeval_store(struct timeval *tv, usec_t u);
|
||||||
|
|
||||||
|
size_t page_size(void);
|
||||||
|
#define PAGE_ALIGN(l) ALIGN_TO((l), page_size())
|
||||||
|
|
||||||
|
#define streq(a,b) (strcmp((a),(b)) == 0)
|
||||||
|
#define strneq(a, b, n) (strncmp((a), (b), (n)) == 0)
|
||||||
|
|
||||||
|
bool streq_ptr(const char *a, const char *b);
|
||||||
|
|
||||||
|
#define new(t, n) ((t*) malloc(sizeof(t)*(n)))
|
||||||
|
|
||||||
|
#define new0(t, n) ((t*) calloc((n), sizeof(t)))
|
||||||
|
|
||||||
|
#define newa(t, n) ((t*) alloca(sizeof(t)*(n)))
|
||||||
|
|
||||||
|
#define newdup(t, p, n) ((t*) memdup(p, sizeof(t)*(n)))
|
||||||
|
|
||||||
|
#define malloc0(n) (calloc((n), 1))
|
||||||
|
|
||||||
|
static inline const char* yes_no(bool b) {
|
||||||
|
return b ? "yes" : "no";
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline const char* strempty(const char *s) {
|
||||||
|
return s ? s : "";
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline const char* strnull(const char *s) {
|
||||||
|
return s ? s : "(null)";
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline const char *strna(const char *s) {
|
||||||
|
return s ? s : "n/a";
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline bool isempty(const char *p) {
|
||||||
|
return !p || !p[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static inline const char *startswith(const char *s, const char *prefix) {
|
||||||
|
if (strncmp(s, prefix, strlen(prefix)) == 0)
|
||||||
|
return s + strlen(prefix);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool endswith(const char *s, const char *postfix);
|
||||||
|
|
||||||
|
|
||||||
|
bool startswith_no_case(const char *s, const char *prefix);
|
||||||
|
|
||||||
|
bool first_word(const char *s, const char *word);
|
||||||
|
|
||||||
|
int close_nointr(int fd);
|
||||||
|
void close_nointr_nofail(int fd);
|
||||||
|
void close_many(const int fds[], unsigned n_fd);
|
||||||
|
|
||||||
|
int parse_boolean(const char *v);
|
||||||
|
int parse_usec(const char *t, usec_t *usec);
|
||||||
|
int parse_nsec(const char *t, nsec_t *nsec);
|
||||||
|
int parse_bytes(const char *t, off_t *bytes);
|
||||||
|
int parse_pid(const char *s, pid_t* ret_pid);
|
||||||
|
int parse_uid(const char *s, uid_t* ret_uid);
|
||||||
|
#define parse_gid(s, ret_uid) parse_uid(s, ret_uid)
|
||||||
|
|
||||||
|
int safe_atou(const char *s, unsigned *ret_u);
|
||||||
|
int safe_atoi(const char *s, int *ret_i);
|
||||||
|
|
||||||
|
int safe_atollu(const char *s, unsigned long long *ret_u);
|
||||||
|
int safe_atolli(const char *s, long long int *ret_i);
|
||||||
|
|
||||||
|
#if LONG_MAX == INT_MAX
|
||||||
|
static inline int safe_atolu(const char *s, unsigned long *ret_u) {
|
||||||
|
assert_cc(sizeof(unsigned long) == sizeof(unsigned));
|
||||||
|
return safe_atou(s, (unsigned*) ret_u);
|
||||||
|
}
|
||||||
|
static inline int safe_atoli(const char *s, long int *ret_u) {
|
||||||
|
assert_cc(sizeof(long int) == sizeof(int));
|
||||||
|
return safe_atoi(s, (int*) ret_u);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
static inline int safe_atolu(const char *s, unsigned long *ret_u) {
|
||||||
|
assert_cc(sizeof(unsigned long) == sizeof(unsigned long long));
|
||||||
|
return safe_atollu(s, (unsigned long long*) ret_u);
|
||||||
|
}
|
||||||
|
static inline int safe_atoli(const char *s, long int *ret_u) {
|
||||||
|
assert_cc(sizeof(long int) == sizeof(long long int));
|
||||||
|
return safe_atolli(s, (long long int*) ret_u);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static inline int safe_atou32(const char *s, uint32_t *ret_u) {
|
||||||
|
assert_cc(sizeof(uint32_t) == sizeof(unsigned));
|
||||||
|
return safe_atou(s, (unsigned*) ret_u);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline int safe_atoi32(const char *s, int32_t *ret_i) {
|
||||||
|
assert_cc(sizeof(int32_t) == sizeof(int));
|
||||||
|
return safe_atoi(s, (int*) ret_i);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline int safe_atou64(const char *s, uint64_t *ret_u) {
|
||||||
|
assert_cc(sizeof(uint64_t) == sizeof(unsigned long long));
|
||||||
|
return safe_atollu(s, (unsigned long long*) ret_u);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline int safe_atoi64(const char *s, int64_t *ret_i) {
|
||||||
|
assert_cc(sizeof(int64_t) == sizeof(long long int));
|
||||||
|
return safe_atolli(s, (long long int*) ret_i);
|
||||||
|
}
|
||||||
|
|
||||||
|
char *split(const char *c, size_t *l, const char *separator, char **state);
|
||||||
|
char *split_quoted(const char *c, size_t *l, char **state);
|
||||||
|
|
||||||
|
#define FOREACH_WORD(word, length, s, state) \
|
||||||
|
for ((state) = NULL, (word) = split((s), &(length), WHITESPACE, &(state)); (word); (word) = split((s), &(length), WHITESPACE, &(state)))
|
||||||
|
|
||||||
|
#define FOREACH_WORD_SEPARATOR(word, length, s, separator, state) \
|
||||||
|
for ((state) = NULL, (word) = split((s), &(length), (separator), &(state)); (word); (word) = split((s), &(length), (separator), &(state)))
|
||||||
|
|
||||||
|
#define FOREACH_WORD_QUOTED(word, length, s, state) \
|
||||||
|
for ((state) = NULL, (word) = split_quoted((s), &(length), &(state)); (word); (word) = split_quoted((s), &(length), &(state)))
|
||||||
|
|
||||||
|
pid_t get_parent_of_pid(pid_t pid, pid_t *ppid);
|
||||||
|
int get_starttime_of_pid(pid_t pid, unsigned long long *st);
|
||||||
|
|
||||||
|
int write_one_line_file(const char *fn, const char *line);
|
||||||
|
int write_one_line_file_atomic(const char *fn, const char *line);
|
||||||
|
int read_one_line_file(const char *fn, char **line);
|
||||||
|
int read_full_file(const char *fn, char **contents, size_t *size);
|
||||||
|
|
||||||
|
int parse_env_file(const char *fname, const char *separator, ...) _sentinel_;
|
||||||
|
int load_env_file(const char *fname, char ***l);
|
||||||
|
int write_env_file(const char *fname, char **l);
|
||||||
|
|
||||||
|
char *strappend(const char *s, const char *suffix);
|
||||||
|
char *strnappend(const char *s, const char *suffix, size_t length);
|
||||||
|
|
||||||
|
char *replace_env(const char *format, char **env);
|
||||||
|
char **replace_env_argv(char **argv, char **env);
|
||||||
|
|
||||||
|
int readlink_malloc(const char *p, char **r);
|
||||||
|
int readlink_and_make_absolute(const char *p, char **r);
|
||||||
|
int readlink_and_canonicalize(const char *p, char **r);
|
||||||
|
|
||||||
|
int reset_all_signal_handlers(void);
|
||||||
|
|
||||||
|
char *strstrip(char *s);
|
||||||
|
char *delete_chars(char *s, const char *bad);
|
||||||
|
char *truncate_nl(char *s);
|
||||||
|
|
||||||
|
char *file_in_same_dir(const char *path, const char *filename);
|
||||||
|
|
||||||
|
int rmdir_parents(const char *path, const char *stop);
|
||||||
|
|
||||||
|
int get_process_comm(pid_t pid, char **name);
|
||||||
|
int get_process_cmdline(pid_t pid, size_t max_length, bool comm_fallback, char **line);
|
||||||
|
int get_process_exe(pid_t pid, char **name);
|
||||||
|
int get_process_uid(pid_t pid, uid_t *uid);
|
||||||
|
|
||||||
|
char hexchar(int x);
|
||||||
|
int unhexchar(char c);
|
||||||
|
char octchar(int x);
|
||||||
|
int unoctchar(char c);
|
||||||
|
char decchar(int x);
|
||||||
|
int undecchar(char c);
|
||||||
|
|
||||||
|
char *cescape(const char *s);
|
||||||
|
char *cunescape(const char *s);
|
||||||
|
char *cunescape_length(const char *s, size_t length);
|
||||||
|
|
||||||
|
char *xescape(const char *s, const char *bad);
|
||||||
|
|
||||||
|
char *bus_path_escape(const char *s);
|
||||||
|
char *bus_path_unescape(const char *s);
|
||||||
|
|
||||||
|
char *ascii_strlower(char *path);
|
||||||
|
|
||||||
|
bool dirent_is_file(const struct dirent *de);
|
||||||
|
bool dirent_is_file_with_suffix(const struct dirent *de, const char *suffix);
|
||||||
|
|
||||||
|
bool ignore_file(const char *filename);
|
||||||
|
|
||||||
|
bool chars_intersect(const char *a, const char *b);
|
||||||
|
|
||||||
|
char *format_timestamp(char *buf, size_t l, usec_t t);
|
||||||
|
char *format_timestamp_pretty(char *buf, size_t l, usec_t t);
|
||||||
|
char *format_timespan(char *buf, size_t l, usec_t t);
|
||||||
|
|
||||||
|
int make_stdio(int fd);
|
||||||
|
int make_null_stdio(void);
|
||||||
|
|
||||||
|
unsigned long long random_ull(void);
|
||||||
|
|
||||||
|
#define __DEFINE_STRING_TABLE_LOOKUP(name,type,scope) \
|
||||||
|
scope const char *name##_to_string(type i) { \
|
||||||
|
if (i < 0 || i >= (type) ELEMENTSOF(name##_table)) \
|
||||||
|
return NULL; \
|
||||||
|
return name##_table[i]; \
|
||||||
|
} \
|
||||||
|
scope type name##_from_string(const char *s) { \
|
||||||
|
type i; \
|
||||||
|
unsigned u = 0; \
|
||||||
|
assert(s); \
|
||||||
|
for (i = 0; i < (type)ELEMENTSOF(name##_table); i++) \
|
||||||
|
if (name##_table[i] && \
|
||||||
|
streq(name##_table[i], s)) \
|
||||||
|
return i; \
|
||||||
|
if (safe_atou(s, &u) >= 0 && \
|
||||||
|
u < ELEMENTSOF(name##_table)) \
|
||||||
|
return (type) u; \
|
||||||
|
return (type) -1; \
|
||||||
|
} \
|
||||||
|
struct __useless_struct_to_allow_trailing_semicolon__
|
||||||
|
|
||||||
|
#define DEFINE_STRING_TABLE_LOOKUP(name,type) __DEFINE_STRING_TABLE_LOOKUP(name,type,)
|
||||||
|
#define DEFINE_PRIVATE_STRING_TABLE_LOOKUP(name,type) __DEFINE_STRING_TABLE_LOOKUP(name,type,static)
|
||||||
|
|
||||||
|
int fd_nonblock(int fd, bool nonblock);
|
||||||
|
int fd_cloexec(int fd, bool cloexec);
|
||||||
|
|
||||||
|
int close_all_fds(const int except[], unsigned n_except);
|
||||||
|
|
||||||
|
bool fstype_is_network(const char *fstype);
|
||||||
|
|
||||||
|
int chvt(int vt);
|
||||||
|
|
||||||
|
int read_one_char(FILE *f, char *ret, usec_t timeout, bool *need_nl);
|
||||||
|
int ask(char *ret, const char *replies, const char *text, ...);
|
||||||
|
|
||||||
|
int reset_terminal_fd(int fd, bool switch_to_text);
|
||||||
|
int reset_terminal(const char *name);
|
||||||
|
|
||||||
|
int open_terminal(const char *name, int mode);
|
||||||
|
int acquire_terminal(const char *name, bool fail, bool force, bool ignore_tiocstty_eperm);
|
||||||
|
int release_terminal(void);
|
||||||
|
|
||||||
|
int flush_fd(int fd);
|
||||||
|
|
||||||
|
int ignore_signals(int sig, ...);
|
||||||
|
int default_signals(int sig, ...);
|
||||||
|
int sigaction_many(const struct sigaction *sa, ...);
|
||||||
|
|
||||||
|
int close_pipe(int p[]);
|
||||||
|
int fopen_temporary(const char *path, FILE **_f, char **_temp_path);
|
||||||
|
|
||||||
|
ssize_t loop_read(int fd, void *buf, size_t nbytes, bool do_poll);
|
||||||
|
ssize_t loop_write(int fd, const void *buf, size_t nbytes, bool do_poll);
|
||||||
|
|
||||||
|
bool is_device_path(const char *path);
|
||||||
|
|
||||||
|
int dir_is_empty(const char *path);
|
||||||
|
|
||||||
|
void rename_process(const char name[8]);
|
||||||
|
|
||||||
|
void sigset_add_many(sigset_t *ss, ...);
|
||||||
|
|
||||||
|
char* gethostname_malloc(void);
|
||||||
|
bool hostname_is_set(void);
|
||||||
|
char* getlogname_malloc(void);
|
||||||
|
|
||||||
|
int getttyname_malloc(int fd, char **r);
|
||||||
|
int getttyname_harder(int fd, char **r);
|
||||||
|
|
||||||
|
int get_ctty_devnr(pid_t pid, dev_t *d);
|
||||||
|
int get_ctty(pid_t, dev_t *_devnr, char **r);
|
||||||
|
|
||||||
|
int chmod_and_chown(const char *path, mode_t mode, uid_t uid, gid_t gid);
|
||||||
|
int fchmod_and_fchown(int fd, mode_t mode, uid_t uid, gid_t gid);
|
||||||
|
|
||||||
|
int rm_rf_children(int fd, bool only_dirs, bool honour_sticky, struct stat *root_dev);
|
||||||
|
int rm_rf(const char *path, bool only_dirs, bool delete_root, bool honour_sticky);
|
||||||
|
|
||||||
|
int pipe_eof(int fd);
|
||||||
|
|
||||||
|
cpu_set_t* cpu_set_malloc(unsigned *ncpus);
|
||||||
|
|
||||||
|
void status_vprintf(const char *status, bool ellipse, const char *format, va_list ap);
|
||||||
|
void status_printf(const char *status, bool ellipse, const char *format, ...);
|
||||||
|
void status_welcome(void);
|
||||||
|
|
||||||
|
int fd_columns(int fd);
|
||||||
|
unsigned columns(void);
|
||||||
|
|
||||||
|
int fd_lines(int fd);
|
||||||
|
unsigned lines(void);
|
||||||
|
|
||||||
|
int running_in_chroot(void);
|
||||||
|
|
||||||
|
char *ellipsize(const char *s, size_t length, unsigned percent);
|
||||||
|
char *ellipsize_mem(const char *s, size_t old_length, size_t new_length, unsigned percent);
|
||||||
|
|
||||||
|
int touch(const char *path);
|
||||||
|
|
||||||
|
char *unquote(const char *s, const char *quotes);
|
||||||
|
char *normalize_env_assignment(const char *s);
|
||||||
|
|
||||||
|
int wait_for_terminate(pid_t pid, siginfo_t *status);
|
||||||
|
int wait_for_terminate_and_warn(const char *name, pid_t pid);
|
||||||
|
|
||||||
|
_noreturn_ void freeze(void);
|
||||||
|
|
||||||
|
bool null_or_empty(struct stat *st);
|
||||||
|
int null_or_empty_path(const char *fn);
|
||||||
|
|
||||||
|
DIR *xopendirat(int dirfd, const char *name, int flags);
|
||||||
|
|
||||||
|
void dual_timestamp_serialize(FILE *f, const char *name, dual_timestamp *t);
|
||||||
|
void dual_timestamp_deserialize(const char *value, dual_timestamp *t);
|
||||||
|
|
||||||
|
char *fstab_node_to_udev_node(const char *p);
|
||||||
|
|
||||||
|
bool tty_is_vc(const char *tty);
|
||||||
|
bool tty_is_vc_resolve(const char *tty);
|
||||||
|
bool tty_is_console(const char *tty);
|
||||||
|
int vtnr_from_tty(const char *tty);
|
||||||
|
const char *default_term_for_tty(const char *tty);
|
||||||
|
|
||||||
|
void execute_directory(const char *directory, DIR *_d, char *argv[]);
|
||||||
|
|
||||||
|
int kill_and_sigcont(pid_t pid, int sig);
|
||||||
|
|
||||||
|
bool nulstr_contains(const char*nulstr, const char *needle);
|
||||||
|
|
||||||
|
bool plymouth_running(void);
|
||||||
|
|
||||||
|
void parse_syslog_priority(char **p, int *priority);
|
||||||
|
void skip_syslog_pid(char **buf);
|
||||||
|
void skip_syslog_date(char **buf);
|
||||||
|
|
||||||
|
bool hostname_is_valid(const char *s);
|
||||||
|
char* hostname_cleanup(char *s);
|
||||||
|
|
||||||
|
char* strshorten(char *s, size_t l);
|
||||||
|
|
||||||
|
int terminal_vhangup_fd(int fd);
|
||||||
|
int terminal_vhangup(const char *name);
|
||||||
|
|
||||||
|
int vt_disallocate(const char *name);
|
||||||
|
|
||||||
|
int copy_file(const char *from, const char *to);
|
||||||
|
int symlink_or_copy(const char *from, const char *to);
|
||||||
|
int symlink_or_copy_atomic(const char *from, const char *to);
|
||||||
|
|
||||||
|
int fchmod_umask(int fd, mode_t mode);
|
||||||
|
|
||||||
|
bool display_is_local(const char *display);
|
||||||
|
int socket_from_display(const char *display, char **path);
|
||||||
|
|
||||||
|
int get_user_creds(const char **username, uid_t *uid, gid_t *gid, const char **home);
|
||||||
|
int get_group_creds(const char **groupname, gid_t *gid);
|
||||||
|
|
||||||
|
int in_group(const char *name);
|
||||||
|
|
||||||
|
int glob_exists(const char *path);
|
||||||
|
|
||||||
|
int dirent_ensure_type(DIR *d, struct dirent *de);
|
||||||
|
|
||||||
|
int in_search_path(const char *path, char **search);
|
||||||
|
int get_files_in_directory(const char *path, char ***list);
|
||||||
|
|
||||||
|
char *join(const char *x, ...) _sentinel_;
|
||||||
|
|
||||||
|
bool is_main_thread(void);
|
||||||
|
|
||||||
|
bool in_charset(const char *s, const char* charset);
|
||||||
|
|
||||||
|
int block_get_whole_disk(dev_t d, dev_t *ret);
|
||||||
|
|
||||||
|
int file_is_priv_sticky(const char *p);
|
||||||
|
|
||||||
|
int strdup_or_null(const char *a, char **b);
|
||||||
|
|
||||||
|
#define NULSTR_FOREACH(i, l) \
|
||||||
|
for ((i) = (l); (i) && *(i); (i) = strchr((i), 0)+1)
|
||||||
|
|
||||||
|
#define NULSTR_FOREACH_PAIR(i, j, l) \
|
||||||
|
for ((i) = (l), (j) = strchr((i), 0)+1; (i) && *(i); (i) = strchr((j), 0)+1, (j) = *(i) ? strchr((i), 0)+1 : (i))
|
||||||
|
|
||||||
|
const char *ioprio_class_to_string(int i);
|
||||||
|
int ioprio_class_from_string(const char *s);
|
||||||
|
|
||||||
|
const char *sigchld_code_to_string(int i);
|
||||||
|
int sigchld_code_from_string(const char *s);
|
||||||
|
|
||||||
|
const char *log_facility_unshifted_to_string(int i);
|
||||||
|
int log_facility_unshifted_from_string(const char *s);
|
||||||
|
|
||||||
|
const char *log_level_to_string(int i);
|
||||||
|
int log_level_from_string(const char *s);
|
||||||
|
|
||||||
|
const char *sched_policy_to_string(int i);
|
||||||
|
int sched_policy_from_string(const char *s);
|
||||||
|
|
||||||
|
const char *rlimit_to_string(int i);
|
||||||
|
int rlimit_from_string(const char *s);
|
||||||
|
|
||||||
|
const char *ip_tos_to_string(int i);
|
||||||
|
int ip_tos_from_string(const char *s);
|
||||||
|
|
||||||
|
const char *signal_to_string(int i);
|
||||||
|
int signal_from_string(const char *s);
|
||||||
|
|
||||||
|
int signal_from_string_try_harder(const char *s);
|
||||||
|
|
||||||
|
extern int saved_argc;
|
||||||
|
extern char **saved_argv;
|
||||||
|
|
||||||
|
bool kexec_loaded(void);
|
||||||
|
|
||||||
|
int prot_from_flags(int flags);
|
||||||
|
|
||||||
|
char *format_bytes(char *buf, size_t l, off_t t);
|
||||||
|
|
||||||
|
int fd_wait_for_event(int fd, int event, usec_t timeout);
|
||||||
|
|
||||||
|
void* memdup(const void *p, size_t l);
|
||||||
|
|
||||||
|
int is_kernel_thread(pid_t pid);
|
||||||
|
|
||||||
|
static inline void freep(void *p) {
|
||||||
|
free(*(void**) p);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void fclosep(FILE **f) {
|
||||||
|
if (*f)
|
||||||
|
fclose(*f);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void pclosep(FILE **f) {
|
||||||
|
if (*f)
|
||||||
|
pclose(*f);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void closep(int *fd) {
|
||||||
|
if (*fd >= 0)
|
||||||
|
close_nointr_nofail(*fd);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void closedirp(DIR **d) {
|
||||||
|
if (*d)
|
||||||
|
closedir(*d);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void umaskp(mode_t *u) {
|
||||||
|
umask(*u);
|
||||||
|
}
|
||||||
|
|
||||||
|
#define _cleanup_free_ _cleanup_(freep)
|
||||||
|
#define _cleanup_fclose_ _cleanup_(fclosep)
|
||||||
|
#define _cleanup_pclose_ _cleanup_(pclosep)
|
||||||
|
#define _cleanup_close_ _cleanup_(closep)
|
||||||
|
#define _cleanup_closedir_ _cleanup_(closedirp)
|
||||||
|
#define _cleanup_umask_ _cleanup_(umaskp)
|
||||||
|
#define _cleanup_globfree_ _cleanup_(globfree)
|
||||||
|
|
||||||
|
int fd_inc_sndbuf(int fd, size_t n);
|
||||||
|
int fd_inc_rcvbuf(int fd, size_t n);
|
||||||
|
|
||||||
|
int fork_agent(pid_t *pid, const int except[], unsigned n_except, const char *path, ...);
|
||||||
|
|
||||||
|
int setrlimit_closest(int resource, const struct rlimit *rlim);
|
||||||
|
|
||||||
|
int getenv_for_pid(pid_t pid, const char *field, char **_value);
|
||||||
|
|
||||||
|
int can_sleep(const char *type);
|
||||||
|
|
||||||
|
bool is_valid_documentation_url(const char *url);
|
||||||
|
|
||||||
|
bool in_initrd(void);
|
||||||
|
|
||||||
|
void warn_melody(void);
|
||||||
|
|
||||||
|
char *strjoin(const char *x, ...) _sentinel_;
|
||||||
|
|
||||||
|
#define DEFINE_TRIVIAL_CLEANUP_FUNC(type, func) \
|
||||||
|
static inline void func##p(type *p) { \
|
||||||
|
if (*p) \
|
||||||
|
func(*p); \
|
||||||
|
} \
|
||||||
|
struct __useless_struct_to_allow_trailing_semicolon__
|
||||||
|
|
||||||
|
char *split_quoted(const char *c, size_t *l, char **state);
|
||||||
|
char *cunescape_length(const char *s, size_t length);
|
||||||
|
int unhexchar(char c) _const_;
|
||||||
|
int unoctchar(char c) _const_;
|
||||||
|
|
||||||
|
#endif
|
||||||
54
logtee.c
Normal file
54
logtee.c
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
#define _GNU_SOURCE
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <limits.h>
|
||||||
|
|
||||||
|
#define BUFLEN 4096
|
||||||
|
|
||||||
|
int
|
||||||
|
main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
int fd;
|
||||||
|
int len, slen;
|
||||||
|
|
||||||
|
if (argc != 2) {
|
||||||
|
fprintf(stderr, "Usage: %s <file>\n", argv[0]);
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
|
||||||
|
fd = open(argv[1], O_WRONLY | O_CREAT | O_TRUNC, 0644);
|
||||||
|
if (fd == -1) {
|
||||||
|
perror("open");
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
|
||||||
|
fprintf(stderr, "Logging to %s: ", argv[1]);
|
||||||
|
|
||||||
|
slen = 0;
|
||||||
|
|
||||||
|
do {
|
||||||
|
len = splice(STDIN_FILENO, NULL, fd, NULL,
|
||||||
|
BUFLEN, SPLICE_F_MOVE);
|
||||||
|
|
||||||
|
if (len < 0) {
|
||||||
|
if (errno == EAGAIN)
|
||||||
|
continue;
|
||||||
|
perror("tee");
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
} else
|
||||||
|
if (len == 0)
|
||||||
|
break;
|
||||||
|
slen += len;
|
||||||
|
if ((slen/BUFLEN) > 0) {
|
||||||
|
fprintf(stderr, ".");
|
||||||
|
}
|
||||||
|
slen = slen % BUFLEN;
|
||||||
|
|
||||||
|
} while (1);
|
||||||
|
close(fd);
|
||||||
|
fprintf(stderr, "\n");
|
||||||
|
exit(EXIT_SUCCESS);
|
||||||
|
}
|
||||||
60
lsinitrd-bash-completion.sh
Normal file
60
lsinitrd-bash-completion.sh
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
#
|
||||||
|
# Copyright 2013 Red Hat, Inc. All rights reserved.
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
|
||||||
|
__contains_word () {
|
||||||
|
local word=$1; shift
|
||||||
|
for w in $*; do [[ $w = $word ]] && return 0; done
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
_lsinitrd() {
|
||||||
|
local field_vals= cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
|
||||||
|
local -A OPTS=(
|
||||||
|
[STANDALONE]='-s --size -h --help'
|
||||||
|
|
||||||
|
[ARG]='-f --file -k --kver'
|
||||||
|
)
|
||||||
|
|
||||||
|
if __contains_word "$prev" ${OPTS[ARG]}; then
|
||||||
|
case $prev in
|
||||||
|
--file|-f)
|
||||||
|
comps=$(compgen -f -- "$cur")
|
||||||
|
compopt -o filenames
|
||||||
|
;;
|
||||||
|
--kver|-k)
|
||||||
|
comps=$(cd /lib/modules; echo [0-9]*)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $cur = -* ]]; then
|
||||||
|
COMPREPLY=( $(compgen -W '${OPTS[*]}' -- "$cur") )
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
comps=$(compgen -f -- "$cur")
|
||||||
|
compopt -o filenames
|
||||||
|
COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
complete -F _lsinitrd lsinitrd
|
||||||
67
lsinitrd.1.asc
Normal file
67
lsinitrd.1.asc
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
LSINITRD(1)
|
||||||
|
=========
|
||||||
|
:doctype: manpage
|
||||||
|
:man source: dracut
|
||||||
|
:man manual: dracut
|
||||||
|
|
||||||
|
NAME
|
||||||
|
----
|
||||||
|
lsinitrd - tool to show the contents of an initramfs image
|
||||||
|
|
||||||
|
SYNOPSIS
|
||||||
|
--------
|
||||||
|
*lsinitrd* ['OPTION...'] [<image> [<filename> [<filename> [...] ]]]
|
||||||
|
|
||||||
|
*lsinitrd* ['OPTION...'] -k <kernel-version>
|
||||||
|
|
||||||
|
DESCRIPTION
|
||||||
|
-----------
|
||||||
|
lsinitrd shows the contents of an initramfs image. if <image> is omitted, then
|
||||||
|
lsinitrd uses the default image _/boot/<machine-id>/<kernel-version>/initrd_ or
|
||||||
|
_/boot/initramfs-<kernel-version>.img_.
|
||||||
|
|
||||||
|
OPTIONS
|
||||||
|
-------
|
||||||
|
**-h, --help**::
|
||||||
|
print a help message and exit.
|
||||||
|
|
||||||
|
**-s, --size**::
|
||||||
|
sort the contents of the initramfs by size.
|
||||||
|
|
||||||
|
**-f, --file** _<filename>_::
|
||||||
|
print the contents of <filename>.
|
||||||
|
|
||||||
|
**-k, --kver** _<kernel version>_::
|
||||||
|
inspect the initramfs of <kernel version>.
|
||||||
|
|
||||||
|
**-m, --mod**::
|
||||||
|
list dracut modules included of the initramfs image.
|
||||||
|
|
||||||
|
**--unpack**::
|
||||||
|
unpack the initramfs to the current directory, instead of displaying the contents.
|
||||||
|
If optional filenames are given, will only unpack specified files, else the whole image will be unpacked.
|
||||||
|
Won't unpack anything from early cpio part.
|
||||||
|
|
||||||
|
**--unpackearly**::
|
||||||
|
unpack the early microcode initramfs to the current directory, instead of displaying the contents.
|
||||||
|
Same as --unpack, but only unpack files from early cpio part.
|
||||||
|
|
||||||
|
**-v, --verbose**::
|
||||||
|
unpack verbosely
|
||||||
|
|
||||||
|
AVAILABILITY
|
||||||
|
------------
|
||||||
|
The lsinitrd command is part of the dracut package and is available from
|
||||||
|
link:$$https://dracut.wiki.kernel.org$$[https://dracut.wiki.kernel.org]
|
||||||
|
|
||||||
|
AUTHORS
|
||||||
|
-------
|
||||||
|
Harald Hoyer
|
||||||
|
|
||||||
|
Amerigo Wang
|
||||||
|
|
||||||
|
Nikoli
|
||||||
|
|
||||||
|
SEE ALSO
|
||||||
|
--------
|
||||||
|
*dracut*(8)
|
||||||
293
lsinitrd.sh
Executable file
293
lsinitrd.sh
Executable file
@@ -0,0 +1,293 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Copyright 2005-2010 Harald Hoyer <harald@redhat.com>
|
||||||
|
# Copyright 2005-2010 Red Hat, Inc. All rights reserved.
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
|
||||||
|
usage()
|
||||||
|
{
|
||||||
|
{
|
||||||
|
echo "Usage: ${0##*/} [options] [<initramfs file> [<filename> [<filename> [...] ]]]"
|
||||||
|
echo "Usage: ${0##*/} [options] -k <kernel version>"
|
||||||
|
echo
|
||||||
|
echo "-h, --help print a help message and exit."
|
||||||
|
echo "-s, --size sort the contents of the initramfs by size."
|
||||||
|
echo "-m, --mod list modules."
|
||||||
|
echo "-f, --file <filename> print the contents of <filename>."
|
||||||
|
echo "--unpack unpack the initramfs, instead of displaying the contents."
|
||||||
|
echo " If optional filenames are given, will only unpack specified files,"
|
||||||
|
echo " else the whole image will be unpacked. Won't unpack anything from early cpio part."
|
||||||
|
echo "--unpackearly unpack the early microcode part of the initramfs."
|
||||||
|
echo " Same as --unpack, but only unpack files from early cpio part."
|
||||||
|
echo "-v, --verbose unpack verbosely."
|
||||||
|
echo "-k, --kver <kernel version> inspect the initramfs of <kernel version>."
|
||||||
|
echo
|
||||||
|
} >&2
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
[[ $dracutbasedir ]] || dracutbasedir=/usr/lib/dracut
|
||||||
|
|
||||||
|
sorted=0
|
||||||
|
modules=0
|
||||||
|
unset verbose
|
||||||
|
declare -A filenames
|
||||||
|
|
||||||
|
unset POSIXLY_CORRECT
|
||||||
|
TEMP=$(getopt \
|
||||||
|
-o "vshmf:k:" \
|
||||||
|
--long kver: \
|
||||||
|
--long file: \
|
||||||
|
--long mod \
|
||||||
|
--long help \
|
||||||
|
--long size \
|
||||||
|
--long unpack \
|
||||||
|
--long unpackearly \
|
||||||
|
--long verbose \
|
||||||
|
-- "$@")
|
||||||
|
|
||||||
|
if (( $? != 0 )); then
|
||||||
|
usage
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
eval set -- "$TEMP"
|
||||||
|
|
||||||
|
while (($# > 0)); do
|
||||||
|
case $1 in
|
||||||
|
-k|--kver) KERNEL_VERSION="$2"; shift;;
|
||||||
|
-f|--file) filenames[${2#/}]=1; shift;;
|
||||||
|
-s|--size) sorted=1;;
|
||||||
|
-h|--help) usage; exit 0;;
|
||||||
|
-m|--mod) modules=1;;
|
||||||
|
-v|--verbose) verbose="--verbose";;
|
||||||
|
--unpack) unpack=1;;
|
||||||
|
--unpackearly) unpackearly=1;;
|
||||||
|
--) shift;break;;
|
||||||
|
*) usage; exit 1;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
[[ $KERNEL_VERSION ]] || KERNEL_VERSION="$(uname -r)"
|
||||||
|
|
||||||
|
if [[ $1 ]]; then
|
||||||
|
image="$1"
|
||||||
|
if ! [[ -f "$image" ]]; then
|
||||||
|
{
|
||||||
|
echo "$image does not exist"
|
||||||
|
echo
|
||||||
|
} >&2
|
||||||
|
usage
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
[[ -f /etc/machine-id ]] && read MACHINE_ID < /etc/machine-id
|
||||||
|
|
||||||
|
if [[ -d /boot/loader/entries || -L /boot/loader/entries ]] \
|
||||||
|
&& [[ $MACHINE_ID ]] \
|
||||||
|
&& [[ -d /boot/${MACHINE_ID} || -L /boot/${MACHINE_ID} ]] ; then
|
||||||
|
image="/boot/${MACHINE_ID}/${KERNEL_VERSION}/initrd"
|
||||||
|
else
|
||||||
|
image="/boot/initramfs-${KERNEL_VERSION}.img"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
shift
|
||||||
|
while (($# > 0)); do
|
||||||
|
filenames[${1#/}]=1;
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if ! [[ -f "$image" ]]; then
|
||||||
|
{
|
||||||
|
echo "No <initramfs file> specified and the default image '$image' cannot be accessed!"
|
||||||
|
echo
|
||||||
|
} >&2
|
||||||
|
usage
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
dracutlibdirs() {
|
||||||
|
for d in lib64/dracut lib/dracut usr/lib64/dracut usr/lib/dracut; do
|
||||||
|
echo "$d/$1"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
extract_files()
|
||||||
|
{
|
||||||
|
(( ${#filenames[@]} == 1 )) && nofileinfo=1
|
||||||
|
for f in "${!filenames[@]}"; do
|
||||||
|
[[ $nofileinfo ]] || echo "initramfs:/$f"
|
||||||
|
[[ $nofileinfo ]] || echo "========================================================================"
|
||||||
|
$CAT "$image" 2>/dev/null | cpio --extract --verbose --quiet --to-stdout "$f" 2>/dev/null
|
||||||
|
((ret+=$?))
|
||||||
|
[[ $nofileinfo ]] || echo "========================================================================"
|
||||||
|
[[ $nofileinfo ]] || echo
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
list_modules()
|
||||||
|
{
|
||||||
|
echo "dracut modules:"
|
||||||
|
$CAT "$image" | cpio --extract --verbose --quiet --to-stdout -- \
|
||||||
|
$(dracutlibdirs modules.txt) 2>/dev/null
|
||||||
|
((ret+=$?))
|
||||||
|
}
|
||||||
|
|
||||||
|
list_files()
|
||||||
|
{
|
||||||
|
echo "========================================================================"
|
||||||
|
if [ "$sorted" -eq 1 ]; then
|
||||||
|
$CAT "$image" 2>/dev/null | cpio --extract --verbose --quiet --list | sort -n -k5
|
||||||
|
else
|
||||||
|
$CAT "$image" 2>/dev/null | cpio --extract --verbose --quiet --list | sort -k9
|
||||||
|
fi
|
||||||
|
((ret+=$?))
|
||||||
|
echo "========================================================================"
|
||||||
|
}
|
||||||
|
|
||||||
|
unpack_files()
|
||||||
|
{
|
||||||
|
if (( ${#filenames[@]} > 0 )); then
|
||||||
|
for f in "${!filenames[@]}"; do
|
||||||
|
$CAT "$image" 2>/dev/null | cpio -id --quiet $verbose $f
|
||||||
|
((ret+=$?))
|
||||||
|
done
|
||||||
|
else
|
||||||
|
$CAT "$image" 2>/dev/null | cpio -id --quiet $verbose
|
||||||
|
((ret+=$?))
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (( ${#filenames[@]} <= 0 )) && [[ -z "$unpack" ]] && [[ -z "$unpackearly" ]]; then
|
||||||
|
echo "Image: $image: $(du -h $image | while read a b || [ -n "$a" ]; do echo $a;done)"
|
||||||
|
echo "========================================================================"
|
||||||
|
fi
|
||||||
|
|
||||||
|
read -N 6 bin < "$image"
|
||||||
|
case $bin in
|
||||||
|
$'\x71\xc7'*|070701)
|
||||||
|
CAT="cat --"
|
||||||
|
is_early=$(cpio --extract --verbose --quiet --to-stdout -- 'early_cpio' < "$image" 2>/dev/null)
|
||||||
|
if [[ "$is_early" ]]; then
|
||||||
|
if [[ -n "$unpack" ]]; then
|
||||||
|
# should use --unpackearly for early CPIO
|
||||||
|
:
|
||||||
|
elif [[ -n "$unpackearly" ]]; then
|
||||||
|
unpack_files
|
||||||
|
elif (( ${#filenames[@]} > 0 )); then
|
||||||
|
extract_files
|
||||||
|
else
|
||||||
|
echo "Early CPIO image"
|
||||||
|
list_files
|
||||||
|
fi
|
||||||
|
if [[ -d "$dracutbasedir/skipcpio" ]]; then
|
||||||
|
SKIP="$dracutbasedir/skipcpio/skipcpio"
|
||||||
|
else
|
||||||
|
SKIP="$dracutbasedir/skipcpio"
|
||||||
|
fi
|
||||||
|
if ! [[ -x $SKIP ]]; then
|
||||||
|
echo
|
||||||
|
echo "'$SKIP' not found, cannot display remaining contents!" >&2
|
||||||
|
echo
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [[ $SKIP ]] ; then
|
||||||
|
bin="$($SKIP "$image" | { read -N 6 bin && echo "$bin" ; })"
|
||||||
|
else
|
||||||
|
read -N 6 bin < "$image"
|
||||||
|
fi
|
||||||
|
case $bin in
|
||||||
|
$'\x1f\x8b'*)
|
||||||
|
CAT="zcat --"
|
||||||
|
;;
|
||||||
|
BZh*)
|
||||||
|
CAT="bzcat --"
|
||||||
|
;;
|
||||||
|
$'\x71\xc7'*|070701)
|
||||||
|
CAT="cat --"
|
||||||
|
;;
|
||||||
|
$'\x02\x21'*)
|
||||||
|
CAT="lz4 -d -c"
|
||||||
|
;;
|
||||||
|
$'\x89'LZO$'\0'*)
|
||||||
|
CAT="lzop -d -c"
|
||||||
|
;;
|
||||||
|
$'\x28\xB5\x2F\xFD'*)
|
||||||
|
CAT="zstd -d -c"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
if echo "test"|xz|xzcat --single-stream >/dev/null 2>&1; then
|
||||||
|
CAT="xzcat --single-stream --"
|
||||||
|
else
|
||||||
|
CAT="xzcat --"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
skipcpio()
|
||||||
|
{
|
||||||
|
$SKIP "$@" | $ORIG_CAT
|
||||||
|
}
|
||||||
|
|
||||||
|
if [[ $SKIP ]]; then
|
||||||
|
ORIG_CAT="$CAT"
|
||||||
|
CAT=skipcpio
|
||||||
|
fi
|
||||||
|
|
||||||
|
if (( ${#filenames[@]} > 1 )); then
|
||||||
|
TMPFILE="$(mktemp -t --suffix=.cpio lsinitrd.XXXXXX)"
|
||||||
|
$CAT "$image" 2>/dev/null > $TMPFILE
|
||||||
|
trap "rm -f '$TMPFILE'" EXIT
|
||||||
|
pre_decompress()
|
||||||
|
{
|
||||||
|
cat $TMPFILE
|
||||||
|
}
|
||||||
|
CAT=pre_decompress
|
||||||
|
fi
|
||||||
|
|
||||||
|
ret=0
|
||||||
|
|
||||||
|
if [[ -n "$unpack" ]]; then
|
||||||
|
unpack_files
|
||||||
|
elif (( ${#filenames[@]} > 0 )); then
|
||||||
|
extract_files
|
||||||
|
else
|
||||||
|
version=$($CAT "$image" | cpio --extract --verbose --quiet --to-stdout -- \
|
||||||
|
$(dracutlibdirs 'dracut-*') 2>/dev/null)
|
||||||
|
((ret+=$?))
|
||||||
|
echo "Version: $version"
|
||||||
|
echo
|
||||||
|
if [ "$modules" -eq 1 ]; then
|
||||||
|
list_modules
|
||||||
|
echo "========================================================================"
|
||||||
|
else
|
||||||
|
echo -n "Arguments: "
|
||||||
|
$CAT "$image" | cpio --extract --verbose --quiet --to-stdout -- \
|
||||||
|
$(dracutlibdirs build-parameter.txt) 2>/dev/null
|
||||||
|
echo
|
||||||
|
list_modules
|
||||||
|
list_files
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit $ret
|
||||||
226
mkinitrd-dracut.sh
Executable file
226
mkinitrd-dracut.sh
Executable file
@@ -0,0 +1,226 @@
|
|||||||
|
#!/bin/bash --norc
|
||||||
|
kver=$(uname -r)
|
||||||
|
|
||||||
|
boot_dir="/boot"
|
||||||
|
quiet=0
|
||||||
|
host_only=0
|
||||||
|
force=0
|
||||||
|
|
||||||
|
error() { echo "$@" >&2; }
|
||||||
|
|
||||||
|
usage () {
|
||||||
|
[[ $1 = '-n' ]] && cmd=echo || cmd=error
|
||||||
|
|
||||||
|
$cmd "usage: ${0##*/} [--version] [--help] [-v] [-f] [--preload <module>]"
|
||||||
|
$cmd " [--image-version] [--with=<module>]"
|
||||||
|
$cmd " [--nocompress]"
|
||||||
|
$cmd " <initrd-image> <kernel-version>"
|
||||||
|
$cmd ""
|
||||||
|
$cmd " (ex: ${0##*/} /boot/initramfs-$kver.img $kver)"
|
||||||
|
|
||||||
|
[[ $1 = '-n' ]] && exit 0
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Little helper function for reading args from the commandline.
|
||||||
|
# it automatically handles -a b and -a=b variants, and returns 1 if
|
||||||
|
# we need to shift $3.
|
||||||
|
read_arg() {
|
||||||
|
# $1 = arg name
|
||||||
|
# $2 = arg value
|
||||||
|
# $3 = arg parameter
|
||||||
|
param="$1"
|
||||||
|
local rematch='^[^=]*=(.*)$' result
|
||||||
|
if [[ $2 =~ $rematch ]]; then
|
||||||
|
read "$param" <<< "${BASH_REMATCH[1]}"
|
||||||
|
else
|
||||||
|
for ((i=3; $i <= $#; i++)); do
|
||||||
|
# Only read next arg if it not an arg itself.
|
||||||
|
if [[ ${@:$i:1} = -* ]];then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
result="$result ${@:$i:1}"
|
||||||
|
# There is no way to shift our callers args, so
|
||||||
|
# return "no of args" to indicate they should do it instead.
|
||||||
|
done
|
||||||
|
read "$1" <<< "$result"
|
||||||
|
return $(($i - 3))
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Taken over from SUSE mkinitrd
|
||||||
|
default_kernel_images() {
|
||||||
|
local regex kernel_image kernel_version version_version initrd_image
|
||||||
|
local qf='%{NAME}-%{VERSION}-%{RELEASE}\n'
|
||||||
|
|
||||||
|
case "$(uname -m)" in
|
||||||
|
s390|s390x)
|
||||||
|
regex='image'
|
||||||
|
;;
|
||||||
|
ppc|ppc64)
|
||||||
|
regex='vmlinux'
|
||||||
|
;;
|
||||||
|
i386|x86_64)
|
||||||
|
regex='vmlinuz'
|
||||||
|
;;
|
||||||
|
arm*)
|
||||||
|
regex='[uz]Image'
|
||||||
|
;;
|
||||||
|
aarch64)
|
||||||
|
regex='Image'
|
||||||
|
;;
|
||||||
|
*) regex='vmlinu.'
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# user mode linux
|
||||||
|
if grep -q UML /proc/cpuinfo; then
|
||||||
|
regex='linux'
|
||||||
|
fi
|
||||||
|
|
||||||
|
kernel_images=""
|
||||||
|
initrd_images=""
|
||||||
|
for kernel_image in $(ls $boot_dir \
|
||||||
|
| sed -ne "\|^$regex\(-[0-9.]\+-[0-9]\+-[a-z0-9]\+$\)\?|p" \
|
||||||
|
| grep -v kdump$ ) ; do
|
||||||
|
|
||||||
|
# Note that we cannot check the RPM database here -- this
|
||||||
|
# script is itself called from within the binary kernel
|
||||||
|
# packages, and rpm does not allow recursive calls.
|
||||||
|
|
||||||
|
[ -L "$boot_dir/$kernel_image" ] && continue
|
||||||
|
[ "${kernel_image%%.gz}" != "$kernel_image" ] && continue
|
||||||
|
kernel_version=$(/usr/bin/get_kernel_version \
|
||||||
|
$boot_dir/$kernel_image 2> /dev/null)
|
||||||
|
initrd_image=$(echo $kernel_image | sed -e "s|${regex}|initrd|")
|
||||||
|
if [ "$kernel_image" != "$initrd_image" -a \
|
||||||
|
-n "$kernel_version" -a \
|
||||||
|
-d "/lib/modules/$kernel_version" ]; then
|
||||||
|
kernel_images="$kernel_images $boot_dir/$kernel_image"
|
||||||
|
initrd_images="$initrd_images $boot_dir/$initrd_image"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
for kernel_image in $kernel_images;do
|
||||||
|
kernels="$kernels ${kernel_image#*-}"
|
||||||
|
done
|
||||||
|
for initrd_image in $initrd_images;do
|
||||||
|
targets="$targets $initrd_image"
|
||||||
|
done
|
||||||
|
host_only=1
|
||||||
|
force=1
|
||||||
|
}
|
||||||
|
|
||||||
|
while (($# > 0)); do
|
||||||
|
case ${1%%=*} in
|
||||||
|
--with-usb) read_arg usbmodule "$@" || shift $?
|
||||||
|
basicmodules="$basicmodules ${usbmodule:-usb-storage}"
|
||||||
|
unset usbmodule;;
|
||||||
|
--with-avail) read_arg modname "$@" || shift $?
|
||||||
|
basicmodules="$basicmodules $modname";;
|
||||||
|
--with) read_arg modname "$@" || shift $?
|
||||||
|
basicmodules="$basicmodules $modname";;
|
||||||
|
--version)
|
||||||
|
echo "mkinitrd: dracut compatibility wrapper"
|
||||||
|
exit 0;;
|
||||||
|
-v|--verbose) dracut_args="${dracut_args} -v";;
|
||||||
|
-f|--force) force=1;;
|
||||||
|
--preload) read_arg modname "$@" || shift $?
|
||||||
|
basicmodules="$basicmodules $modname";;
|
||||||
|
--image-version) img_vers=yes;;
|
||||||
|
--rootfs|-d) read_arg rootfs "$@" || shift $?
|
||||||
|
dracut_args="${dracut_args} --filesystems $rootfs";;
|
||||||
|
--nocompress) dracut_args="$dracut_args --no-compress";;
|
||||||
|
--help) usage -n;;
|
||||||
|
--builtin) ;;
|
||||||
|
--without*) ;;
|
||||||
|
--without-usb) ;;
|
||||||
|
--fstab*) ;;
|
||||||
|
--ifneeded) ;;
|
||||||
|
--omit-scsi-modules) ;;
|
||||||
|
--omit-ide-modules) ;;
|
||||||
|
--omit-raid-modules) ;;
|
||||||
|
--omit-lvm-modules) ;;
|
||||||
|
--omit-dmraid) ;;
|
||||||
|
--allow-missing) ;;
|
||||||
|
--net-dev*) ;;
|
||||||
|
--noresume) ;;
|
||||||
|
--rootdev*) ;;
|
||||||
|
--thawdev*) ;;
|
||||||
|
--rootopts*) ;;
|
||||||
|
--root*) ;;
|
||||||
|
--loopdev*) ;;
|
||||||
|
--loopfs*) ;;
|
||||||
|
--loopopts*) ;;
|
||||||
|
--looppath*) ;;
|
||||||
|
--dsdt*) ;;
|
||||||
|
--bootchart) ;;
|
||||||
|
-s) ;;
|
||||||
|
--quiet|-q) quiet=1;;
|
||||||
|
-b) read_arg boot_dir "$@" || shift $?
|
||||||
|
if [ ! -d $boot_dir ];then
|
||||||
|
error "Boot directory $boot_dir does not exist"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
-k) # Would be nice to get a list of images here
|
||||||
|
read_arg kernel_images "$@" || shift $?
|
||||||
|
for kernel_image in $kernel_images;do
|
||||||
|
kernels="$kernels ${kernel_image#*-}"
|
||||||
|
done
|
||||||
|
host_only=1
|
||||||
|
force=1
|
||||||
|
;;
|
||||||
|
-i) read_arg initrd_images "$@" || shift $?
|
||||||
|
for initrd_image in $initrd_images;do
|
||||||
|
targets="$targets $boot_dir/$initrd_image"
|
||||||
|
done
|
||||||
|
;;
|
||||||
|
*) if [[ ! $targets ]]; then
|
||||||
|
targets=$1
|
||||||
|
elif [[ ! $kernels ]]; then
|
||||||
|
kernels=$1
|
||||||
|
else
|
||||||
|
usage
|
||||||
|
fi;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
[[ $targets && $kernels ]] || default_kernel_images
|
||||||
|
[[ $targets && $kernels ]] || (error "No kernel found in $boot_dir" && usage)
|
||||||
|
|
||||||
|
# We can have several targets/kernels, transform the list to an array
|
||||||
|
targets=( $targets )
|
||||||
|
[[ $kernels ]] && kernels=( $kernels )
|
||||||
|
|
||||||
|
[[ $host_only == 1 ]] && dracut_args="${dracut_args} -H"
|
||||||
|
[[ $force == 1 ]] && dracut_args="${dracut_args} -f"
|
||||||
|
|
||||||
|
echo "Creating: target|kernel|dracut args|basicmodules "
|
||||||
|
for ((i=0 ; $i<${#targets[@]} ; i++)); do
|
||||||
|
|
||||||
|
if [[ $img_vers ]];then
|
||||||
|
target="${targets[$i]}-${kernels[$i]}"
|
||||||
|
else
|
||||||
|
target="${targets[$i]}"
|
||||||
|
fi
|
||||||
|
kernel="${kernels[$i]}"
|
||||||
|
|
||||||
|
# Duplicate code: No way found how to redirect output based on $quiet
|
||||||
|
if [[ $quiet == 1 ]];then
|
||||||
|
echo "$target|$kernel|$dracut_args|$basicmodules"
|
||||||
|
if [[ $basicmodules ]]; then
|
||||||
|
dracut $dracut_args --add-drivers "$basicmodules" "$target" \
|
||||||
|
"$kernel" &>/dev/null
|
||||||
|
else
|
||||||
|
dracut $dracut_args "$target" "$kernel" &>/dev/null
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [[ $basicmodules ]]; then
|
||||||
|
dracut $dracut_args --add-drivers "$basicmodules" "$target" \
|
||||||
|
"$kernel"
|
||||||
|
else
|
||||||
|
dracut $dracut_args "$target" "$kernel"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
106
mkinitrd-suse.8.asc
Normal file
106
mkinitrd-suse.8.asc
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
MKINITRD(8)
|
||||||
|
===========
|
||||||
|
:doctype: manpage
|
||||||
|
:man source: dracut
|
||||||
|
:man manual: dracut
|
||||||
|
|
||||||
|
NAME
|
||||||
|
----
|
||||||
|
mkinitrd-suse - is a compat wrapper, which calls dracut to generate an initramfs
|
||||||
|
|
||||||
|
SYNOPSIS
|
||||||
|
--------
|
||||||
|
*mkinitrd* ['OPTION...']
|
||||||
|
|
||||||
|
DESCRIPTION
|
||||||
|
-----------
|
||||||
|
*mkinitrd* creates an initramfs image <initrd-image> for the kernel with
|
||||||
|
version <kernel-version> by calling *dracut*.
|
||||||
|
|
||||||
|
[IMPORTANT]
|
||||||
|
This version of mkinitrd is provided for compatibility with older
|
||||||
|
versions of mkinitrd. If a more fine grained control over the
|
||||||
|
resulting image is needed, *dracut* should be called directly.
|
||||||
|
|
||||||
|
OPTIONS
|
||||||
|
-------
|
||||||
|
**-R, --version**::
|
||||||
|
print info about the version
|
||||||
|
|
||||||
|
**-k** _<kernel_list>_::
|
||||||
|
List of kernel images for which initrd files are created (relative
|
||||||
|
to _boot_dir_), Image name should begin with the following string,
|
||||||
|
defaults to _vmlinux_ on ppc/ppc64, _image_ on s390/s390x and _vmlinuz_
|
||||||
|
for everything else.
|
||||||
|
|
||||||
|
**-i** _<initrd_list>_::
|
||||||
|
List of file names (relative to _boot_dir_) for the initrd; positions
|
||||||
|
have to match the _kernel_list_. Defaults to _initrd_.
|
||||||
|
|
||||||
|
**-m** _<module_list>_::
|
||||||
|
Modules to include in initrd, defaults to _INITRD_MODULES_ variable
|
||||||
|
in */etc/sysconfig/kernel*.
|
||||||
|
|
||||||
|
**-f** _<feature_list>_::
|
||||||
|
Features to be enabled for the initrd. In general mkinitrd
|
||||||
|
configures the initrd for the root device it is started from. With
|
||||||
|
this option additional feature can be enabled.
|
||||||
|
|
||||||
|
**-b** _<bootdir>_::
|
||||||
|
Boot directory, defaults to */boot*, where the initrd is created.
|
||||||
|
|
||||||
|
**-d** _<root_device>_::
|
||||||
|
Root device, defaults to the device from which the root_dir is
|
||||||
|
mounted; overwrites the rootdev environment variable if set
|
||||||
|
|
||||||
|
**-s** _<size>_::
|
||||||
|
Add splash animation and bootscreen to initrd.
|
||||||
|
|
||||||
|
**-D** _<interface>::
|
||||||
|
Run dhcp on the specified interface (for example "eth0").
|
||||||
|
|
||||||
|
**-I** _<interface>::
|
||||||
|
Configure the specified interface statically.
|
||||||
|
|
||||||
|
**-a** _<acpi_dsdt>::
|
||||||
|
Attach compiled ACPI DSDT (Differentiated System Description Table)
|
||||||
|
to initrd. This replaces the DSDT of the BIOS. Defaults to the
|
||||||
|
_ACPI_DSDT_ variable in */etc/sysconfig/kernel*.
|
||||||
|
|
||||||
|
**-M** _<map>::
|
||||||
|
System.map file to use.
|
||||||
|
|
||||||
|
**-B**::
|
||||||
|
Don’t run the *update-bootloader(8)* script after the initrd(s) have
|
||||||
|
been created. This is useful if you call mkinitrd(8) for anything
|
||||||
|
else than the running system.
|
||||||
|
|
||||||
|
**-A**::
|
||||||
|
Create a so called "monster initrd" which includes all available
|
||||||
|
features and modules. This calls dracut with --no-hostonly and
|
||||||
|
--no-hostonly-cmdline parameters internally, instead of the default
|
||||||
|
--hostonly and --hostonly-cmdline.
|
||||||
|
|
||||||
|
**-v, --verbose**::
|
||||||
|
increase verbosity level
|
||||||
|
|
||||||
|
**-L**::
|
||||||
|
Disable logging to _/var/log/YaST2/mkinitrd.log_. This is useful for
|
||||||
|
testing if you don’t want to clutter the system log.
|
||||||
|
|
||||||
|
**--help**::
|
||||||
|
print a help message and exit.
|
||||||
|
|
||||||
|
AVAILABILITY
|
||||||
|
------------
|
||||||
|
The mkinitrd command is part of the dracut package and is available from
|
||||||
|
link:$$https://dracut.wiki.kernel.org$$[https://dracut.wiki.kernel.org]
|
||||||
|
|
||||||
|
AUTHORS
|
||||||
|
-------
|
||||||
|
Harald Hoyer, Hannes Reinecke
|
||||||
|
|
||||||
|
SEE ALSO
|
||||||
|
--------
|
||||||
|
*dracut*(8)
|
||||||
|
*update-bootloader*(8)
|
||||||
393
mkinitrd-suse.sh
Executable file
393
mkinitrd-suse.sh
Executable file
@@ -0,0 +1,393 @@
|
|||||||
|
#!/bin/bash --norc
|
||||||
|
#
|
||||||
|
# mkinitrd compability wrapper for SUSE.
|
||||||
|
#
|
||||||
|
# Copyright (c) 2013 SUSE Linux Products GmbH. All rights reserved.
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
|
||||||
|
boot_dir="/boot"
|
||||||
|
quiet=0
|
||||||
|
logfile=/var/log/YaST2/mkinitrd.log
|
||||||
|
dracut_cmd=dracut
|
||||||
|
|
||||||
|
error() { echo "$@" >&2; }
|
||||||
|
|
||||||
|
usage () {
|
||||||
|
[[ $1 = '-n' ]] && cmd=echo || cmd=error
|
||||||
|
|
||||||
|
$cmd "usage: ${0##*/} [options]"
|
||||||
|
$cmd ""
|
||||||
|
$cmd " Create initial ramdisk images that contain all kernel modules needed"
|
||||||
|
$cmd " in the early boot process, before the root file system becomes"
|
||||||
|
$cmd " available."
|
||||||
|
$cmd " This usually includes SCSI and/or RAID modules, a file system module"
|
||||||
|
$cmd " for the root file system, or a network interface driver module for dhcp."
|
||||||
|
$cmd ""
|
||||||
|
$cmd " options:"
|
||||||
|
$cmd " -f \"feature list\" Features to be enabled when generating initrd."
|
||||||
|
$cmd " Available features are:"
|
||||||
|
$cmd " iscsi, md, multipath, lvm, lvm2,"
|
||||||
|
$cmd " ifup, fcoe, dcbd"
|
||||||
|
$cmd " -k \"kernel list\" List of kernel images for which initrd files are"
|
||||||
|
$cmd " created. Defaults to all kernels found in /boot."
|
||||||
|
$cmd " -i \"initrd list\" List of file names for the initrd; position have"
|
||||||
|
$cmd " match to \"kernel list\". Defaults to all kernels"
|
||||||
|
$cmd " found in /boot."
|
||||||
|
$cmd " -b boot_dir Boot directory. Defaults to /boot."
|
||||||
|
$cmd " -t tmp_dir Temporary directory. Defaults to /var/tmp."
|
||||||
|
$cmd " -M map System.map file to use."
|
||||||
|
$cmd " -A Create a so called \"monster initrd\" which"
|
||||||
|
$cmd " includes all features and modules possible."
|
||||||
|
$cmd " -B Do not update bootloader configuration."
|
||||||
|
$cmd " -v Verbose mode."
|
||||||
|
$cmd " -L Disable logging."
|
||||||
|
$cmd " -h This help screen."
|
||||||
|
$cmd " -m \"module list\" Modules to include in initrd. Defaults to the"
|
||||||
|
$cmd " INITRD_MODULES variable in /etc/sysconfig/kernel"
|
||||||
|
$cmd " -u \"DomU module list\" Modules to include in initrd. Defaults to the"
|
||||||
|
$cmd " DOMU_INITRD_MODULES variable in"
|
||||||
|
$cmd " /etc/sysconfig/kernel."
|
||||||
|
$cmd " -d root_device Root device. Defaults to the device from"
|
||||||
|
$cmd " which / is mounted. Overrides the rootdev"
|
||||||
|
$cmd " enviroment variable if set."
|
||||||
|
$cmd " -j device Journal device"
|
||||||
|
$cmd " -D interface Run dhcp on the specified interface."
|
||||||
|
$cmd " -I interface Configure the specified interface statically."
|
||||||
|
$cmd " -a acpi_dsdt Obsolete, do not use."
|
||||||
|
$cmd " -s size Add splash animation and bootscreen to initrd."
|
||||||
|
|
||||||
|
[[ $1 = '-n' ]] && exit 0
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Little helper function for reading args from the commandline.
|
||||||
|
# it automatically handles -a b and -a=b variants, and returns 1 if
|
||||||
|
# we need to shift $3.
|
||||||
|
read_arg() {
|
||||||
|
# $1 = arg name
|
||||||
|
# $2 = arg value
|
||||||
|
# $3 = arg parameter
|
||||||
|
param="$1"
|
||||||
|
local rematch='^[^=]*=(.*)$' result
|
||||||
|
if [[ $2 =~ $rematch ]]; then
|
||||||
|
read "$param" <<< "${BASH_REMATCH[1]}"
|
||||||
|
else
|
||||||
|
for ((i=3; $i <= $#; i++)); do
|
||||||
|
# Only read next arg if it not an arg itself.
|
||||||
|
if [[ ${@:$i:1} = -* ]];then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
result="$result ${@:$i:1}"
|
||||||
|
# There is no way to shift our callers args, so
|
||||||
|
# return "no of args" to indicate they should do it instead.
|
||||||
|
done
|
||||||
|
read "$1" <<< "$result"
|
||||||
|
return $(($i - 3))
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Helper functions to calculate ipconfig command line
|
||||||
|
calc_netmask() {
|
||||||
|
local prefix=$1
|
||||||
|
|
||||||
|
[ -z "$prefix" ] && return
|
||||||
|
mask=$(( 0xffffffff << (32 - $prefix) ))
|
||||||
|
byte1=$(( mask >> 24 ))
|
||||||
|
byte2=$(( mask >> 16 ))
|
||||||
|
byte3=$(( mask >> 8 ))
|
||||||
|
byte4=$(( mask & 0xff ))
|
||||||
|
netmask=$(printf "%d.%d.%d.%d" $(( byte1 & 0xff )) $(( byte2 & 0xff )) $(( byte3 & 0xff )) $byte4);
|
||||||
|
|
||||||
|
echo $netmask
|
||||||
|
}
|
||||||
|
|
||||||
|
ipconfig() {
|
||||||
|
local interface=$1
|
||||||
|
local iplink macaddr broadcast gateway ipaddr prefix netmask
|
||||||
|
|
||||||
|
iplink=$(ip addr show dev $interface | sed -n 's/ *inet \(.*\) brd.*/\1/p')
|
||||||
|
macaddr=$(ip addr show dev $interface | sed -n 's/.*ether \(.*\) brd.*/\1/p')
|
||||||
|
broadcast=$(ip addr show dev $interface | sed -n 's/.*brd \(.*\) scope.*/\1/p')
|
||||||
|
gateway=$(ip route show dev $interface | sed -n 's/default via \([0-9\.]*\).*/\1/p')
|
||||||
|
|
||||||
|
ipaddr=${iplink%%/*}
|
||||||
|
prefix=${iplink##*/}
|
||||||
|
netmask=$(calc_netmask $prefix)
|
||||||
|
|
||||||
|
echo "${ipaddr}:${serveraddr}:${gateway}:${netmask}:${hostname}:${interface}:none::${macaddr}"
|
||||||
|
}
|
||||||
|
|
||||||
|
is_xen_kernel() {
|
||||||
|
local kversion=$1
|
||||||
|
local root_dir=$2
|
||||||
|
local cfg
|
||||||
|
|
||||||
|
for cfg in ${root_dir}/boot/config-$kversion $root_dir/lib/modules/$kversion/build/.config
|
||||||
|
do
|
||||||
|
test -r $cfg || continue
|
||||||
|
grep -q "^CONFIG_XEN=y\$" $cfg
|
||||||
|
return
|
||||||
|
done
|
||||||
|
test $kversion != "${kversion%-xen*}"
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
# kernel_image_gz_from_image() and kernel_version_from_image() are helpers
|
||||||
|
# for arm* kernels which produce zImage files which cannot be read from
|
||||||
|
# get_kernel_version -> get rid of this workaround if possible
|
||||||
|
kernel_image_gz_from_image() {
|
||||||
|
local arch=$(uname -i)
|
||||||
|
local r=${1}.gz
|
||||||
|
|
||||||
|
# uImage kernels can't be extracted directly. Use the vmlinux.gz instead
|
||||||
|
r=${r//uImage/vmlinux}
|
||||||
|
|
||||||
|
# on ARM a zImage can't be extracted directly. Other platforms define it
|
||||||
|
# as a gzipped vmlinux file, but not ARM. So only on ARM, use vmlinux.gz.
|
||||||
|
if [[ $arch =~ arm ]] || [[ $arch =~ aarch ]]; then
|
||||||
|
r=${r//zImage/vmlinux}
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo $r
|
||||||
|
}
|
||||||
|
|
||||||
|
kernel_version_from_image() {
|
||||||
|
local kernel_image="$1" kernel_image_gz=$(kernel_image_gz_from_image "$1")
|
||||||
|
|
||||||
|
if get_kernel_version "$kernel_image" 2>/dev/null; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
get_kernel_version "$kernel_image_gz" 2>/dev/null
|
||||||
|
}
|
||||||
|
|
||||||
|
# Taken over from SUSE mkinitrd
|
||||||
|
default_kernel_images() {
|
||||||
|
local regex kernel_image kernel_version version_version initrd_image
|
||||||
|
local qf='%{NAME}-%{VERSION}-%{RELEASE}\n'
|
||||||
|
|
||||||
|
case "$(uname -m)" in
|
||||||
|
s390|s390x)
|
||||||
|
regex='image'
|
||||||
|
;;
|
||||||
|
ppc|ppc64)
|
||||||
|
regex='vmlinux'
|
||||||
|
;;
|
||||||
|
i386|x86_64)
|
||||||
|
regex='vmlinuz'
|
||||||
|
;;
|
||||||
|
arm*)
|
||||||
|
regex='[uz]Image'
|
||||||
|
;;
|
||||||
|
aarch64)
|
||||||
|
regex='Image'
|
||||||
|
;;
|
||||||
|
*) regex='vmlinu.'
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
kernel_images=""
|
||||||
|
initrd_images=""
|
||||||
|
for kernel_image in $(ls $boot_dir \
|
||||||
|
| sed -ne "\|^$regex\(-[0-9.]\+-[0-9]\+-[a-z0-9]\+$\)\?|p" \
|
||||||
|
| grep -v kdump$ ) ; do
|
||||||
|
|
||||||
|
# Note that we cannot check the RPM database here -- this
|
||||||
|
# script is itself called from within the binary kernel
|
||||||
|
# packages, and rpm does not allow recursive calls.
|
||||||
|
|
||||||
|
[ -L "$boot_dir/$kernel_image" ] && continue
|
||||||
|
[ "${kernel_image%%.gz}" != "$kernel_image" ] && continue
|
||||||
|
|
||||||
|
kernel_version=$(kernel_version_from_image \
|
||||||
|
$boot_dir/$kernel_image 2> /dev/null)
|
||||||
|
initrd_image=$(echo $kernel_image | sed -e "s|${regex}|initrd|")
|
||||||
|
if [ "$kernel_image" != "$initrd_image" -a \
|
||||||
|
-n "$kernel_version" -a \
|
||||||
|
-d "/lib/modules/$kernel_version" ]; then
|
||||||
|
kernel_images="$kernel_images $boot_dir/$kernel_image"
|
||||||
|
initrd_images="$initrd_images $boot_dir/$initrd_image"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
for kernel_image in $kernel_images;do
|
||||||
|
kernels="$kernels ${kernel_image#*-}"
|
||||||
|
done
|
||||||
|
for initrd_image in $initrd_images;do
|
||||||
|
targets="$targets $initrd_image"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
while (($# > 0)); do
|
||||||
|
case ${1%%=*} in
|
||||||
|
-f) read_arg feature_list "$@" || shift $?
|
||||||
|
# Could be several features
|
||||||
|
;;
|
||||||
|
-k) # Would be nice to get a list of images here
|
||||||
|
read_arg kernel_images "$@" || shift $?
|
||||||
|
for kernel_image in $kernel_images;do
|
||||||
|
[ -L "/boot/$kernel_image" ] && kernel_image="$(readlink "/boot/$kernel_image")"
|
||||||
|
kernels="$kernels ${kernel_image#*-}"
|
||||||
|
done
|
||||||
|
;;
|
||||||
|
-i) read_arg initrd_images "$@" || shift $?
|
||||||
|
for initrd_image in $initrd_images;do
|
||||||
|
[ -L "/boot/$initrd_image" ] && initrd_image="$(readlink "/boot/$initrd_image")"
|
||||||
|
# Check if the initrd_image contains a path.
|
||||||
|
# if not, then add the default boot_dir
|
||||||
|
dname=`dirname $initrd_image`
|
||||||
|
if [ "$dname" == "." ]; then
|
||||||
|
targets="$targets $boot_dir/$initrd_image";
|
||||||
|
else
|
||||||
|
targets="$targets $initrd_image";
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
;;
|
||||||
|
-b) read_arg boot_dir "$@" || shift $?
|
||||||
|
if [ ! -d $boot_dir ];then
|
||||||
|
error "Boot directory $boot_dir does not exist"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
-t) read_arg tmp_dir "$@" || shift $?
|
||||||
|
dracut_args="${dracut_args} --tmpdir $tmp_dir"
|
||||||
|
;;
|
||||||
|
-M) read_arg map_file "$@" || shift $?
|
||||||
|
;;
|
||||||
|
-A) dracut_args="${dracut_args} --no-host-only";;
|
||||||
|
-B) skip_update_bootloader=1;;
|
||||||
|
-v|--verbose) dracut_args="${dracut_args} -v";;
|
||||||
|
-L) logfile=;;
|
||||||
|
-h|--help) usage -n;;
|
||||||
|
-m) read_arg module_list "$@" || shift $? ;;
|
||||||
|
-u) read_arg domu_module_list "$@" || shift $?
|
||||||
|
echo "mkinitrd: DomU modules not yet supported" ;;
|
||||||
|
-d) read_arg rootfs "$@" || shift $?
|
||||||
|
dracut_args="${dracut_args} --filesystems $rootfs" ;;
|
||||||
|
-D) read_arg dhcp_if "$@" || shift $?
|
||||||
|
dracut_cmdline="${dracut_cmdline} ip=${dhcp_if}:dhcp"
|
||||||
|
;;
|
||||||
|
-I) read_arg static_if "$@" || shift $?
|
||||||
|
dracut_cmdline="${dracut_cmdline} ip=$(ipconfig $static_if)":
|
||||||
|
;;
|
||||||
|
-a) read_arg acpi_dsdt "$@" || shift $?
|
||||||
|
echo "Obsolete -a param, use acpi_table_dir= and acpi_override= variables in /etc/dracut.conf.d/"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
-s) read_arg boot_splash "$@" || shift $?
|
||||||
|
echo "mkinitrd: boot splash not yet supported"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
-V) echo "mkinitrd: vendor scipts are no longer supported"
|
||||||
|
exit 1;;
|
||||||
|
--dracut)
|
||||||
|
read_arg dracut_cmd "$@" || shift $? ;;
|
||||||
|
--version|-R)
|
||||||
|
echo "mkinitrd: dracut compatibility wrapper"
|
||||||
|
exit 0;;
|
||||||
|
--quiet|-q) quiet=1;;
|
||||||
|
*) if [[ ! $targets ]]; then
|
||||||
|
targets=$1
|
||||||
|
elif [[ ! $kernels ]]; then
|
||||||
|
kernels=$1
|
||||||
|
else
|
||||||
|
usage
|
||||||
|
fi;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
[[ $targets && $kernels ]] || default_kernel_images
|
||||||
|
if [[ ! $targets || ! $kernels ]];then
|
||||||
|
error "No kernel found in $boot_dir or bad modules dir in /lib/modules"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# We can have several targets/kernels, transform the list to an array
|
||||||
|
targets=( $targets )
|
||||||
|
[[ $kernels ]] && kernels=( $kernels )
|
||||||
|
|
||||||
|
[[ $logfile ]] && dracut_args="${dracut_args} --logfile $logfile"
|
||||||
|
dracut_args="${dracut_args} --force"
|
||||||
|
|
||||||
|
[[ $dracut_cmdline ]] && dracut_args="${dracut_args} --kernel-cmdline ${dracut_cmdline}"
|
||||||
|
[ -z "$(type -p update-bootloader)" ] && skip_update_bootloader=1
|
||||||
|
|
||||||
|
# Update defaults from /etc/sysconfig/kernel
|
||||||
|
if [ -f /etc/sysconfig/kernel ] ; then
|
||||||
|
. /etc/sysconfig/kernel
|
||||||
|
fi
|
||||||
|
[[ $module_list ]] || module_list="${INITRD_MODULES}"
|
||||||
|
[[ $domu_module_list ]] || domu_module_list="${DOMU_INITRD_MODULES}"
|
||||||
|
shopt -s extglob
|
||||||
|
|
||||||
|
failed=""
|
||||||
|
|
||||||
|
for ((i=0 ; $i<${#targets[@]} ; i++)); do
|
||||||
|
|
||||||
|
if [[ $img_vers ]];then
|
||||||
|
target="${targets[$i]}-${kernels[$i]}"
|
||||||
|
else
|
||||||
|
target="${targets[$i]}"
|
||||||
|
fi
|
||||||
|
kernel="${kernels[$i]}"
|
||||||
|
|
||||||
|
if is_xen_kernel $kernel $rootfs ; then
|
||||||
|
modules_all="${module_list} ${domu_module_list}"
|
||||||
|
else
|
||||||
|
modules_all="${module_list}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove leading and trailing spaces needs (set above): shopt -s extglob
|
||||||
|
modules_all=${modules_all%%+([[:space:]])}
|
||||||
|
modules_all=${modules_all##+([[:space:]])}
|
||||||
|
|
||||||
|
echo "Creating initrd: $target"
|
||||||
|
|
||||||
|
# Duplicate code: No way found how to redirect output based on $quiet
|
||||||
|
if [[ $quiet == 1 ]];then
|
||||||
|
# Duplicate code: --force-drivers must not be called with empty string
|
||||||
|
# -> dracut bug workarounded ugly, because of complex whitespace
|
||||||
|
# expansion magics
|
||||||
|
if [ -n "${modules_all}" ];then
|
||||||
|
$dracut_cmd $dracut_args --force-drivers "${modules_all}" "$target" "$kernel" &>/dev/null
|
||||||
|
[ $? -ne 0 ] && failed="$failed $target"
|
||||||
|
else
|
||||||
|
$dracut_cmd $dracut_args "$target" "$kernel" &>/dev/null
|
||||||
|
[ $? -ne 0 ] && failed="$failed $target"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [ -n "${modules_all}" ];then
|
||||||
|
$dracut_cmd $dracut_args --force-drivers "${modules_all}" "$target" "$kernel"
|
||||||
|
[ $? -ne 0 ] && failed="$failed $target"
|
||||||
|
else
|
||||||
|
$dracut_cmd $dracut_args "$target" "$kernel"
|
||||||
|
[ $? -ne 0 ] && failed="$failed $target"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ "$skip_update_bootloader" ] ; then
|
||||||
|
echo 2>&1 "Did not refresh the bootloader. You might need to refresh it manually."
|
||||||
|
else
|
||||||
|
update-bootloader --refresh
|
||||||
|
[ $? -ne 0 ] && echo "Updating bootloader failed" && exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$failed" != "" ]; then
|
||||||
|
echo "Generating $failed targets failed"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
||||||
65
mkinitrd.8.asc
Normal file
65
mkinitrd.8.asc
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
MKINITRD(8)
|
||||||
|
=========
|
||||||
|
:doctype: manpage
|
||||||
|
:man source: dracut
|
||||||
|
:man manual: dracut
|
||||||
|
|
||||||
|
NAME
|
||||||
|
----
|
||||||
|
mkinitrd - is a compat wrapper, which calls dracut to generate an initramfs
|
||||||
|
|
||||||
|
SYNOPSIS
|
||||||
|
--------
|
||||||
|
*mkinitrd* ['OPTION...'] [<initrd-image>] <kernel-version>
|
||||||
|
|
||||||
|
DESCRIPTION
|
||||||
|
-----------
|
||||||
|
mkinitrd creates an initramfs image <initrd-image> for the kernel with
|
||||||
|
version <kernel-version> by calling "dracut".
|
||||||
|
|
||||||
|
[IMPORTANT]
|
||||||
|
If a more fine grained control over the resulting image is needed,
|
||||||
|
"dracut" should be called directly.
|
||||||
|
|
||||||
|
OPTIONS
|
||||||
|
-------
|
||||||
|
**--version**::
|
||||||
|
print info about the version
|
||||||
|
|
||||||
|
**-v, --verbose**::
|
||||||
|
increase verbosity level
|
||||||
|
|
||||||
|
**-f, --force**::
|
||||||
|
overwrite existing initramfs file.
|
||||||
|
|
||||||
|
**--image-version*::
|
||||||
|
append the kernel version to the target image
|
||||||
|
<initrd-image>-<kernel-version>.
|
||||||
|
|
||||||
|
**--with=<module>**::
|
||||||
|
add the kernel module <module> to the initramfs.
|
||||||
|
|
||||||
|
**--preload=<module>**::
|
||||||
|
preload the kernel module <module> in the initramfs before any other kernel
|
||||||
|
modules are loaded. This can be used to ensure a certain device naming,
|
||||||
|
which should in theory be avoided and the use of symbolic links in /dev is
|
||||||
|
encouraged.
|
||||||
|
|
||||||
|
**--nocompress**::
|
||||||
|
do not compress the resulting image.
|
||||||
|
|
||||||
|
**--help**::
|
||||||
|
print a help message and exit.
|
||||||
|
|
||||||
|
AVAILABILITY
|
||||||
|
------------
|
||||||
|
The mkinitrd command is part of the dracut package and is available from
|
||||||
|
link:$$https://dracut.wiki.kernel.org$$[https://dracut.wiki.kernel.org]
|
||||||
|
|
||||||
|
AUTHORS
|
||||||
|
-------
|
||||||
|
Harald Hoyer
|
||||||
|
|
||||||
|
SEE ALSO
|
||||||
|
--------
|
||||||
|
*dracut*(8)
|
||||||
21
modules.d/00bash/module-setup.sh
Executable file
21
modules.d/00bash/module-setup.sh
Executable file
@@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# called by dracut
|
||||||
|
check() {
|
||||||
|
require_binaries /bin/bash
|
||||||
|
}
|
||||||
|
|
||||||
|
# called by dracut
|
||||||
|
depends() {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
# called by dracut
|
||||||
|
install() {
|
||||||
|
# If another shell is already installed, do not use bash
|
||||||
|
[[ -x $initdir/bin/sh ]] && return
|
||||||
|
|
||||||
|
# Prefer bash as /bin/sh if it is available.
|
||||||
|
inst /bin/bash && ln -sf bash "${initdir}/bin/sh"
|
||||||
|
}
|
||||||
|
|
||||||
30
modules.d/00bootchart/module-setup.sh
Executable file
30
modules.d/00bootchart/module-setup.sh
Executable file
@@ -0,0 +1,30 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# called by dracut
|
||||||
|
check() {
|
||||||
|
[[ "$mount_needs" ]] && return 1
|
||||||
|
require_binaries /sbin/bootchartd || return 1
|
||||||
|
return 255
|
||||||
|
}
|
||||||
|
|
||||||
|
# called by dracut
|
||||||
|
depends() {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
# called by dracut
|
||||||
|
install() {
|
||||||
|
inst_symlink /init /sbin/init
|
||||||
|
inst_dir /lib/bootchart/tmpfs
|
||||||
|
|
||||||
|
inst_multiple bootchartd bash \
|
||||||
|
/lib/bootchart/bootchart-collector /etc/bootchartd.conf \
|
||||||
|
accton \
|
||||||
|
echo \
|
||||||
|
grep \
|
||||||
|
usleep
|
||||||
|
|
||||||
|
inst /usr/bin/pkill /bin/pkill
|
||||||
|
inst /usr/bin/[ /bin/[
|
||||||
|
}
|
||||||
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
[ -x /bin/dash ]
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# If another shell is already installed, do not use dash
|
|
||||||
[ -x "${initdir}/bin/sh" ] && return
|
|
||||||
|
|
||||||
# Prefer dash as /bin/sh if it is available.
|
|
||||||
inst /bin/dash && ln -sf dash "${initdir}/bin/sh"
|
|
||||||
21
modules.d/00dash/module-setup.sh
Executable file
21
modules.d/00dash/module-setup.sh
Executable file
@@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# called by dracut
|
||||||
|
check() {
|
||||||
|
require_binaries /bin/dash
|
||||||
|
}
|
||||||
|
|
||||||
|
# called by dracut
|
||||||
|
depends() {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
# called by dracut
|
||||||
|
install() {
|
||||||
|
# If another shell is already installed, do not use dash
|
||||||
|
[[ -x $initdir/bin/sh ]] && return
|
||||||
|
|
||||||
|
# Prefer dash as /bin/sh if it is available.
|
||||||
|
inst /bin/dash && ln -sf dash "${initdir}/bin/sh"
|
||||||
|
}
|
||||||
|
|
||||||
240
modules.d/00systemd/module-setup.sh
Executable file
240
modules.d/00systemd/module-setup.sh
Executable file
@@ -0,0 +1,240 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# called by dracut
|
||||||
|
check() {
|
||||||
|
[[ $mount_needs ]] && return 1
|
||||||
|
if require_binaries $systemdutildir/systemd; then
|
||||||
|
SYSTEMD_VERSION=$($systemdutildir/systemd --version | { read a b a; echo $b; })
|
||||||
|
(( $SYSTEMD_VERSION >= 198 )) && return 0
|
||||||
|
return 255
|
||||||
|
fi
|
||||||
|
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# called by dracut
|
||||||
|
depends() {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
installkernel() {
|
||||||
|
hostonly='' instmods autofs4 ipv6 algif_hash hmac sha256
|
||||||
|
instmods -s efivarfs
|
||||||
|
}
|
||||||
|
|
||||||
|
# called by dracut
|
||||||
|
install() {
|
||||||
|
local _mods
|
||||||
|
|
||||||
|
if [[ "$prefix" == /run/* ]]; then
|
||||||
|
dfatal "systemd does not work with a prefix, which contains \"/run\"!!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
inst_multiple -o \
|
||||||
|
$systemdutildir/systemd \
|
||||||
|
$systemdutildir/systemd-coredump \
|
||||||
|
$systemdutildir/systemd-cgroups-agent \
|
||||||
|
$systemdutildir/systemd-shutdown \
|
||||||
|
$systemdutildir/systemd-reply-password \
|
||||||
|
$systemdutildir/systemd-fsck \
|
||||||
|
$systemdutildir/systemd-udevd \
|
||||||
|
$systemdutildir/systemd-journald \
|
||||||
|
$systemdutildir/systemd-sysctl \
|
||||||
|
$systemdutildir/systemd-modules-load \
|
||||||
|
$systemdutildir/systemd-vconsole-setup \
|
||||||
|
$systemdutildir/system-generators/systemd-fstab-generator \
|
||||||
|
$systemdutildir/system-generators/systemd-gpt-auto-generator \
|
||||||
|
\
|
||||||
|
$systemdsystemunitdir/cryptsetup.target \
|
||||||
|
$systemdsystemunitdir/emergency.target \
|
||||||
|
$systemdsystemunitdir/sysinit.target \
|
||||||
|
$systemdsystemunitdir/basic.target \
|
||||||
|
$systemdsystemunitdir/halt.target \
|
||||||
|
$systemdsystemunitdir/kexec.target \
|
||||||
|
$systemdsystemunitdir/local-fs.target \
|
||||||
|
$systemdsystemunitdir/local-fs-pre.target \
|
||||||
|
$systemdsystemunitdir/remote-fs.target \
|
||||||
|
$systemdsystemunitdir/remote-fs-pre.target \
|
||||||
|
$systemdsystemunitdir/multi-user.target \
|
||||||
|
$systemdsystemunitdir/network.target \
|
||||||
|
$systemdsystemunitdir/network-pre.target \
|
||||||
|
$systemdsystemunitdir/network-online.target \
|
||||||
|
$systemdsystemunitdir/nss-lookup.target \
|
||||||
|
$systemdsystemunitdir/nss-user-lookup.target \
|
||||||
|
$systemdsystemunitdir/poweroff.target \
|
||||||
|
$systemdsystemunitdir/reboot.target \
|
||||||
|
$systemdsystemunitdir/rescue.target \
|
||||||
|
$systemdsystemunitdir/rpcbind.target \
|
||||||
|
$systemdsystemunitdir/shutdown.target \
|
||||||
|
$systemdsystemunitdir/final.target \
|
||||||
|
$systemdsystemunitdir/sigpwr.target \
|
||||||
|
$systemdsystemunitdir/sockets.target \
|
||||||
|
$systemdsystemunitdir/swap.target \
|
||||||
|
$systemdsystemunitdir/timers.target \
|
||||||
|
$systemdsystemunitdir/paths.target \
|
||||||
|
$systemdsystemunitdir/umount.target \
|
||||||
|
\
|
||||||
|
$systemdsystemunitdir/sys-kernel-config.mount \
|
||||||
|
\
|
||||||
|
$systemdsystemunitdir/kmod-static-nodes.service \
|
||||||
|
$systemdsystemunitdir/systemd-tmpfiles-setup.service \
|
||||||
|
$systemdsystemunitdir/systemd-tmpfiles-setup-dev.service \
|
||||||
|
$systemdsystemunitdir/systemd-ask-password-console.path \
|
||||||
|
$systemdsystemunitdir/systemd-udevd-control.socket \
|
||||||
|
$systemdsystemunitdir/systemd-udevd-kernel.socket \
|
||||||
|
$systemdsystemunitdir/systemd-ask-password-plymouth.path \
|
||||||
|
$systemdsystemunitdir/systemd-journald.socket \
|
||||||
|
$systemdsystemunitdir/systemd-journald-audit.socket \
|
||||||
|
$systemdsystemunitdir/systemd-ask-password-console.service \
|
||||||
|
$systemdsystemunitdir/systemd-modules-load.service \
|
||||||
|
$systemdsystemunitdir/systemd-halt.service \
|
||||||
|
$systemdsystemunitdir/systemd-poweroff.service \
|
||||||
|
$systemdsystemunitdir/systemd-reboot.service \
|
||||||
|
$systemdsystemunitdir/systemd-kexec.service \
|
||||||
|
$systemdsystemunitdir/systemd-fsck@.service \
|
||||||
|
$systemdsystemunitdir/systemd-udevd.service \
|
||||||
|
$systemdsystemunitdir/systemd-udev-trigger.service \
|
||||||
|
$systemdsystemunitdir/systemd-udev-settle.service \
|
||||||
|
$systemdsystemunitdir/systemd-ask-password-plymouth.service \
|
||||||
|
$systemdsystemunitdir/systemd-journald.service \
|
||||||
|
$systemdsystemunitdir/systemd-vconsole-setup.service \
|
||||||
|
$systemdsystemunitdir/systemd-random-seed-load.service \
|
||||||
|
$systemdsystemunitdir/systemd-random-seed.service \
|
||||||
|
$systemdsystemunitdir/systemd-sysctl.service \
|
||||||
|
\
|
||||||
|
$systemdsystemunitdir/sysinit.target.wants/systemd-modules-load.service \
|
||||||
|
$systemdsystemunitdir/sysinit.target.wants/systemd-ask-password-console.path \
|
||||||
|
$systemdsystemunitdir/sysinit.target.wants/systemd-journald.service \
|
||||||
|
$systemdsystemunitdir/sockets.target.wants/systemd-udevd-control.socket \
|
||||||
|
$systemdsystemunitdir/sockets.target.wants/systemd-udevd-kernel.socket \
|
||||||
|
$systemdsystemunitdir/sockets.target.wants/systemd-journald.socket \
|
||||||
|
$systemdsystemunitdir/sockets.target.wants/systemd-journald-audit.socket \
|
||||||
|
$systemdsystemunitdir/sockets.target.wants/systemd-journald-dev-log.socket \
|
||||||
|
$systemdsystemunitdir/sysinit.target.wants/systemd-udevd.service \
|
||||||
|
$systemdsystemunitdir/sysinit.target.wants/systemd-udev-trigger.service \
|
||||||
|
$systemdsystemunitdir/sysinit.target.wants/kmod-static-nodes.service \
|
||||||
|
$systemdsystemunitdir/sysinit.target.wants/systemd-tmpfiles-setup.service \
|
||||||
|
$systemdsystemunitdir/sysinit.target.wants/systemd-tmpfiles-setup-dev.service \
|
||||||
|
$systemdsystemunitdir/sysinit.target.wants/systemd-sysctl.service \
|
||||||
|
\
|
||||||
|
$systemdsystemunitdir/ctrl-alt-del.target \
|
||||||
|
$systemdsystemunitdir/reboot.target \
|
||||||
|
$systemdsystemunitdir/systemd-reboot.service \
|
||||||
|
$systemdsystemunitdir/syslog.socket \
|
||||||
|
\
|
||||||
|
$systemdsystemunitdir/slices.target \
|
||||||
|
$systemdsystemunitdir/system.slice \
|
||||||
|
$systemdsystemunitdir/-.slice \
|
||||||
|
\
|
||||||
|
$tmpfilesdir/systemd.conf \
|
||||||
|
\
|
||||||
|
journalctl systemctl \
|
||||||
|
echo swapoff \
|
||||||
|
kmod insmod rmmod modprobe modinfo depmod lsmod \
|
||||||
|
mount umount reboot poweroff \
|
||||||
|
systemd-run systemd-escape \
|
||||||
|
systemd-cgls systemd-tmpfiles \
|
||||||
|
/etc/udev/udev.hwdb \
|
||||||
|
${NULL}
|
||||||
|
|
||||||
|
inst_multiple -o \
|
||||||
|
/usr/lib/modules-load.d/*.conf \
|
||||||
|
/usr/lib/sysctl.d/*.conf
|
||||||
|
|
||||||
|
modules_load_get() {
|
||||||
|
local _line i
|
||||||
|
for i in "$1"/*.conf; do
|
||||||
|
[[ -f $i ]] || continue
|
||||||
|
while read _line || [ -n "$_line" ]; do
|
||||||
|
case $_line in
|
||||||
|
\#*)
|
||||||
|
;;
|
||||||
|
\;*)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo $_line
|
||||||
|
esac
|
||||||
|
done < "$i"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
_mods=$(modules_load_get /usr/lib/modules-load.d)
|
||||||
|
[[ $_mods ]] && hostonly='' instmods $_mods
|
||||||
|
|
||||||
|
if [[ $hostonly ]]; then
|
||||||
|
inst_multiple -H -o \
|
||||||
|
/etc/systemd/journald.conf \
|
||||||
|
/etc/systemd/journald.conf.d/*.conf \
|
||||||
|
/etc/systemd/system.conf \
|
||||||
|
/etc/systemd/system.conf.d/*.conf \
|
||||||
|
/etc/hostname \
|
||||||
|
/etc/machine-id \
|
||||||
|
/etc/machine-info \
|
||||||
|
/etc/vconsole.conf \
|
||||||
|
/etc/locale.conf \
|
||||||
|
/etc/modules-load.d/*.conf \
|
||||||
|
/etc/sysctl.d/*.conf \
|
||||||
|
/etc/sysctl.conf \
|
||||||
|
/etc/udev/udev.conf \
|
||||||
|
${NULL}
|
||||||
|
|
||||||
|
_mods=$(modules_load_get /etc/modules-load.d)
|
||||||
|
[[ $_mods ]] && hostonly='' instmods $_mods
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! [[ -e "$initdir/etc/machine-id" ]]; then
|
||||||
|
> "$initdir/etc/machine-id"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# install adm user/group for journald
|
||||||
|
inst_multiple nologin
|
||||||
|
grep '^systemd-journal:' /etc/passwd 2>/dev/null >> "$initdir/etc/passwd"
|
||||||
|
grep '^adm:' /etc/passwd 2>/dev/null >> "$initdir/etc/passwd"
|
||||||
|
grep '^systemd-journal:' /etc/group >> "$initdir/etc/group"
|
||||||
|
grep '^wheel:' /etc/group >> "$initdir/etc/group"
|
||||||
|
grep '^adm:' /etc/group >> "$initdir/etc/group"
|
||||||
|
grep '^utmp:' /etc/group >> "$initdir/etc/group"
|
||||||
|
grep '^root:' /etc/group >> "$initdir/etc/group"
|
||||||
|
|
||||||
|
# we don't use systemd-networkd, but the user is in systemd.conf tmpfiles snippet
|
||||||
|
grep '^systemd-network:' /etc/passwd 2>/dev/null >> "$initdir/etc/passwd"
|
||||||
|
grep '^systemd-network:' /etc/group >> "$initdir/etc/group"
|
||||||
|
|
||||||
|
ln_r $systemdutildir/systemd "/init"
|
||||||
|
ln_r $systemdutildir/systemd "/sbin/init"
|
||||||
|
|
||||||
|
inst_binary true
|
||||||
|
ln_r $(type -P true) "/usr/bin/loginctl"
|
||||||
|
ln_r $(type -P true) "/bin/loginctl"
|
||||||
|
inst_rules \
|
||||||
|
70-uaccess.rules \
|
||||||
|
71-seat.rules \
|
||||||
|
73-seat-late.rules \
|
||||||
|
90-vconsole.rules \
|
||||||
|
99-systemd.rules \
|
||||||
|
${NULL}
|
||||||
|
|
||||||
|
for i in \
|
||||||
|
emergency.target \
|
||||||
|
rescue.target \
|
||||||
|
systemd-ask-password-console.service \
|
||||||
|
systemd-ask-password-plymouth.service \
|
||||||
|
; do
|
||||||
|
mkdir -p "${initdir}${systemdsystemunitdir}/${i}.wants"
|
||||||
|
ln_r "${systemdsystemunitdir}/systemd-vconsole-setup.service" \
|
||||||
|
"${systemdsystemunitdir}/${i}.wants/systemd-vconsole-setup.service"
|
||||||
|
done
|
||||||
|
|
||||||
|
mkdir -p "$initdir/etc/systemd"
|
||||||
|
# We must use a volatile journal, and we don't want rate-limiting
|
||||||
|
{
|
||||||
|
echo "[Journal]"
|
||||||
|
echo "Storage=volatile"
|
||||||
|
echo "RateLimitInterval=0"
|
||||||
|
echo "RateLimitBurst=0"
|
||||||
|
} >> "$initdir/etc/systemd/journald.conf"
|
||||||
|
|
||||||
|
ln_r "${systemdsystemunitdir}/multi-user.target" "${systemdsystemunitdir}/default.target"
|
||||||
|
}
|
||||||
|
|
||||||
29
modules.d/00warpclock/module-setup.sh
Normal file
29
modules.d/00warpclock/module-setup.sh
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
#!/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() {
|
||||||
|
# hwclock does not exist on S390(x), bail out silently then
|
||||||
|
local _arch=$(uname -m)
|
||||||
|
[ "$_arch" = "s390" -o "$_arch" = "s390x" ] && return 1
|
||||||
|
|
||||||
|
[ -e /etc/localtime -a -e /etc/adjtime ] || return 1
|
||||||
|
require_binaries /sbin/hwclock || return 1
|
||||||
|
|
||||||
|
return 255
|
||||||
|
}
|
||||||
|
|
||||||
|
# called by dracut
|
||||||
|
depends() {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
# called by dracut
|
||||||
|
install() {
|
||||||
|
inst /usr/share/zoneinfo/UTC
|
||||||
|
inst /etc/localtime
|
||||||
|
inst /etc/adjtime
|
||||||
|
inst_hook pre-trigger 00 "$moddir/warpclock.sh"
|
||||||
|
inst /sbin/hwclock
|
||||||
|
}
|
||||||
9
modules.d/00warpclock/warpclock.sh
Normal file
9
modules.d/00warpclock/warpclock.sh
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if test -e /etc/adjtime ; then
|
||||||
|
while read line ; do
|
||||||
|
if test "$line" = LOCAL ; then
|
||||||
|
hwclock --systz
|
||||||
|
fi
|
||||||
|
done < /etc/adjtime
|
||||||
|
fi
|
||||||
10
modules.d/01fips/fips-boot.sh
Executable file
10
modules.d/01fips/fips-boot.sh
Executable file
@@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if ! fipsmode=$(getarg fips) || [ $fipsmode = "0" ]; then
|
||||||
|
rm -f -- /etc/modprobe.d/fips.conf >/dev/null 2>&1
|
||||||
|
elif getarg boot= >/dev/null; then
|
||||||
|
. /sbin/fips.sh
|
||||||
|
if mount_boot; then
|
||||||
|
do_fips || die "FIPS integrity test failed"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
8
modules.d/01fips/fips-load-crypto.sh
Normal file
8
modules.d/01fips/fips-load-crypto.sh
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if ! fipsmode=$(getarg fips) || [ $fipsmode = "0" ]; then
|
||||||
|
rm -f -- /etc/modprobe.d/fips.conf >/dev/null 2>&1
|
||||||
|
else
|
||||||
|
. /sbin/fips.sh
|
||||||
|
fips_load_crypto || die "FIPS integrity test failed"
|
||||||
|
fi
|
||||||
9
modules.d/01fips/fips-noboot.sh
Executable file
9
modules.d/01fips/fips-noboot.sh
Executable file
@@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if ! fipsmode=$(getarg fips) || [ $fipsmode = "0" ]; then
|
||||||
|
rm -f -- /etc/modprobe.d/fips.conf >/dev/null 2>&1
|
||||||
|
elif ! [ -f /tmp/fipsdone ]; then
|
||||||
|
. /sbin/fips.sh
|
||||||
|
mount_boot
|
||||||
|
do_fips || die "FIPS integrity test failed"
|
||||||
|
fi
|
||||||
152
modules.d/01fips/fips.sh
Executable file
152
modules.d/01fips/fips.sh
Executable file
@@ -0,0 +1,152 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
mount_boot()
|
||||||
|
{
|
||||||
|
boot=$(getarg boot=)
|
||||||
|
|
||||||
|
if [ -n "$boot" ]; then
|
||||||
|
case "$boot" in
|
||||||
|
LABEL=*)
|
||||||
|
boot="$(echo $boot | sed 's,/,\\x2f,g')"
|
||||||
|
boot="/dev/disk/by-label/${boot#LABEL=}"
|
||||||
|
;;
|
||||||
|
UUID=*)
|
||||||
|
boot="/dev/disk/by-uuid/${boot#UUID=}"
|
||||||
|
;;
|
||||||
|
PARTUUID=*)
|
||||||
|
boot="/dev/disk/by-partuuid/${boot#PARTUUID=}"
|
||||||
|
;;
|
||||||
|
PARTLABEL=*)
|
||||||
|
boot="/dev/disk/by-partlabel/${boot#PARTLABEL=}"
|
||||||
|
;;
|
||||||
|
/dev/*)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
die "You have to specify boot=<boot device> as a boot option for fips=1" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if ! [ -e "$boot" ]; then
|
||||||
|
udevadm trigger --action=add >/dev/null 2>&1
|
||||||
|
[ -z "$UDEVVERSION" ] && UDEVVERSION=$(udevadm --version)
|
||||||
|
i=0
|
||||||
|
while ! [ -e $boot ]; do
|
||||||
|
if [ $UDEVVERSION -ge 143 ]; then
|
||||||
|
udevadm settle --exit-if-exists=$boot
|
||||||
|
else
|
||||||
|
udevadm settle --timeout=30
|
||||||
|
fi
|
||||||
|
[ -e $boot ] && break
|
||||||
|
sleep 0.5
|
||||||
|
i=$(($i+1))
|
||||||
|
[ $i -gt 40 ] && break
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
[ -e "$boot" ] || return 1
|
||||||
|
|
||||||
|
mkdir /boot
|
||||||
|
info "Mounting $boot as /boot"
|
||||||
|
mount -oro "$boot" /boot || return 1
|
||||||
|
elif [ -d "$NEWROOT/boot" ]; then
|
||||||
|
rm -fr -- /boot
|
||||||
|
ln -sf "$NEWROOT/boot" /boot
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
do_rhevh_check()
|
||||||
|
{
|
||||||
|
KERNEL=$(uname -r)
|
||||||
|
kpath=${1}
|
||||||
|
|
||||||
|
# If we're on RHEV-H, the kernel is in /run/initramfs/live/vmlinuz0
|
||||||
|
HMAC_SUM_ORIG=$(cat $NEWROOT/boot/.vmlinuz-${KERNEL}.hmac | while read a b || [ -n "$a" ]; do printf "%s\n" $a; done)
|
||||||
|
HMAC_SUM_CALC=$(sha512hmac $kpath | while read a b || [ -n "$a" ]; do printf "%s\n" $a; done || return 1)
|
||||||
|
if [ -z "$HMAC_SUM_ORIG" ] || [ -z "$HMAC_SUM_CALC" ] || [ "${HMAC_SUM_ORIG}" != "${HMAC_SUM_CALC}" ]; then
|
||||||
|
warn "HMAC sum mismatch"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
info "rhevh_check OK"
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
fips_load_crypto()
|
||||||
|
{
|
||||||
|
FIPSMODULES=$(cat /etc/fipsmodules)
|
||||||
|
|
||||||
|
info "Loading and integrity checking all crypto modules"
|
||||||
|
mv /etc/modprobe.d/fips.conf /etc/modprobe.d/fips.conf.bak
|
||||||
|
for _module in $FIPSMODULES; do
|
||||||
|
if [ "$_module" != "tcrypt" ]; then
|
||||||
|
if ! modprobe "${_module}"; then
|
||||||
|
# check if kernel provides generic algo
|
||||||
|
_found=0
|
||||||
|
while read _k _s _v || [ -n "$_k" ]; do
|
||||||
|
[ "$_k" != "name" -a "$_k" != "driver" ] && continue
|
||||||
|
[ "$_v" != "$_module" ] && continue
|
||||||
|
_found=1
|
||||||
|
break
|
||||||
|
done </proc/crypto
|
||||||
|
[ "$_found" = "0" ] && return 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
mv /etc/modprobe.d/fips.conf.bak /etc/modprobe.d/fips.conf
|
||||||
|
|
||||||
|
info "Self testing crypto algorithms"
|
||||||
|
modprobe tcrypt || return 1
|
||||||
|
rmmod tcrypt
|
||||||
|
}
|
||||||
|
|
||||||
|
do_fips()
|
||||||
|
{
|
||||||
|
local _v
|
||||||
|
local _s
|
||||||
|
local _v
|
||||||
|
local _module
|
||||||
|
|
||||||
|
KERNEL=$(uname -r)
|
||||||
|
|
||||||
|
info "Checking integrity of kernel"
|
||||||
|
if [ -e "/run/initramfs/live/vmlinuz0" ]; then
|
||||||
|
do_rhevh_check /run/initramfs/live/vmlinuz0 || return 1
|
||||||
|
elif [ -e "/run/initramfs/live/isolinux/vmlinuz0" ]; then
|
||||||
|
do_rhevh_check /run/initramfs/live/isolinux/vmlinuz0 || return 1
|
||||||
|
else
|
||||||
|
BOOT_IMAGE="$(getarg BOOT_IMAGE)"
|
||||||
|
|
||||||
|
# Trim off any leading GRUB boot device (e.g. ($root) )
|
||||||
|
BOOT_IMAGE="$(echo "${BOOT_IMAGE}" | sed 's/^(.*)//')"
|
||||||
|
|
||||||
|
BOOT_IMAGE_NAME="${BOOT_IMAGE##*/}"
|
||||||
|
BOOT_IMAGE_PATH="${BOOT_IMAGE%${BOOT_IMAGE_NAME}}"
|
||||||
|
|
||||||
|
if [ -z "$BOOT_IMAGE_NAME" ]; then
|
||||||
|
BOOT_IMAGE_NAME="vmlinuz-${KERNEL}"
|
||||||
|
elif ! [ -e "/boot/${BOOT_IMAGE_PATH}/${BOOT_IMAGE_NAME}" ]; 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
|
||||||
|
|
||||||
|
(cd "${BOOT_IMAGE_HMAC%/*}" && sha512hmac -c "${BOOT_IMAGE_HMAC}") || return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
info "All initrd crypto checks done"
|
||||||
|
|
||||||
|
> /tmp/fipsdone
|
||||||
|
|
||||||
|
umount /boot >/dev/null 2>&1
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
||||||
85
modules.d/01fips/module-setup.sh
Executable file
85
modules.d/01fips/module-setup.sh
Executable file
@@ -0,0 +1,85 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# called by dracut
|
||||||
|
check() {
|
||||||
|
return 255
|
||||||
|
}
|
||||||
|
|
||||||
|
# called by dracut
|
||||||
|
depends() {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
# called by dracut
|
||||||
|
installkernel() {
|
||||||
|
local _fipsmodules _mod _bootfstype
|
||||||
|
if [[ -f "${srcmods}/modules.fips" ]]; then
|
||||||
|
_fipsmodules="$(cat "${srcmods}/modules.fips")"
|
||||||
|
else
|
||||||
|
_fipsmodules=""
|
||||||
|
|
||||||
|
# Hashes:
|
||||||
|
_fipsmodules+="sha1 sha224 sha256 sha384 sha512 "
|
||||||
|
_fipsmodules+="sha3-224 sha3-256 sha3-384 sha3-512 "
|
||||||
|
_fipsmodules+="crc32c crct10dif ghash "
|
||||||
|
|
||||||
|
# Ciphers:
|
||||||
|
_fipsmodules+="cipher_null des3_ede aes cfb "
|
||||||
|
|
||||||
|
# Modes/templates:
|
||||||
|
_fipsmodules+="ecb cbc ctr xts gcm ccm authenc hmac cmac "
|
||||||
|
|
||||||
|
# Compression algs:
|
||||||
|
_fipsmodules+="deflate lzo zlib "
|
||||||
|
|
||||||
|
# PRNG algs:
|
||||||
|
_fipsmodules+="ansi_cprng "
|
||||||
|
|
||||||
|
# Misc:
|
||||||
|
_fipsmodules+="aead cryptomgr tcrypt crypto_user "
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -m 0755 -p "${initdir}/etc/modprobe.d"
|
||||||
|
|
||||||
|
for _mod in $_fipsmodules; do
|
||||||
|
if hostonly='' instmods -c -s $_mod; then
|
||||||
|
echo $_mod >> "${initdir}/etc/fipsmodules"
|
||||||
|
echo "blacklist $_mod" >> "${initdir}/etc/modprobe.d/fips.conf"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# with hostonly_default_device fs module for /boot is not installed by default
|
||||||
|
if [[ $hostonly ]] && [[ "$hostonly_default_device" == "no" ]]; then
|
||||||
|
_bootfstype=$(find_mp_fstype /boot)
|
||||||
|
if [[ -n "$_bootfstype" ]]; then
|
||||||
|
hostonly='' instmods $_bootfstype
|
||||||
|
else
|
||||||
|
dwarning "Can't determine fs type for /boot, FIPS check may fail."
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# called by dracut
|
||||||
|
install() {
|
||||||
|
local _dir
|
||||||
|
inst_hook pre-trigger 01 "$moddir/fips-boot.sh"
|
||||||
|
inst_hook pre-pivot 01 "$moddir/fips-noboot.sh"
|
||||||
|
inst_hook pre-udev 01 "$moddir/fips-load-crypto.sh"
|
||||||
|
inst_script "$moddir/fips.sh" /sbin/fips.sh
|
||||||
|
|
||||||
|
inst_multiple sha512hmac rmmod insmod mount uname umount
|
||||||
|
|
||||||
|
inst_simple /etc/system-fips
|
||||||
|
[ -c ${initdir}/dev/random ] || mknod ${initdir}/dev/random c 1 8 \
|
||||||
|
|| {
|
||||||
|
dfatal "Cannot create /dev/random"
|
||||||
|
dfatal "To create an initramfs with fips support, dracut has to run as root"
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
[ -c ${initdir}/dev/urandom ] || mknod ${initdir}/dev/urandom c 1 9 \
|
||||||
|
|| {
|
||||||
|
dfatal "Cannot create /dev/random"
|
||||||
|
dfatal "To create an initramfs with fips support, dracut has to run as root"
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
}
|
||||||
68
modules.d/01systemd-initrd/module-setup.sh
Executable file
68
modules.d/01systemd-initrd/module-setup.sh
Executable file
@@ -0,0 +1,68 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# called by dracut
|
||||||
|
check() {
|
||||||
|
[[ $mount_needs ]] && return 1
|
||||||
|
|
||||||
|
if ! dracut_module_included "systemd"; then
|
||||||
|
derror "systemd-initrd needs systemd in the initramfs"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
# called by dracut
|
||||||
|
depends() {
|
||||||
|
echo "systemd"
|
||||||
|
}
|
||||||
|
|
||||||
|
installkernel() {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
# called by dracut
|
||||||
|
install() {
|
||||||
|
local _mods
|
||||||
|
|
||||||
|
inst_multiple -o \
|
||||||
|
$systemdsystemunitdir/initrd.target \
|
||||||
|
$systemdsystemunitdir/initrd-fs.target \
|
||||||
|
$systemdsystemunitdir/initrd-root-device.target \
|
||||||
|
$systemdsystemunitdir/initrd-root-fs.target \
|
||||||
|
$systemdsystemunitdir/initrd-switch-root.target \
|
||||||
|
$systemdsystemunitdir/initrd-switch-root.service \
|
||||||
|
$systemdsystemunitdir/initrd-cleanup.service \
|
||||||
|
$systemdsystemunitdir/initrd-udevadm-cleanup-db.service \
|
||||||
|
$systemdsystemunitdir/initrd-parse-etc.service
|
||||||
|
|
||||||
|
ln_r "${systemdsystemunitdir}/initrd.target" "${systemdsystemunitdir}/default.target"
|
||||||
|
|
||||||
|
local VERSION=""
|
||||||
|
local PRETTY_NAME=""
|
||||||
|
if [ -e /etc/os-release ]; then
|
||||||
|
. /etc/os-release
|
||||||
|
[[ -n ${VERSION} ]] && VERSION+=" "
|
||||||
|
[[ -n ${PRETTY_NAME} ]] && PRETTY_NAME+=" "
|
||||||
|
fi
|
||||||
|
NAME=dracut
|
||||||
|
ID=dracut
|
||||||
|
VERSION+="dracut-$DRACUT_VERSION"
|
||||||
|
PRETTY_NAME+="dracut-$DRACUT_VERSION (Initramfs)"
|
||||||
|
VERSION_ID=$DRACUT_VERSION
|
||||||
|
ANSI_COLOR="0;34"
|
||||||
|
|
||||||
|
{
|
||||||
|
echo NAME=\"$NAME\"
|
||||||
|
echo VERSION=\"$VERSION\"
|
||||||
|
echo ID=$ID
|
||||||
|
echo VERSION_ID=$VERSION_ID
|
||||||
|
echo PRETTY_NAME=\"$PRETTY_NAME\"
|
||||||
|
echo ANSI_COLOR=\"$ANSI_COLOR\"
|
||||||
|
} > $initdir/usr/lib/initrd-release
|
||||||
|
echo dracut-$DRACUT_VERSION > $initdir/lib/dracut/dracut-$DRACUT_VERSION
|
||||||
|
ln -sf ../usr/lib/initrd-release $initdir/etc/initrd-release
|
||||||
|
ln -sf initrd-release $initdir/usr/lib/os-release
|
||||||
|
ln -sf initrd-release $initdir/etc/os-release
|
||||||
|
}
|
||||||
|
|
||||||
33
modules.d/02caps/README
Normal file
33
modules.d/02caps/README
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
This adds the following parameters:
|
||||||
|
rd.caps=1
|
||||||
|
turn the caps module on/off
|
||||||
|
rd.caps.initdrop=cap_sys_module,cap_sys_rawio
|
||||||
|
drop the specified comma separated capabilities
|
||||||
|
rd.caps.disablemodules=1
|
||||||
|
turn off module loading
|
||||||
|
rd.caps.disablekexec=1
|
||||||
|
turn off the kexec functionality
|
||||||
|
|
||||||
|
If module loading is turned off, all modules have to be loaded in the
|
||||||
|
initramfs, which are used later on. This can be done with
|
||||||
|
"rd.driver.pre="
|
||||||
|
rd.driver.pre=autofs4,sunrpc,ipt_REJECT,nf_conntrack_ipv4,....
|
||||||
|
|
||||||
|
Because the kernel command line would get huge with all those drivers, I
|
||||||
|
recommend to make use of $initramfs/etc/cmdline.
|
||||||
|
|
||||||
|
So, all rd.caps.* and rd.driver.pre arguments are in caps.conf can be
|
||||||
|
copied to $initramfs/etc/cmdline with "-i caps.conf /etc/cmdline".
|
||||||
|
|
||||||
|
Also all modules have to be loaded in the initramfs via "--add-drivers".
|
||||||
|
|
||||||
|
The resulting initramfs creation would look like this:
|
||||||
|
|
||||||
|
--add-drivers "autofs4 sunrpc ipt_REJECT nf_conntrack_ipv4 \
|
||||||
|
nf_defrag_ipv4 iptable_filter ip_tables
|
||||||
|
ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 xt_state nf_conntrack
|
||||||
|
ip6table_filter ip6_tables dm_mirror dm_region_hash dm_log uinput ppdev
|
||||||
|
parport_pc parport ipv6 sg 8139too 8139cp mii i2c_piix4 i2c_core ext3
|
||||||
|
jbd mbcache sd_mod crc_t10dif sr_mod cdrom ata_generic pata_acpi ata_piix
|
||||||
|
dm_mod" \
|
||||||
|
/boot/initramfs-caps.img
|
||||||
34
modules.d/02caps/caps.sh
Executable file
34
modules.d/02caps/caps.sh
Executable file
@@ -0,0 +1,34 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
capsmode=$(getarg rd.caps)
|
||||||
|
|
||||||
|
if [ "$capsmode" = "1" ]; then
|
||||||
|
CAPS_INIT_DROP=$(getarg rd.caps.initdrop=)
|
||||||
|
CAPS_USERMODEHELPER_BSET=$(capsh --drop="$CAPS_INIT_DROP" -- -c 'while read a b || [ -n "$a" ]; do [ "$a" = "CapBnd:" ] && echo $((0x${b:$((${#b}-8)):8})) $((0x${b:$((${#b}-16)):8})) && break; done < /proc/self/status')
|
||||||
|
CAPS_MODULES_DISABLED=$(getarg rd.caps.disablemodules=)
|
||||||
|
CAPS_KEXEC_DISABLED=$(getarg rd.caps.disablekexec=)
|
||||||
|
|
||||||
|
info "Loading CAPS_MODULES $CAPS_MODULES"
|
||||||
|
for i in $CAPS_MODULES;do modprobe $i 2>&1 >/dev/null | vinfo; done
|
||||||
|
|
||||||
|
if [ "$CAPS_MODULES_DISABLED" = "1" -a -e /proc/sys/kernel/modules_disabled ]; then
|
||||||
|
info "Disabling module loading."
|
||||||
|
echo $CAPS_MODULES_DISABLED > /proc/sys/kernel/modules_disabled
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$CAPS_KEXEC_DISABLED" = "1" -a -e /proc/sys/kernel/kexec_disabled ]; then
|
||||||
|
info "Disabling kexec."
|
||||||
|
echo $CAPS_KEXEC_DISABLED > /proc/sys/kernel/kexec_disabled
|
||||||
|
fi
|
||||||
|
|
||||||
|
info "CAPS_USERMODEHELPER_BSET=$CAPS_USERMODEHELPER_BSET"
|
||||||
|
if [ -e /proc/sys/kernel/usermodehelper/bset ]; then
|
||||||
|
info "Setting usermode helper bounding set."
|
||||||
|
echo $CAPS_USERMODEHELPER_BSET > /proc/sys/kernel/usermodehelper/bset
|
||||||
|
echo $CAPS_USERMODEHELPER_BSET > /proc/sys/kernel/usermodehelper/inheritable
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "CAPS_INIT_DROP=\"$CAPS_INIT_DROP\"" > /etc/capsdrop
|
||||||
|
info "Will drop capabilities $CAPS_INIT_DROP from init."
|
||||||
|
fi
|
||||||
|
|
||||||
25
modules.d/02caps/module-setup.sh
Executable file
25
modules.d/02caps/module-setup.sh
Executable file
@@ -0,0 +1,25 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# called by dracut
|
||||||
|
check() {
|
||||||
|
require_binaries capsh
|
||||||
|
return 255
|
||||||
|
}
|
||||||
|
|
||||||
|
# called by dracut
|
||||||
|
depends() {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
# called by dracut
|
||||||
|
install() {
|
||||||
|
if ! dracut_module_included "systemd"; then
|
||||||
|
inst_hook pre-pivot 00 "$moddir/caps.sh"
|
||||||
|
inst $(type -P capsh 2>/dev/null) /usr/sbin/capsh
|
||||||
|
# capsh wants bash and we need bash also
|
||||||
|
inst /bin/bash
|
||||||
|
else
|
||||||
|
dwarning "caps: does not work with systemd in the initramfs"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
71
modules.d/02systemd-networkd/module-setup.sh
Executable file
71
modules.d/02systemd-networkd/module-setup.sh
Executable file
@@ -0,0 +1,71 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# called by dracut
|
||||||
|
check() {
|
||||||
|
[[ $mount_needs ]] && return 1
|
||||||
|
|
||||||
|
if ! dracut_module_included "systemd"; then
|
||||||
|
derror "systemd-networkd needs systemd in the initramfs"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
return 255
|
||||||
|
}
|
||||||
|
|
||||||
|
# called by dracut
|
||||||
|
depends() {
|
||||||
|
echo "systemd kernel-network-modules"
|
||||||
|
}
|
||||||
|
|
||||||
|
installkernel() {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
# called by dracut
|
||||||
|
install() {
|
||||||
|
inst_multiple -o \
|
||||||
|
$systemdutildir/systemd-networkd \
|
||||||
|
$systemdutildir/systemd-networkd-wait-online \
|
||||||
|
$systemdsystemunitdir/systemd-networkd-wait-online.service \
|
||||||
|
$systemdsystemunitdir/systemd-networkd.service \
|
||||||
|
$systemdsystemunitdir/systemd-networkd.socket \
|
||||||
|
$systemdutildir/network/99-default.link \
|
||||||
|
networkctl ip
|
||||||
|
|
||||||
|
#hostnamectl timedatectl
|
||||||
|
# $systemdutildir/systemd-timesyncd \
|
||||||
|
# $systemdutildir/systemd-timedated \
|
||||||
|
# $systemdutildir/systemd-hostnamed \
|
||||||
|
# $systemdutildir/systemd-resolvd \
|
||||||
|
# $systemdutildir/systemd-resolve-host \
|
||||||
|
# $systemdsystemunitdir/systemd-resolved.service \
|
||||||
|
# $systemdsystemunitdir/systemd-hostnamed.service \
|
||||||
|
# $systemdsystemunitdir/systemd-timesyncd.service \
|
||||||
|
# $systemdsystemunitdir/systemd-timedated.service \
|
||||||
|
# $systemdsystemunitdir/time-sync.target \
|
||||||
|
# /etc/systemd/resolved.conf \
|
||||||
|
|
||||||
|
|
||||||
|
# inst_dir /var/lib/systemd/clock
|
||||||
|
|
||||||
|
grep '^systemd-network:' /etc/passwd 2>/dev/null >> "$initdir/etc/passwd"
|
||||||
|
grep '^systemd-network:' /etc/group >> "$initdir/etc/group"
|
||||||
|
# grep '^systemd-timesync:' /etc/passwd 2>/dev/null >> "$initdir/etc/passwd"
|
||||||
|
# grep '^systemd-timesync:' /etc/group >> "$initdir/etc/group"
|
||||||
|
|
||||||
|
_arch=$(uname -m)
|
||||||
|
inst_libdir_file {"tls/$_arch/",tls/,"$_arch/",}"libnss_dns.so.*" \
|
||||||
|
{"tls/$_arch/",tls/,"$_arch/",}"libnss_mdns4_minimal.so.*" \
|
||||||
|
{"tls/$_arch/",tls/,"$_arch/",}"libnss_myhostname.so.*" \
|
||||||
|
{"tls/$_arch/",tls/,"$_arch/",}"libnss_resolve.so.*"
|
||||||
|
|
||||||
|
for i in \
|
||||||
|
systemd-networkd-wait-online.service \
|
||||||
|
systemd-networkd.service \
|
||||||
|
systemd-networkd.socket
|
||||||
|
# systemd-timesyncd.service
|
||||||
|
do
|
||||||
|
systemctl --root "$initdir" enable "$i"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
11
modules.d/03modsign/load-modsign-keys.sh
Executable file
11
modules.d/03modsign/load-modsign-keys.sh
Executable file
@@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# Licensed under the GPLv2
|
||||||
|
#
|
||||||
|
# Copyright 2013 Red Hat, Inc.
|
||||||
|
# Peter Jones <pjones@redhat.com>
|
||||||
|
|
||||||
|
for x in /lib/modules/keys/* ; do
|
||||||
|
[ "${x}" = "/lib/modules/keys/*" ] && break
|
||||||
|
keyctl padd asymmetric "" @s < ${x}
|
||||||
|
done
|
||||||
38
modules.d/03modsign/module-setup.sh
Executable file
38
modules.d/03modsign/module-setup.sh
Executable file
@@ -0,0 +1,38 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Licensed under the GPLv2
|
||||||
|
#
|
||||||
|
# Copyright 2013 Red Hat, Inc.
|
||||||
|
# Peter Jones <pjones@redhat.com>
|
||||||
|
|
||||||
|
# called by dracut
|
||||||
|
check() {
|
||||||
|
require_binaries keyctl || return 1
|
||||||
|
|
||||||
|
# do not include module in hostonly mode,
|
||||||
|
# if no keys are present
|
||||||
|
if [[ $hostonly ]]; then
|
||||||
|
x=$(echo /lib/modules/keys/*)
|
||||||
|
[[ "${x}" = "/lib/modules/keys/*" ]] && return 255
|
||||||
|
fi
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
# called by dracut
|
||||||
|
depends() {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
# called by dracut
|
||||||
|
install() {
|
||||||
|
inst_dir /lib/modules/keys
|
||||||
|
inst_binary keyctl
|
||||||
|
|
||||||
|
inst_hook pre-trigger 01 "$moddir/load-modsign-keys.sh"
|
||||||
|
|
||||||
|
for x in /lib/modules/keys/* ; do
|
||||||
|
[[ "${x}" = "/lib/modules/keys/*" ]] && break
|
||||||
|
inst_simple "${x}"
|
||||||
|
done
|
||||||
|
}
|
||||||
20
modules.d/03rescue/module-setup.sh
Executable file
20
modules.d/03rescue/module-setup.sh
Executable file
@@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# called by dracut
|
||||||
|
check() {
|
||||||
|
# do not add this module by default
|
||||||
|
return 255
|
||||||
|
}
|
||||||
|
|
||||||
|
# called by dracut
|
||||||
|
depends() {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
# called by dracut
|
||||||
|
install() {
|
||||||
|
inst_multiple -o ps grep more cat rm strace free showmount \
|
||||||
|
ping netstat rpcinfo vi scp ping6 ssh \
|
||||||
|
fsck fsck.ext2 fsck.ext4 fsck.ext3 fsck.ext4dev fsck.f2fs fsck.vfat e2fsck
|
||||||
|
}
|
||||||
|
|
||||||
79
modules.d/04watchdog/module-setup.sh
Executable file
79
modules.d/04watchdog/module-setup.sh
Executable file
@@ -0,0 +1,79 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# called by dracut
|
||||||
|
check() {
|
||||||
|
return 255
|
||||||
|
}
|
||||||
|
|
||||||
|
# called by dracut
|
||||||
|
depends() {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
# called by dracut
|
||||||
|
install() {
|
||||||
|
# Do not add watchdog hooks if systemd module is included
|
||||||
|
# In that case, systemd will manage watchdog kick
|
||||||
|
if ! dracut_module_included "systemd"; then
|
||||||
|
inst_hook cmdline 00 "$moddir/watchdog.sh"
|
||||||
|
inst_hook cmdline 50 "$moddir/watchdog.sh"
|
||||||
|
inst_hook pre-trigger 00 "$moddir/watchdog.sh"
|
||||||
|
inst_hook initqueue 00 "$moddir/watchdog.sh"
|
||||||
|
inst_hook mount 00 "$moddir/watchdog.sh"
|
||||||
|
inst_hook mount 50 "$moddir/watchdog.sh"
|
||||||
|
inst_hook mount 99 "$moddir/watchdog.sh"
|
||||||
|
inst_hook pre-pivot 00 "$moddir/watchdog.sh"
|
||||||
|
inst_hook pre-pivot 99 "$moddir/watchdog.sh"
|
||||||
|
inst_hook cleanup 00 "$moddir/watchdog.sh"
|
||||||
|
inst_hook cleanup 99 "$moddir/watchdog.sh"
|
||||||
|
fi
|
||||||
|
inst_hook emergency 02 "$moddir/watchdog-stop.sh"
|
||||||
|
inst_multiple -o wdctl
|
||||||
|
}
|
||||||
|
|
||||||
|
installkernel() {
|
||||||
|
local -A _drivers
|
||||||
|
local _alldrivers _active _wdtdrv _wdtppath _dir
|
||||||
|
[[ -d /sys/class/watchdog/ ]] || return
|
||||||
|
for _dir in /sys/class/watchdog/*; do
|
||||||
|
[[ -d "$_dir" ]] || continue
|
||||||
|
[[ -f "$_dir/state" ]] || continue
|
||||||
|
_active=$(< "$_dir/state")
|
||||||
|
! [[ $hostonly ]] || [[ "$_active" = "active" ]] || continue
|
||||||
|
# device/modalias will return driver of this device
|
||||||
|
_wdtdrv=$(< "$_dir/device/modalias")
|
||||||
|
# There can be more than one module represented by same
|
||||||
|
# modalias. Currently load all of them.
|
||||||
|
# TODO: Need to find a way to avoid any unwanted module
|
||||||
|
# represented by modalias
|
||||||
|
_wdtdrv=$(modprobe --set-version "$kernel" -R $_wdtdrv 2>/dev/null)
|
||||||
|
if [[ $_wdtdrv ]]; then
|
||||||
|
instmods $_wdtdrv
|
||||||
|
for i in $_wdtdrv; do
|
||||||
|
_drivers[$i]=1
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
# however in some cases, we also need to check that if there is
|
||||||
|
# a specific driver for the parent bus/device. In such cases
|
||||||
|
# we also need to enable driver for parent bus/device.
|
||||||
|
_wdtppath=$(readlink -f "$_dir/device")
|
||||||
|
while [[ -d "$_wdtppath" ]] && [[ "$_wdtppath" != "/sys" ]]; do
|
||||||
|
_wdtppath=$(readlink -f "$_wdtppath/..")
|
||||||
|
[[ -f "$_wdtppath/modalias" ]] || continue
|
||||||
|
|
||||||
|
_wdtdrv=$(< "$_wdtppath/modalias")
|
||||||
|
_wdtdrv=$(modprobe --set-version "$kernel" -R $_wdtdrv 2>/dev/null)
|
||||||
|
if [[ $_wdtdrv ]]; then
|
||||||
|
instmods $_wdtdrv
|
||||||
|
for i in $_wdtdrv; do
|
||||||
|
_drivers[$i]=1
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
|
# ensure that watchdog module is loaded as early as possible
|
||||||
|
_alldrivers="${!_drivers[*]}"
|
||||||
|
[[ $_alldrivers ]] && echo "rd.driver.pre=${_alldrivers// /,}" > ${initdir}/etc/cmdline.d/00-watchdog.conf
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
||||||
2
modules.d/04watchdog/watchdog-stop.sh
Executable file
2
modules.d/04watchdog/watchdog-stop.sh
Executable file
@@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
[ -c /dev/watchdog ] && printf 'V' > /dev/watchdog
|
||||||
12
modules.d/04watchdog/watchdog.sh
Executable file
12
modules.d/04watchdog/watchdog.sh
Executable file
@@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
if [ -e /dev/watchdog ]; then
|
||||||
|
if [ ! -e /tmp/watchdog_timeout ]; then
|
||||||
|
wdctl -s 60 /dev/watchdog >/dev/null 2>&1
|
||||||
|
> /tmp/watchdog_timeout
|
||||||
|
fi
|
||||||
|
info "Triggering watchdog"
|
||||||
|
>/dev/watchdog
|
||||||
|
else
|
||||||
|
modprobe ib700wdt
|
||||||
|
modprobe i6300esb
|
||||||
|
fi
|
||||||
34
modules.d/05busybox/module-setup.sh
Executable file
34
modules.d/05busybox/module-setup.sh
Executable file
@@ -0,0 +1,34 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# called by dracut
|
||||||
|
check() {
|
||||||
|
require_binaries busybox || return 1
|
||||||
|
|
||||||
|
return 255
|
||||||
|
}
|
||||||
|
|
||||||
|
# called by dracut
|
||||||
|
depends() {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
# called by dracut
|
||||||
|
install() {
|
||||||
|
local _i _progs _path _busybox
|
||||||
|
_busybox=$(type -P busybox)
|
||||||
|
inst $_busybox /usr/bin/busybox
|
||||||
|
for _i in $($_busybox | sed -ne '1,/Currently/!{s/,//g; s/busybox//g; p}')
|
||||||
|
do
|
||||||
|
_progs="$_progs $_i"
|
||||||
|
done
|
||||||
|
|
||||||
|
# FIXME: switch_root should be in the above list, but busybox version hangs
|
||||||
|
# (using busybox-1.15.1-7.fc14.i686 at the time of writing)
|
||||||
|
|
||||||
|
for _i in $_progs; do
|
||||||
|
_path=$(find_binary "$_i")
|
||||||
|
[ -z "$_path" ] && continue
|
||||||
|
ln_r /usr/bin/busybox $_path
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user