Compare commits
1007 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
a0799ffb55 | ||
![]() |
65f78f3d74 | ||
![]() |
2b909b9a4b | ||
![]() |
ed25fb0e91 | ||
![]() |
c2408eed7f | ||
![]() |
1792759721 | ||
![]() |
e316ae0e43 | ||
![]() |
5abd692fe4 | ||
![]() |
1279a9e1a0 | ||
![]() |
0baf5a3e99 | ||
![]() |
bdf0f9ce32 | ||
![]() |
ae989390a1 | ||
![]() |
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 | ||
![]() |
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 | ||
![]() |
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 |
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)))
|
||||||
|
|
6
.gitignore
vendored
6
.gitignore
vendored
@@ -6,6 +6,8 @@
|
|||||||
/dracut-gencmdline.8
|
/dracut-gencmdline.8
|
||||||
/dracut.html
|
/dracut.html
|
||||||
/dracut.kernel.7
|
/dracut.kernel.7
|
||||||
|
/dracut.pc
|
||||||
|
/dracut-install
|
||||||
/modules.d/99base/switch_root
|
/modules.d/99base/switch_root
|
||||||
/test/*/test.log
|
/test/*/test.log
|
||||||
test*.img
|
test*.img
|
||||||
@@ -15,5 +17,7 @@ test*.img
|
|||||||
/install/dracut-install
|
/install/dracut-install
|
||||||
/*.rpm
|
/*.rpm
|
||||||
/*.[0-9]
|
/*.[0-9]
|
||||||
/modules.d/98systemd/*.service.8
|
/modules.d/98dracut-systemd/*.service.8
|
||||||
/*.sign
|
/*.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"
|
||||||
|
}
|
||||||
|
}
|
5
.mailmap
5
.mailmap
@@ -10,7 +10,10 @@ Andrey Borzenkov <arvidjaar@gmail.com> <arvidjaar@mail.ru>
|
|||||||
Dan Horák <dhorak@redhat.com> <dan@danny.cz>
|
Dan Horák <dhorak@redhat.com> <dan@danny.cz>
|
||||||
John Reiser <jreiser@bitwagon.com> <jreiser@BitWagon.com>
|
John Reiser <jreiser@bitwagon.com> <jreiser@BitWagon.com>
|
||||||
Luca Berra <bluca@vodka.it> <bluca@comedia.it>
|
Luca Berra <bluca@vodka.it> <bluca@comedia.it>
|
||||||
Dave Young <dyoung@redhat.com> dyoung@redhat.com
|
Dave Young <dyoung@redhat.com> <dyoung@redhat.com>
|
||||||
|
Dave Young <dyoung@redhat.com> <dave@redhat.com>
|
||||||
Frederick Grose <fgrose@sugarlabs.org> <fgrose@gmail.com>
|
Frederick Grose <fgrose@sugarlabs.org> <fgrose@gmail.com>
|
||||||
Frederic Crozat <fcrozat@suse.com> <fcrozat@mandriva.com>
|
Frederic Crozat <fcrozat@suse.com> <fcrozat@mandriva.com>
|
||||||
Shawn W Dunn <sfalken@opensuse.org> <sfalken@opensuse.org>
|
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>
|
||||||
|
@@ -1,32 +1,52 @@
|
|||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
||||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
|
||||||
|
|
||||||
if [[ -f /etc/kernel/cmdline ]]; then
|
COMMAND="$1"
|
||||||
readarray -t BOOT_OPTIONS < /etc/kernel/cmdline
|
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
|
fi
|
||||||
|
|
||||||
if ! [[ "${BOOT_OPTIONS[@]}" ]]; then
|
|
||||||
readarray -t 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
|
|
||||||
|
|
||||||
ret=0
|
ret=0
|
||||||
case "$1" in
|
case "$COMMAND" in
|
||||||
add)
|
add)
|
||||||
dracut ${noimageifnotneeded:+--noimageifnotneeded} "$3"/initrd "$2"
|
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 --reflink=auto "$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 ${noimageifnotneeded:+--noimageifnotneeded} "$BOOT_DIR_ABS"/initrd "$KERNEL_VERSION"
|
||||||
ret=$?
|
ret=$?
|
||||||
;;
|
;;
|
||||||
remove)
|
remove)
|
||||||
rm -f -- "$3"/initrd
|
rm -f -- "$BOOT_DIR_ABS"/initrd
|
||||||
ret=$?
|
ret=$?
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@@ -1,6 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
||||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
|
||||||
|
|
||||||
export LANG=C
|
export LANG=C
|
||||||
|
|
||||||
@@ -59,7 +57,7 @@ if [[ ! -f $INITRDFILE ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -f $NEW_KERNEL_IMAGE ]]; then
|
if [[ ! -f $NEW_KERNEL_IMAGE ]]; then
|
||||||
cp "$KERNEL_IMAGE" "$NEW_KERNEL_IMAGE"
|
cp --reflink=auto "$KERNEL_IMAGE" "$NEW_KERNEL_IMAGE"
|
||||||
((ret+=$?))
|
((ret+=$?))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@@ -1,6 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
||||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
|
||||||
|
|
||||||
export LANG=C
|
export LANG=C
|
||||||
|
|
||||||
@@ -35,32 +33,45 @@ dropindirs_sort()
|
|||||||
|
|
||||||
[[ -f /etc/os-release ]] && . /etc/os-release
|
[[ -f /etc/os-release ]] && . /etc/os-release
|
||||||
|
|
||||||
if [[ ! -f /etc/machine-id ]] || [[ ! -s /etc/machine-id ]]; then
|
if [[ ${KERNEL_INSTALL_MACHINE_ID+x} ]]; then
|
||||||
systemd-machine-id-setup
|
MACHINE_ID=$KERNEL_INSTALL_MACHINE_ID
|
||||||
|
elif [[ -f /etc/machine-id ]] ; then
|
||||||
|
read MACHINE_ID < /etc/machine-id
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[[ -f /etc/machine-id ]] && read MACHINE_ID < /etc/machine-id
|
if ! [[ $MACHINE_ID ]]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ -f /etc/kernel/cmdline ]]; then
|
if [[ -f /etc/kernel/cmdline ]]; then
|
||||||
readarray -t BOOT_OPTIONS < /etc/kernel/cmdline
|
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
|
fi
|
||||||
|
|
||||||
if ! [[ "${BOOT_OPTIONS[@]}" ]]; then
|
if ! [[ "${BOOT_OPTIONS[@]}" ]]; then
|
||||||
readarray -t BOOT_OPTIONS < /proc/cmdline
|
read -r -d '' -a line < /proc/cmdline
|
||||||
|
for i in "${line[@]}"; do
|
||||||
|
[[ "${i#initrd=*}" != "$i" ]] && continue
|
||||||
|
BOOT_OPTIONS+=("$i")
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
if ! [[ $BOOT_OPTIONS ]]; then
|
|
||||||
|
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
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
LOADER_ENTRY="/boot/loader/entries/${MACHINE_ID}-0-rescue.conf"
|
|
||||||
BOOT_DIR="/${MACHINE_ID}/0-rescue"
|
BOOT_DIR="/${MACHINE_ID}/0-rescue"
|
||||||
|
BOOT_ROOT=${BOOT_DIR_ABS%$BOOT_DIR}
|
||||||
|
LOADER_ENTRY="$BOOT_ROOT/loader/entries/${MACHINE_ID}-0-rescue.conf"
|
||||||
|
|
||||||
ret=0
|
ret=0
|
||||||
|
|
||||||
case "$COMMAND" in
|
case "$COMMAND" in
|
||||||
add)
|
add)
|
||||||
for i in "/boot/loader/entries/${MACHINE_ID}-0-rescue.conf"; do
|
[[ -f "$LOADER_ENTRY" ]] && exit 0
|
||||||
[[ -f $i ]] && exit 0
|
|
||||||
done
|
|
||||||
|
|
||||||
# source our config dir
|
# source our config dir
|
||||||
for f in $(dropindirs_sort ".conf" "/etc/dracut.conf.d" "/usr/lib/dracut/dracut.conf.d"); do
|
for f in $(dropindirs_sort ".conf" "/etc/dracut.conf.d" "/usr/lib/dracut/dracut.conf.d"); do
|
||||||
@@ -71,11 +82,11 @@ case "$COMMAND" in
|
|||||||
|
|
||||||
[[ -d "$BOOT_DIR_ABS" ]] || mkdir -p "$BOOT_DIR_ABS"
|
[[ -d "$BOOT_DIR_ABS" ]] || mkdir -p "$BOOT_DIR_ABS"
|
||||||
|
|
||||||
if ! cp "$KERNEL_IMAGE" "$BOOT_DIR_ABS"/linux; then
|
if ! cp --reflink=auto "$KERNEL_IMAGE" "$BOOT_DIR_ABS"/linux; then
|
||||||
echo "Can't copy '$KERNEL_IMAGE to '$BOOT_DIR_ABS/linux'!" >&2
|
echo "Can't copy '$KERNEL_IMAGE to '$BOOT_DIR_ABS/linux'!" >&2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dracut --no-hostonly -a "rescue" "$BOOT_DIR_ABS"/initrd "$2"
|
dracut --no-hostonly -a "rescue" "$BOOT_DIR_ABS"/initrd "$KERNEL_VERSION"
|
||||||
((ret+=$?))
|
((ret+=$?))
|
||||||
|
|
||||||
{
|
{
|
||||||
|
133
AUTHORS
133
AUTHORS
@@ -4,115 +4,188 @@ Amadeusz Żołnowski <aidecoe@aidecoe.name>
|
|||||||
Will Woods <wwoods@redhat.com>
|
Will Woods <wwoods@redhat.com>
|
||||||
Philippe Seewer <philippe.seewer@bfh.ch>
|
Philippe Seewer <philippe.seewer@bfh.ch>
|
||||||
Warren Togami <wtogami@redhat.com>
|
Warren Togami <wtogami@redhat.com>
|
||||||
Jeremy Katz <katzj@redhat.com>
|
|
||||||
Dave Young <dyoung@redhat.com>
|
Dave Young <dyoung@redhat.com>
|
||||||
|
Jeremy Katz <katzj@redhat.com>
|
||||||
David Dillow <dave@thedillows.org>
|
David Dillow <dave@thedillows.org>
|
||||||
Michal Soltys <soltys@ziu.info>
|
|
||||||
Amerigo Wang <amwang@redhat.com>
|
|
||||||
Colin Guthrie <colin@mageia.org>
|
|
||||||
Andrey Borzenkov <arvidjaar@gmail.com>
|
|
||||||
Peter Jones <pjones@redhat.com>
|
|
||||||
WANG Chao <chaowang@redhat.com>
|
|
||||||
Andreas Thienemann <andreas@bawue.net>
|
|
||||||
Hannes Reinecke <hare@suse.de>
|
Hannes Reinecke <hare@suse.de>
|
||||||
|
Michal Soltys <soltys@ziu.info>
|
||||||
|
Colin Guthrie <colin@mageia.org>
|
||||||
|
Amerigo Wang <amwang@redhat.com>
|
||||||
|
Thomas Renninger <trenn@suse.de>
|
||||||
|
WANG Chao <chaowang@redhat.com>
|
||||||
|
Andrey Borzenkov <arvidjaar@gmail.com>
|
||||||
|
Alexander Tsoy <alexander@tsoy.me>
|
||||||
|
Peter Jones <pjones@redhat.com>
|
||||||
|
Andreas Thienemann <andreas@bawue.net>
|
||||||
Hans de Goede <hdegoede@redhat.com>
|
Hans de Goede <hdegoede@redhat.com>
|
||||||
|
Frederick Grose <fgrose@sugarlabs.org>
|
||||||
John Reiser <jreiser@bitwagon.com>
|
John Reiser <jreiser@bitwagon.com>
|
||||||
Luca Berra <bluca@vodka.it>
|
Luca Berra <bluca@vodka.it>
|
||||||
Thomas Renninger <trenn@suse.de>
|
|
||||||
Alexander Tsoy <alexander@tsoy.me>
|
|
||||||
Daniel Drake <dsd@laptop.org>
|
|
||||||
Brian C. Lane <bcl@redhat.com>
|
Brian C. Lane <bcl@redhat.com>
|
||||||
|
Daniel Drake <dsd@laptop.org>
|
||||||
|
Peter Robinson <pbrobinson@gmail.com>
|
||||||
|
Ville Skyttä <ville.skytta@iki.fi>
|
||||||
Dan Horák <dhorak@redhat.com>
|
Dan Horák <dhorak@redhat.com>
|
||||||
|
Daniel Molkentin <dmolkentin@suse.com>
|
||||||
Baoquan He <bhe@redhat.com>
|
Baoquan He <bhe@redhat.com>
|
||||||
|
Brendan Germain <brendan.germain@nasdaqomx.com>
|
||||||
Leho Kraav <leho@kraav.com>
|
Leho Kraav <leho@kraav.com>
|
||||||
Kamil Rytarowski <n54@gmx.com>
|
Xunlei Pang <xlpang@redhat.com>
|
||||||
Marc Grimme <grimme@atix.de>
|
|
||||||
Peter Rajnoha <prajnoha@redhat.com>
|
|
||||||
Chao Wang <chaowang@redhat.com>
|
|
||||||
Colin Walters <walters@verbum.org>
|
Colin Walters <walters@verbum.org>
|
||||||
|
Cristian Rodríguez <crrodriguez@opensuse.org>
|
||||||
|
Fabian Deutsch <fabiand@fedoraproject.org>
|
||||||
|
Kamil Rytarowski <n54@gmx.com>
|
||||||
|
Lukas Nykryn <lnykryn@redhat.com>
|
||||||
|
Marc Grimme <grimme@atix.de>
|
||||||
|
NeilBrown <neilb@suse.de>
|
||||||
|
Nicolas Chauvet <kwizart@gmail.com>
|
||||||
|
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>
|
Frederic Crozat <fcrozat@suse.com>
|
||||||
|
James Lee <jlee@thestaticvoid.com>
|
||||||
Jesse Keating <jkeating@redhat.com>
|
Jesse Keating <jkeating@redhat.com>
|
||||||
Milan Broz <mbroz@redhat.com>
|
Milan Broz <mbroz@redhat.com>
|
||||||
Radek Vykydal <rvykydal@redhat.com>
|
Mimi Zohar <zohar@linux.vnet.ibm.com>
|
||||||
Roberto Sassu <roberto.sassu@polito.it>
|
Roberto Sassu <roberto.sassu@polito.it>
|
||||||
|
Stefan Reimer <it@startux.de>
|
||||||
Anton Blanchard <anton@samba.org>
|
Anton Blanchard <anton@samba.org>
|
||||||
Bill Nottingham <notting@redhat.com>
|
Bill Nottingham <notting@redhat.com>
|
||||||
|
Chapman Flack <g2@anastigmatix.net>
|
||||||
|
Chris Leech <cleech@redhat.com>
|
||||||
David Cantrell <dcantrell@redhat.com>
|
David Cantrell <dcantrell@redhat.com>
|
||||||
Dennis Gilmore <dennis@ausil.us>
|
Dennis Gilmore <dennis@ausil.us>
|
||||||
|
Jan Synacek <jsynacek@redhat.com>
|
||||||
Jon Ander Hernandez <jonan.h@gmail.com>
|
Jon Ander Hernandez <jonan.h@gmail.com>
|
||||||
Juan RP <xtraeme@gmail.com>
|
Juan RP <xtraeme@gmail.com>
|
||||||
Lance Albertson <lance@osuosl.org>
|
Lance Albertson <lance@osuosl.org>
|
||||||
|
Lidong Zhong <lzhong@suse.com>
|
||||||
Marian Ganisin <mganisin@redhat.com>
|
Marian Ganisin <mganisin@redhat.com>
|
||||||
Michael Ploujnikov <plouj@somanetworks.com>
|
Michael Ploujnikov <plouj@somanetworks.com>
|
||||||
|
Mike Gilbert <floppym@gentoo.org>
|
||||||
|
Pratyush Anand <panand@redhat.com>
|
||||||
|
Silvio Fricke <silvio.fricke@gmail.com>
|
||||||
Stig Telfer <stelfer@cray.com>
|
Stig Telfer <stelfer@cray.com>
|
||||||
|
Vasiliy Tolstov <v.tolstov@selfip.ru>
|
||||||
Wim Muskee <wimmuskee@gmail.com>
|
Wim Muskee <wimmuskee@gmail.com>
|
||||||
|
yuwata <watanabe.yu+github@gmail.com>
|
||||||
Alan Jenkins <alan-jenkins@tuffmail.co.uk>
|
Alan Jenkins <alan-jenkins@tuffmail.co.uk>
|
||||||
Alan Pevec <apevec@redhat.com>
|
Alan Pevec <apevec@redhat.com>
|
||||||
Cristian Rodríguez <crrodriguez@opensuse.org>
|
Alex Harpin <development@landsofshadow.co.uk>
|
||||||
Frederick Grose <fgrose@sugarlabs.org>
|
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>
|
||||||
|
Fabian Vogt <fvogt@suse.com>
|
||||||
|
Guido Trentalancia <guido@trentalancia.net>
|
||||||
|
Hari Bathini <hbathini@linux.vnet.ibm.com>
|
||||||
Ian Dall <ian@beware.dropbear.id.au>
|
Ian Dall <ian@beware.dropbear.id.au>
|
||||||
James Buren <ryuo@frugalware.org>
|
James Buren <ryuo@frugalware.org>
|
||||||
James Lee <jlee@thestaticvoid.com>
|
|
||||||
Joey Boggs <jboggs@redhat.com>
|
Joey Boggs <jboggs@redhat.com>
|
||||||
Koen Kooi <koen@dominion.thruhere.net>
|
Koen Kooi <koen@dominion.thruhere.net>
|
||||||
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
|
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
|
||||||
|
Kyle McMartin <kmcmarti@redhat.com>
|
||||||
|
Lubomir Rintel <lkundrak@v3.sk>
|
||||||
|
Lukas Wunner <lukas@wunner.de>
|
||||||
Mike Snitzer <snitzer@redhat.com>
|
Mike Snitzer <snitzer@redhat.com>
|
||||||
|
Minfei Huang <mhuang@redhat.com>
|
||||||
|
Moritz Maxeiner <moritz@ucworks.org>
|
||||||
Przemysław Rudy <prudy1@o2.pl>
|
Przemysław Rudy <prudy1@o2.pl>
|
||||||
Stefan Reimer <it@startux.de>
|
Stefan Berger <stefanb@us.ibm.com>
|
||||||
|
Thomas Backlund <tmb@mageia.org>
|
||||||
Thomas Lange <lange@informatik.uni-koeln.de>
|
Thomas Lange <lange@informatik.uni-koeln.de>
|
||||||
Till Maas <opensource@till.name>
|
Till Maas <opensource@till.name>
|
||||||
Vivek Goyal <vgoyal@redhat.com>
|
Vivek Goyal <vgoyal@redhat.com>
|
||||||
Vladislav Bogdanov <bubble@hoster-ok.com>
|
Vladislav Bogdanov <bubble@hoster-ok.com>
|
||||||
|
Yu Watanabe <watanabe.yu+github@gmail.com>
|
||||||
|
pallotron <pallotron@fb.com>
|
||||||
Adam Williamson <awilliam@redhat.com>
|
Adam Williamson <awilliam@redhat.com>
|
||||||
|
Alexander Kurtz <alexander@kurtz.be>
|
||||||
Alexander Todorov <atodorov@redhat.com>
|
Alexander Todorov <atodorov@redhat.com>
|
||||||
|
Andreas Stieger <astieger@suse.com>
|
||||||
|
Andrei Borzenkov <arvidjaar@gmail.com>
|
||||||
Andy Lutomirski <luto@mit.edu>
|
Andy Lutomirski <luto@mit.edu>
|
||||||
Anssi Hannula <anssi@mageia.org>
|
Anssi Hannula <anssi@mageia.org>
|
||||||
Brandon Philips <brandon@ifup.co>
|
Brandon Philips <brandon@ifup.co>
|
||||||
Canek Peláez Valdés <caneko@gmail.com>
|
Canek Peláez Valdés <caneko@gmail.com>
|
||||||
Chris Leech <cleech@redhat.com>
|
Chad Dupuis <chad.dupuis@cavium.com>
|
||||||
Christian Heinz <christian.ch.heinz@gmail.com>
|
Christian Heinz <christian.ch.heinz@gmail.com>
|
||||||
|
Christian Rodrigues <crrodriguez@opensuse.org>
|
||||||
Cong Wang <amwang@redhat.com>
|
Cong Wang <amwang@redhat.com>
|
||||||
Daniel Schaal <farbing@web.de>
|
Dan Fuhry <dfuhry@datto.com>
|
||||||
|
Daniel Drake <drake@endlessm.com>
|
||||||
Dave Jones <davej@redhat.com>
|
Dave Jones <davej@redhat.com>
|
||||||
Dave Young <dave@redhat.com>
|
David Disseldorp <ddiss@suse.de>
|
||||||
|
David Michael <david.michael@coreos.com>
|
||||||
Dennis Schridde <devurandom@gmx.net>
|
Dennis Schridde <devurandom@gmx.net>
|
||||||
Duane Griffin <duaneg@dghda.com>
|
Duane Griffin <duaneg@dghda.com>
|
||||||
|
Elan Ruusamäe <glen@delfi.ee>
|
||||||
|
Fabian <fvogt@suse.com>
|
||||||
|
Florian Albrechtskirchinger <falbrechtskirchinger@gmail.com>
|
||||||
|
Gerd von Egidy <gerd.von.egidy@intra2net.com>
|
||||||
Glen Gray <slaine@slaine.org>
|
Glen Gray <slaine@slaine.org>
|
||||||
Hari Bathini <hbathini@linux.vnet.ibm.com>
|
HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
|
||||||
Hermann Gausterer <git-dracut-2012@mrq1.org>
|
Hermann Gausterer <git-dracut-2012@mrq1.org>
|
||||||
|
Imran Haider <imran1008@gmail.com>
|
||||||
James Laska <jlaska@redhat.com>
|
James Laska <jlaska@redhat.com>
|
||||||
Jan Stodola <jstodola@redhat.com>
|
Jan Stodola <jstodola@redhat.com>
|
||||||
Jiri Pirko <jiri@resnulli.us>
|
Jiri Pirko <jiri@resnulli.us>
|
||||||
Joe Lawrence <Joe.Lawrence@stratus.com>
|
Joe Lawrence <Joe.Lawrence@stratus.com>
|
||||||
|
Jonas Jonsson <jonas@websystem.se>
|
||||||
|
Julian Wolf <juwolf@suse.com>
|
||||||
Kevin Yung <Kevin.Yung@myob.com>
|
Kevin Yung <Kevin.Yung@myob.com>
|
||||||
Kyle McMartin <kmcmarti@redhat.com>
|
|
||||||
Kyle McMartin <kyle@redhat.com>
|
|
||||||
Lars R. Damerow <lars@pixar.com>
|
Lars R. Damerow <lars@pixar.com>
|
||||||
Lennert Buytenhek <buytenh@wantstofly.org>
|
Lennert Buytenhek <buytenh@wantstofly.org>
|
||||||
Lubomir Rintel <lkundrak@v3.sk>
|
Lidong Zhong <lidong.zhong@suse.com>
|
||||||
|
Major Hayden <major@mhtx.net>
|
||||||
|
Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
|
||||||
Marian Csontos <mcsontos@redhat.com>
|
Marian Csontos <mcsontos@redhat.com>
|
||||||
|
Marko Myllynen <myllynen@redhat.com>
|
||||||
|
Martin Wilck <mwilck@suse.com>
|
||||||
Matt <smoothsailing72@hotmail.com>
|
Matt <smoothsailing72@hotmail.com>
|
||||||
Matt Smith <shadowfax@gmx.com>
|
Matt Smith <shadowfax@gmx.com>
|
||||||
|
Mei Liu <liumbj@linux.vnet.ibm.com>
|
||||||
|
Michael Chapman <mike@very.puzzling.org>
|
||||||
Michal Schmidt <mschmidt@redhat.com>
|
Michal Schmidt <mschmidt@redhat.com>
|
||||||
Mike Gorse <mgorse@suse.com>
|
Mike Gorse <mgorse@suse.com>
|
||||||
|
Moritz 'Morty' Strübe <morty@gmx.net>
|
||||||
Munehiro Matsuda <haro@kgt.co.jp>
|
Munehiro Matsuda <haro@kgt.co.jp>
|
||||||
Nicolas Chauvet <kwizart@gmail.com>
|
Nikoli <nikoli@gmx.us>
|
||||||
Nikoli <nikoli@lavabit.com>
|
Nikoli <nikoli@lavabit.com>
|
||||||
Olivier Blin <dev@blino.org>
|
Olivier Blin <dev@blino.org>
|
||||||
P J P <ppandit@redhat.com>
|
P J P <ppandit@redhat.com>
|
||||||
Paolo Bonzini <pbonzini@redhat.com>
|
Paolo Bonzini <pbonzini@redhat.com>
|
||||||
|
Pekka Wallendahl <wyrmiyu@gmail.com>
|
||||||
Peter Robinson <pbrobinson@fedoraproject.org>
|
Peter Robinson <pbrobinson@fedoraproject.org>
|
||||||
|
Praveen_Paladugu@Dell.com <Praveen_Paladugu@Dell.com>
|
||||||
Pádraig Brady <P@draigBrady.com>
|
Pádraig Brady <P@draigBrady.com>
|
||||||
Quentin Armitage <quentin@armitage.org.uk>
|
Quentin Armitage <quentin@armitage.org.uk>
|
||||||
Robert Buchholz <rbu@goodpoint.de>
|
Robert Buchholz <rbu@goodpoint.de>
|
||||||
|
Ruben Kerkhof <ruben@rubenkerkhof.com>
|
||||||
|
Rusty Bird <rustybird@openmailbox.org>
|
||||||
Sergey Fionov <fionov@gmail.com>
|
Sergey Fionov <fionov@gmail.com>
|
||||||
Shawn W Dunn <sfalken@opensuse.org>
|
Shawn W Dunn <sfalken@opensuse.org>
|
||||||
Srinivasa T N <seenutn@linux.vnet.ibm.com>
|
Srinivasa T N <seenutn@linux.vnet.ibm.com>
|
||||||
|
Stijn Hoop <stijn@sandcat.nl>
|
||||||
Thilo Bangert <thilo.bangert@gmx.net>
|
Thilo Bangert <thilo.bangert@gmx.net>
|
||||||
Thomas Backlund <tmb@mageia.org>
|
Tobias Geerinckx <tobias.geerinckx@gmail.com>
|
||||||
|
Tom Gundersen <teg@jklm.no>
|
||||||
Tomasz Torcz <tomek@pipebreaker.pl>
|
Tomasz Torcz <tomek@pipebreaker.pl>
|
||||||
|
Tong Li <tonli@redhat.com>
|
||||||
Vadim Kuznetsov <vadimk@gentoo.org>
|
Vadim Kuznetsov <vadimk@gentoo.org>
|
||||||
Ville Skyttä <ville.skytta@iki.fi>
|
Vaughan Cao <vaughan.cao@oracle.com>
|
||||||
Vratislav Podzimek <vpodzime@redhat.com>
|
Vratislav Podzimek <vpodzime@redhat.com>
|
||||||
|
Xunlei Pang <xpang@redhat.com>
|
||||||
Yanko Kaneti <yaneti@declera.com>
|
Yanko Kaneti <yaneti@declera.com>
|
||||||
|
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
|
||||||
|
Zhiguo Deng <bjzgdeng@linux.vnet.ibm.com>
|
||||||
|
honza801 <honza801@gmail.com>
|
||||||
|
jloeser <jloeser@suse.de>
|
||||||
maximilian attems <max@stro.at>
|
maximilian attems <max@stro.at>
|
||||||
|
tpg <tpgxyz@gmail.com>
|
||||||
|
xtraeme <xtraeme@voidlinux.eu>
|
||||||
|
83
Makefile
83
Makefile
@@ -1,7 +1,7 @@
|
|||||||
-include dracut-version.sh
|
-include dracut-version.sh
|
||||||
|
|
||||||
VERSION = $(shell [ -d .git ] && git describe --abbrev=0 --tags 2>/dev/null || echo $(DRACUT_VERSION))
|
VERSION ?= $(shell [ -d .git ] && git describe --abbrev=0 --tags 2>/dev/null || echo $(DRACUT_VERSION))
|
||||||
GITVERSION = $(shell [ -d .git ] && { v=$$(git describe --tags 2>/dev/null); [ $${v\#*-} != $$v ] && echo -$${v\#*-}; } )
|
GITVERSION ?= $(shell [ -d .git ] && { v=$$(git describe --tags 2>/dev/null); [ -n "$$v" ] && [ $${v\#*-} != $$v ] && echo -$${v\#*-}; } )
|
||||||
|
|
||||||
-include Makefile.inc
|
-include Makefile.inc
|
||||||
|
|
||||||
@@ -13,8 +13,9 @@ sysconfdir ?= ${prefix}/etc
|
|||||||
bindir ?= ${prefix}/bin
|
bindir ?= ${prefix}/bin
|
||||||
mandir ?= ${prefix}/share/man
|
mandir ?= ${prefix}/share/man
|
||||||
CFLAGS ?= -O2 -g -Wall
|
CFLAGS ?= -O2 -g -Wall
|
||||||
CFLAGS += -std=gnu99 -D_FILE_OFFSET_BITS=64
|
CFLAGS += -std=gnu99 -D_FILE_OFFSET_BITS=64 -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 $(KMOD_CFLAGS)
|
||||||
bashcompletiondir ?= ${datadir}/bash-completion/completions
|
bashcompletiondir ?= ${datadir}/bash-completion/completions
|
||||||
|
pkgconfigdatadir ?= $(datadir)/pkgconfig
|
||||||
|
|
||||||
man1pages = lsinitrd.1
|
man1pages = lsinitrd.1
|
||||||
|
|
||||||
@@ -28,20 +29,20 @@ man8pages = dracut.8 \
|
|||||||
dracut-catimages.8 \
|
dracut-catimages.8 \
|
||||||
mkinitrd.8 \
|
mkinitrd.8 \
|
||||||
mkinitrd-suse.8 \
|
mkinitrd-suse.8 \
|
||||||
modules.d/98systemd/dracut-cmdline.service.8 \
|
modules.d/98dracut-systemd/dracut-cmdline.service.8 \
|
||||||
modules.d/98systemd/dracut-initqueue.service.8 \
|
modules.d/98dracut-systemd/dracut-initqueue.service.8 \
|
||||||
modules.d/98systemd/dracut-mount.service.8 \
|
modules.d/98dracut-systemd/dracut-mount.service.8 \
|
||||||
modules.d/98systemd/dracut-shutdown.service.8 \
|
modules.d/98dracut-systemd/dracut-shutdown.service.8 \
|
||||||
modules.d/98systemd/dracut-pre-mount.service.8 \
|
modules.d/98dracut-systemd/dracut-pre-mount.service.8 \
|
||||||
modules.d/98systemd/dracut-pre-pivot.service.8 \
|
modules.d/98dracut-systemd/dracut-pre-pivot.service.8 \
|
||||||
modules.d/98systemd/dracut-pre-trigger.service.8 \
|
modules.d/98dracut-systemd/dracut-pre-trigger.service.8 \
|
||||||
modules.d/98systemd/dracut-pre-udev.service.8
|
modules.d/98dracut-systemd/dracut-pre-udev.service.8
|
||||||
|
|
||||||
manpages = $(man1pages) $(man5pages) $(man7pages) $(man8pages)
|
manpages = $(man1pages) $(man5pages) $(man7pages) $(man8pages)
|
||||||
|
|
||||||
.PHONY: install clean archive rpm testimage test all check AUTHORS doc dracut-version.sh
|
.PHONY: install clean archive rpm testimage test all check AUTHORS doc dracut-version.sh
|
||||||
|
|
||||||
all: dracut-version.sh dracut-install skipcpio/skipcpio
|
all: dracut-version.sh dracut.pc dracut-install skipcpio/skipcpio
|
||||||
|
|
||||||
DRACUT_INSTALL_OBJECTS = \
|
DRACUT_INSTALL_OBJECTS = \
|
||||||
install/dracut-install.o \
|
install/dracut-install.o \
|
||||||
@@ -60,6 +61,7 @@ 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/strv.o: install/strv.c install/strv.h install/util.h install/macro.h install/log.h
|
||||||
|
|
||||||
install/dracut-install: $(DRACUT_INSTALL_OBJECTS)
|
install/dracut-install: $(DRACUT_INSTALL_OBJECTS)
|
||||||
|
$(CC) $(LDFLAGS) -o $@ $(DRACUT_INSTALL_OBJECTS) $(LDLIBS) $(KMOD_LIBS)
|
||||||
|
|
||||||
dracut-install: install/dracut-install
|
dracut-install: install/dracut-install
|
||||||
ln -fs $< $@
|
ln -fs $< $@
|
||||||
@@ -81,22 +83,34 @@ all: doc
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
%: %.xml
|
%: %.xml
|
||||||
xsltproc -o $@ -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
|
@rm -f -- "$@"
|
||||||
|
xsltproc -o "$@" -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
|
||||||
|
|
||||||
%.xml: %.asc
|
%.xml: %.asc
|
||||||
asciidoc -d manpage -b docbook -o $@ $<
|
@rm -f -- "$@"
|
||||||
|
asciidoc -d manpage -b docbook -o "$@" $<
|
||||||
|
|
||||||
dracut.8: dracut.usage.asc dracut.8.asc
|
dracut.8: dracut.usage.asc dracut.8.asc
|
||||||
|
|
||||||
dracut.html: dracut.asc $(manpages) dracut.css dracut.usage.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
|
asciidoc -a numbered -d book -b docbook -o dracut.xml dracut.asc
|
||||||
|
@rm -f -- dracut.html
|
||||||
xsltproc -o dracut.html --xinclude -nonet \
|
xsltproc -o dracut.html --xinclude -nonet \
|
||||||
--stringparam custom.css.source dracut.css \
|
--stringparam custom.css.source dracut.css \
|
||||||
--stringparam generate.css.header 1 \
|
--stringparam generate.css.header 1 \
|
||||||
http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl dracut.xml
|
http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl dracut.xml
|
||||||
rm -f -- dracut.xml
|
@rm -f -- dracut.xml
|
||||||
|
|
||||||
install: dracut-version.sh
|
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)$(bindir)
|
mkdir -p $(DESTDIR)$(bindir)
|
||||||
mkdir -p $(DESTDIR)$(sysconfdir)
|
mkdir -p $(DESTDIR)$(sysconfdir)
|
||||||
@@ -109,6 +123,7 @@ install: dracut-version.sh
|
|||||||
install -m 0644 dracut.conf $(DESTDIR)$(sysconfdir)/dracut.conf
|
install -m 0644 dracut.conf $(DESTDIR)$(sysconfdir)/dracut.conf
|
||||||
mkdir -p $(DESTDIR)$(sysconfdir)/dracut.conf.d
|
mkdir -p $(DESTDIR)$(sysconfdir)/dracut.conf.d
|
||||||
mkdir -p $(DESTDIR)$(pkglibdir)/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-functions.sh $(DESTDIR)$(pkglibdir)/dracut-functions.sh
|
||||||
install -m 0755 dracut-version.sh $(DESTDIR)$(pkglibdir)/dracut-version.sh
|
install -m 0755 dracut-version.sh $(DESTDIR)$(pkglibdir)/dracut-version.sh
|
||||||
ln -fs dracut-functions.sh $(DESTDIR)$(pkglibdir)/dracut-functions
|
ln -fs dracut-functions.sh $(DESTDIR)$(pkglibdir)/dracut-functions
|
||||||
@@ -124,10 +139,10 @@ ifneq ($(enable_documentation),no)
|
|||||||
endif
|
endif
|
||||||
if [ -n "$(systemdsystemunitdir)" ]; then \
|
if [ -n "$(systemdsystemunitdir)" ]; then \
|
||||||
mkdir -p $(DESTDIR)$(systemdsystemunitdir); \
|
mkdir -p $(DESTDIR)$(systemdsystemunitdir); \
|
||||||
ln -srf $(DESTDIR)$(pkglibdir)/modules.d/98systemd/dracut-shutdown.service $(DESTDIR)$(systemdsystemunitdir)/dracut-shutdown.service; \
|
ln -srf $(DESTDIR)$(pkglibdir)/modules.d/98dracut-systemd/dracut-shutdown.service $(DESTDIR)$(systemdsystemunitdir)/dracut-shutdown.service; \
|
||||||
mkdir -p $(DESTDIR)$(systemdsystemunitdir)/shutdown.target.wants; \
|
mkdir -p $(DESTDIR)$(systemdsystemunitdir)/sysinit.target.wants; \
|
||||||
ln -s ../dracut-shutdown.service \
|
ln -s ../dracut-shutdown.service \
|
||||||
$(DESTDIR)$(systemdsystemunitdir)/shutdown.target.wants/dracut-shutdown.service; \
|
$(DESTDIR)$(systemdsystemunitdir)/sysinit.target.wants/dracut-shutdown.service; \
|
||||||
mkdir -p $(DESTDIR)$(systemdsystemunitdir)/initrd.target.wants; \
|
mkdir -p $(DESTDIR)$(systemdsystemunitdir)/initrd.target.wants; \
|
||||||
for i in \
|
for i in \
|
||||||
dracut-cmdline.service \
|
dracut-cmdline.service \
|
||||||
@@ -138,7 +153,7 @@ endif
|
|||||||
dracut-pre-trigger.service \
|
dracut-pre-trigger.service \
|
||||||
dracut-pre-udev.service \
|
dracut-pre-udev.service \
|
||||||
; do \
|
; do \
|
||||||
ln -srf $(DESTDIR)$(pkglibdir)/modules.d/98systemd/$$i $(DESTDIR)$(systemdsystemunitdir); \
|
ln -srf $(DESTDIR)$(pkglibdir)/modules.d/98dracut-systemd/$$i $(DESTDIR)$(systemdsystemunitdir); \
|
||||||
ln -s ../$$i \
|
ln -s ../$$i \
|
||||||
$(DESTDIR)$(systemdsystemunitdir)/initrd.target.wants/$$i; \
|
$(DESTDIR)$(systemdsystemunitdir)/initrd.target.wants/$$i; \
|
||||||
done \
|
done \
|
||||||
@@ -155,8 +170,11 @@ endif
|
|||||||
mkdir -p $(DESTDIR)${bashcompletiondir}
|
mkdir -p $(DESTDIR)${bashcompletiondir}
|
||||||
install -m 0644 dracut-bash-completion.sh $(DESTDIR)${bashcompletiondir}/dracut
|
install -m 0644 dracut-bash-completion.sh $(DESTDIR)${bashcompletiondir}/dracut
|
||||||
install -m 0644 lsinitrd-bash-completion.sh $(DESTDIR)${bashcompletiondir}/lsinitrd
|
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:
|
dracut-version.sh:
|
||||||
|
@rm -f dracut-version.sh
|
||||||
@echo "DRACUT_VERSION=$(VERSION)$(GITVERSION)" > dracut-version.sh
|
@echo "DRACUT_VERSION=$(VERSION)$(GITVERSION)" > dracut-version.sh
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@@ -188,17 +206,20 @@ rpm: dracut-$(VERSION).tar.xz syncheck
|
|||||||
rpmbuild=$$(mktemp -d -t rpmbuild-dracut.XXXXXX); src=$$(pwd); \
|
rpmbuild=$$(mktemp -d -t rpmbuild-dracut.XXXXXX); src=$$(pwd); \
|
||||||
cp dracut-$(VERSION).tar.xz "$$rpmbuild"; \
|
cp dracut-$(VERSION).tar.xz "$$rpmbuild"; \
|
||||||
LC_MESSAGES=C $$src/git2spec.pl $(VERSION) "$$rpmbuild" < dracut.spec > $$rpmbuild/dracut.spec; \
|
LC_MESSAGES=C $$src/git2spec.pl $(VERSION) "$$rpmbuild" < dracut.spec > $$rpmbuild/dracut.spec; \
|
||||||
(cd "$$rpmbuild"; rpmbuild --define "_topdir $$PWD" --define "_sourcedir $$PWD" \
|
(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 "_specdir $$PWD" --define "_srcrpmdir $$PWD" \
|
||||||
--define "_rpmdir $$PWD" -ba dracut.spec; ) && \
|
--define "_rpmdir $$PWD" -ba dracut.spec; ) && \
|
||||||
( mv "$$rpmbuild"/$$(arch)/*.rpm .; mv "$$rpmbuild"/*.src.rpm .;rm -fr -- "$$rpmbuild"; ls *.rpm )
|
( mv "$$rpmbuild"/{,$$(arch)/}*.rpm $(DESTDIR).; rm -fr -- "$$rpmbuild"; ls $(DESTDIR)*.rpm )
|
||||||
|
|
||||||
syncheck:
|
syncheck:
|
||||||
@ret=0;for i in dracut-initramfs-restore.sh modules.d/*/*.sh; do \
|
@ret=0;for i in dracut-initramfs-restore.sh modules.d/*/*.sh; do \
|
||||||
[ "$${i##*/}" = "module-setup.sh" ] && continue; \
|
[ "$${i##*/}" = "module-setup.sh" ] && continue; \
|
||||||
read line < "$$i"; [ "$${line#*bash*}" != "$$line" ] && continue; \
|
read line < "$$i"; [ "$${line#*bash*}" != "$$line" ] && continue; \
|
||||||
[ $$V ] && echo "posix syntax check: $$i"; bash --posix -n "$$i" ; ret=$$(($$ret+$$?)); \
|
[ $$V ] && echo "posix syntax check: $$i"; bash --posix -n "$$i" ; ret=$$(($$ret+$$?)); \
|
||||||
[ $$V ] && echo "checking for [[: $$i"; if grep -Fq '[[ ' "$$i" ; then ret=$$(($$ret+1)); echo "$$i contains [["; fi \
|
[ $$V ] && echo "checking for [[: $$i"; if grep -Fq '[[ ' "$$i" ; then ret=$$(($$ret+1)); echo "$$i contains [["; fi; \
|
||||||
|
[ $$V ] && echo "checking for echo -n: $$i"; if grep -Fq 'echo -n ' "$$i" ; then ret=$$(($$ret+1)); echo "$$i contains echo -n"; fi \
|
||||||
done;exit $$ret
|
done;exit $$ret
|
||||||
@ret=0;for i in *.sh mkinitrd-dracut.sh modules.d/*/*.sh \
|
@ret=0;for i in *.sh mkinitrd-dracut.sh modules.d/*/*.sh \
|
||||||
modules.d/*/module-setup.sh; do \
|
modules.d/*/module-setup.sh; do \
|
||||||
@@ -210,7 +231,11 @@ check: all syncheck rpm
|
|||||||
@$(MAKE) -C test check
|
@$(MAKE) -C test check
|
||||||
|
|
||||||
testimage: all
|
testimage: all
|
||||||
./dracut.sh -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
|
||||||
@@ -219,12 +244,20 @@ testimages: all
|
|||||||
./dracut.sh -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
|
hostimage: all
|
||||||
./dracut.sh -H -l -f test-$(shell uname -r).img $(shell uname -r)
|
./dracut.sh -H -l -f test-$(shell uname -r).img $(shell uname -r)
|
||||||
@echo wrote test-$(shell uname -r).img
|
@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:
|
AUTHORS:
|
||||||
git shortlog --numbered --summary -e |while read a rest; do echo $$rest;done > 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
|
dracut.html.sign: dracut-$(VERSION).tar.xz dracut.html
|
||||||
gpg-sign-all dracut-$(VERSION).tar.xz dracut.html
|
gpg-sign-all dracut-$(VERSION).tar.xz dracut.html
|
||||||
|
442
NEWS
442
NEWS
@@ -1,3 +1,445 @@
|
|||||||
|
dracut-046
|
||||||
|
==========
|
||||||
|
|
||||||
|
dracut.sh:
|
||||||
|
- bail out if module directory does not exist
|
||||||
|
if people want to build the initramfs without kernel modules,
|
||||||
|
then --no-kernel should be specified
|
||||||
|
- add early microcode support for AMD family 16h
|
||||||
|
- collect also all modaliases modules from sysfs for hostonly modules
|
||||||
|
- sync initramfs after creation
|
||||||
|
|
||||||
|
network:
|
||||||
|
- wait for IPv6 RA if using none/static IPv6 assignment
|
||||||
|
- ipv6 improvements
|
||||||
|
- Handle curl using libnssckbi for TLS
|
||||||
|
- fix dhcp classless_static_routes
|
||||||
|
- dhclient: send client-identifier matching hardware address
|
||||||
|
- don't arping for point-to-point connections
|
||||||
|
- only bring up wired network interfaces (no wlan and wwan)
|
||||||
|
|
||||||
|
mraid:
|
||||||
|
- mdraid: wait for rd.md.uuid specified devices to be assembled
|
||||||
|
|
||||||
|
crypt:
|
||||||
|
- handle rd.luks.name
|
||||||
|
|
||||||
|
crypt-gpg:
|
||||||
|
- For GnuPG >= 2.1 support OpenPGP smartcards
|
||||||
|
|
||||||
|
kernel-install:
|
||||||
|
- Skip to create initrd if /etc/machine-id is missing or empty
|
||||||
|
|
||||||
|
nfs:
|
||||||
|
- handle rpcbind /run/rpcbind directory
|
||||||
|
|
||||||
|
s390:
|
||||||
|
- various fixes
|
||||||
|
|
||||||
|
dmsquash-live:
|
||||||
|
- add NTFS support
|
||||||
|
|
||||||
|
multipath:
|
||||||
|
- split out multipath-hostonly module
|
||||||
|
|
||||||
|
lvmmerge:
|
||||||
|
- new module, see README.md in the module directory
|
||||||
|
|
||||||
|
dracut-systemd:
|
||||||
|
- fixed dependencies
|
||||||
|
|
||||||
|
|
||||||
|
dracut-045
|
||||||
|
==========
|
||||||
|
|
||||||
|
Important: dracut now requires libkmod for the dracut-install binary helper,
|
||||||
|
which nows handles kernel module installing and filtering.
|
||||||
|
|
||||||
|
dracut.sh:
|
||||||
|
- restorecon final image file
|
||||||
|
- fail hard, if we find modules and modules.dep is missing
|
||||||
|
- support --tmpdir as a relative path
|
||||||
|
- add default path for --uefi
|
||||||
|
|
||||||
|
dracut-functions.sh:
|
||||||
|
- fix check_vol_slaves() volume group name stripping
|
||||||
|
|
||||||
|
dracut-install:
|
||||||
|
- catch ldd message "cannot execute binary file"
|
||||||
|
- added kernel module handling with libkmod
|
||||||
|
Added parameters:
|
||||||
|
--module,-m
|
||||||
|
--mod-filter-path, -p
|
||||||
|
--mod-filter-nopath, -P
|
||||||
|
--mod-filter-symbol, -s
|
||||||
|
--mod-filter-nosymbol, -S
|
||||||
|
--mod-filter-noname, -N
|
||||||
|
--silent
|
||||||
|
--kerneldir
|
||||||
|
--firmwaredirs
|
||||||
|
- fallback to non-hostonly mode if lsmod fails
|
||||||
|
|
||||||
|
lsinitrd:
|
||||||
|
- new option "--unpack"
|
||||||
|
- new option "--unpackearly"
|
||||||
|
- and "--verbose"
|
||||||
|
|
||||||
|
general initramfs fixes:
|
||||||
|
- don't remove 99-cmdline-ask on 'hostonly' cleanup
|
||||||
|
- call dracut-cmdline-ask.service, if /etc/cmdline.d/*.conf exists
|
||||||
|
- break at switch_root only for bare rd.break
|
||||||
|
- add rd.emergency=[reboot|poweroff|halt]
|
||||||
|
specifies what action to execute in case of a critical failure
|
||||||
|
- rd.memdebug=4 gives information, about kernel module memory consumption
|
||||||
|
during loading
|
||||||
|
|
||||||
|
dmsquash-live:
|
||||||
|
- fixed livenet-generator execution flag
|
||||||
|
and include only, if systemd is used
|
||||||
|
- fixed dmsquash-live-root.sh for cases where the fstype of the liveimage is squashfs
|
||||||
|
- fixed typo for rootfs.img
|
||||||
|
- enable the use of the OverlayFS for the LiveOS root filesystem
|
||||||
|
Patch notes:
|
||||||
|
Integrate the option to use an OverlayFS as the root filesystem
|
||||||
|
into the 90dmsquash-live module for testing purposes.
|
||||||
|
|
||||||
|
The rd.live.overlay.overlayfs option allows one to request an
|
||||||
|
OverlayFS overlay. If a persistent overlay is detected at the
|
||||||
|
standard LiveOS path, the overlay & type detected will be used.
|
||||||
|
|
||||||
|
Tested primarily with transient, in-RAM overlay boots on vfat-
|
||||||
|
formatted Live USB devices, with persistent overlay directories
|
||||||
|
on ext4-formatted Live USB devices, and with embedded, persistent
|
||||||
|
overlay directories on vfat-formatted devices. (Persistent overlay
|
||||||
|
directories on a vfat-formatted device must be in an embedded
|
||||||
|
filesystem that supports the creation of trusted.* extended
|
||||||
|
attributes, and must provide valid d_type in readdir responses.)
|
||||||
|
|
||||||
|
The rd.live.overlay.readonly option, which allows a persistent
|
||||||
|
overlayfs to be mounted read only through a higher level transient
|
||||||
|
overlay directory, has been implemented through the multiple lower
|
||||||
|
layers feature of OverlayFS.
|
||||||
|
|
||||||
|
The default transient DM overlay size has been adjusted up to 32 GiB.
|
||||||
|
This change supports comparison of transient Device-mapper vs.
|
||||||
|
transient OverlayFS overlay performance. A transient DM overlay
|
||||||
|
is a sparse file in memory, so this setting does not consume more
|
||||||
|
RAM for legacy applications. It does permit a user to use all of
|
||||||
|
the available root filesystem storage, and fails gently when it is
|
||||||
|
consumed, as the available free root filesystem storage on a typical
|
||||||
|
LiveOS build is only a few GiB. Thus, when booted on other-
|
||||||
|
than-small RAM systems, the transient DM overlay should not overflow.
|
||||||
|
|
||||||
|
OverlayFS offers the potential to use all of the available free RAM
|
||||||
|
or all of the available free disc storage (on non-vfat-devices)
|
||||||
|
in its overlay, even beyond the root filesystem available space,
|
||||||
|
because the OverlayFS root filesystem is a union of directories on
|
||||||
|
two different partitions.
|
||||||
|
|
||||||
|
This patch also cleans up some message spew at shutdown, shortens
|
||||||
|
the execution path in a couple of places, and uses persistent
|
||||||
|
DM targets where required.
|
||||||
|
|
||||||
|
dmraid:
|
||||||
|
- added "nowatch" option in udev rule, otherwise udev would reread partitions for raid members
|
||||||
|
- allow booting from degraded MD RAID arrays
|
||||||
|
|
||||||
|
shutdown:
|
||||||
|
- handle readonly /run on shutdown
|
||||||
|
|
||||||
|
kernel-modules:
|
||||||
|
- add all HID drivers, regardless of hostonly mode
|
||||||
|
people swap keyboards sometimes and should be able to enter their disk password
|
||||||
|
- add usb-storage
|
||||||
|
To save the rdsosreport.txt to a USB stick, the usb-storage module is needed.
|
||||||
|
- add xennet
|
||||||
|
- add nvme
|
||||||
|
|
||||||
|
systemd:
|
||||||
|
- add /etc/machine-info
|
||||||
|
- fixed systemd-escape call for names beginning with "-"
|
||||||
|
- install missing drop-in configuration files for
|
||||||
|
/etc/systemd/{journal.conf,system.conf}
|
||||||
|
|
||||||
|
filesystems:
|
||||||
|
- add support to F2FS filesystem (fsck and modules)
|
||||||
|
|
||||||
|
network:
|
||||||
|
- fix carrier detection
|
||||||
|
- correctly set mac address for ip=...:<mtu>:<mac>
|
||||||
|
- fixed vlan, bonding, bridging, team logic
|
||||||
|
call ifup for the slaves and assemble afterwards
|
||||||
|
- add mtu to list of variables to store in override
|
||||||
|
- for rd.neednet=0 a bootdev is not needed anymore
|
||||||
|
- dhclient-script.sh: add classless-static-routes support
|
||||||
|
- support for iBFT IPv6
|
||||||
|
- support macaddr in brackets [] (commit 740c46c0224a187d6b5a42b4aa56e173238884cc)
|
||||||
|
- use arping2, if available
|
||||||
|
- support multiple default gateways from DHCP server
|
||||||
|
- fixup VLAN handling
|
||||||
|
- enhance team support
|
||||||
|
- differ between ipv6 local and global tentative
|
||||||
|
- ipv6: wait for a router advertised route
|
||||||
|
- add 'mtu' parameter for bond options
|
||||||
|
- use 'ip' instead of 'brctl'
|
||||||
|
|
||||||
|
nbd:
|
||||||
|
- add systemd generator
|
||||||
|
- use export names instead of port numbers, because port number based
|
||||||
|
exports are deprecated and were removed.
|
||||||
|
|
||||||
|
fcoe:
|
||||||
|
- no more /dev/shm state copying
|
||||||
|
|
||||||
|
multipath:
|
||||||
|
- check all /dev/mapper devices if they are multipath devices, not only mpath*
|
||||||
|
|
||||||
|
fips:
|
||||||
|
- fixed .hmac installation in FIPS mode
|
||||||
|
|
||||||
|
plymouth:
|
||||||
|
- also trigger the acpi subsystem
|
||||||
|
|
||||||
|
syslog:
|
||||||
|
- add imjournal.so to read systemd journal
|
||||||
|
- move start from udev to initqueue/online
|
||||||
|
|
||||||
|
caps:
|
||||||
|
- make it a non default module
|
||||||
|
|
||||||
|
livenet:
|
||||||
|
- support nfs:// urls in livenet-generator
|
||||||
|
|
||||||
|
nfs:
|
||||||
|
- install all nfs modules non-hostonly
|
||||||
|
|
||||||
|
crypt:
|
||||||
|
- support keyfiles embedded in the initramfs
|
||||||
|
|
||||||
|
testsuite:
|
||||||
|
- add TEST-70-BONDBRIDGETEAMVLAN
|
||||||
|
- make "-cpu host" the default
|
||||||
|
|
||||||
|
dracut-044
|
||||||
|
==========
|
||||||
|
creation:
|
||||||
|
- better udev & systemd dir detection
|
||||||
|
- split dracut-functions.sh in dracut-init.sh and dracut-functions.sh
|
||||||
|
dracut-functions.sh can now be sourced by external tools
|
||||||
|
- detect all btrfs devices needed
|
||||||
|
- added flag file if initqueue is needed
|
||||||
|
- don't overwrite anything, if initramfs image file creation failed
|
||||||
|
- if no compressor is specified, try to find a suitable one
|
||||||
|
- drop scanning kernel config for CONFIG_MICROCODE_*_EARLY
|
||||||
|
- remove "_EARLY" from CONFIG_MICROCODE_* checks
|
||||||
|
- dracut.sh: add command line option for install_i18_all
|
||||||
|
--no-hostonly-i18n -> install_i18n_all=yes
|
||||||
|
--hostonly-i18n -> install_i18n_all=no
|
||||||
|
- --no-reproducible to turn off reproducible mode
|
||||||
|
- dracut-function.sh can now be sourced from outside of dracut
|
||||||
|
- dracut-init.sh contains all functions, which only can be used from
|
||||||
|
within the dracut infrastructure
|
||||||
|
- support --mount with just mountpoint as a parameter
|
||||||
|
- removed action_on_fail support
|
||||||
|
- removed host_modalias concept
|
||||||
|
- do not create microcode, if no firmware is available
|
||||||
|
- skip gpg files in microcode generation
|
||||||
|
|
||||||
|
initramfs:
|
||||||
|
- ensure pre-mount (and resume) run before root fsck
|
||||||
|
- add --online option to initqueue
|
||||||
|
|
||||||
|
qemu:
|
||||||
|
- fixed virtual machine detection
|
||||||
|
|
||||||
|
lvm:
|
||||||
|
- remove all quirk arguments for lvm >= 2.2.221
|
||||||
|
|
||||||
|
dmsquash:
|
||||||
|
- fixup for checkisomd5
|
||||||
|
- increase timeout for checkisomd5
|
||||||
|
- use non-persistent metadata snapshots for transient overlays.
|
||||||
|
- overflow support for persistent snapshot.
|
||||||
|
- use non-persistent metadata snapshots.
|
||||||
|
- avoid an overlay for persistent, uncompressed, read-write live installations.
|
||||||
|
|
||||||
|
multipath:
|
||||||
|
- multipath.conf included in hostonly mode
|
||||||
|
- install all multipath path selector kernel modules
|
||||||
|
|
||||||
|
iSCSI:
|
||||||
|
- use the iBFT initiator name, if found and set
|
||||||
|
- iscsid now present in the initramfs
|
||||||
|
- iscsistart is done with systemd-run asynchrone to do things in
|
||||||
|
paralllel. Also restarted for every new interface which shows up.
|
||||||
|
- If rd.iscsi.waitnet (default) is set, iscsistart is done only
|
||||||
|
after all interfaces are up.
|
||||||
|
- If not all interfaces are up and rd.iscsi.testroute (default) is set,
|
||||||
|
the route to a iscsi target IP is checked and skipped, if there is none.
|
||||||
|
- If all things fail, we issue a "dummy" interface iscsiroot to retry
|
||||||
|
everything in the initqueue/timeout.
|
||||||
|
|
||||||
|
network:
|
||||||
|
- added DHCP RENEW/REBIND
|
||||||
|
- IPv4 DHCP lease time now optional (bootp)
|
||||||
|
- IPv6 nfs parsing
|
||||||
|
- fixed IPv6 route parsing
|
||||||
|
- rd.peerdns=0 parameter to disable DHCP nameserver setting
|
||||||
|
- detect duplicate IPv4 addresses for static addresses
|
||||||
|
- if interfaces are specified with its enx* name, bind the correspondent MAC to the interface name
|
||||||
|
- if multiple "ip=" are present on the kernel command line "rd.neednet=1" is assumed
|
||||||
|
- add options to tweak timeouts
|
||||||
|
rd.net.dhcp.retry=<cnt>
|
||||||
|
If this option is set, dracut will try to connect via dhcp
|
||||||
|
<cnt> times before failing. Default is 1.
|
||||||
|
|
||||||
|
rd.net.timeout.dhcp=<arg>
|
||||||
|
If this option is set, dhclient is called with "-timeout <arg>".
|
||||||
|
|
||||||
|
rd.net.timeout.iflink=<seconds>
|
||||||
|
Wait <seconds> until link shows up. Default is 60 seconds.
|
||||||
|
|
||||||
|
rd.net.timeout.ifup=<seconds>
|
||||||
|
Wait <seconds> until link has state "UP". Default is 20 seconds.
|
||||||
|
|
||||||
|
rd.net.timeout.route=<seconds>
|
||||||
|
Wait <seconds> until route shows up. Default is 20 seconds.
|
||||||
|
|
||||||
|
rd.net.timeout.ipv6dad=<seconds>
|
||||||
|
Wait <seconds> until IPv6 DAD is finished. Default is 50 seconds.
|
||||||
|
|
||||||
|
rd.net.timeout.ipv6auto=<seconds>
|
||||||
|
Wait <seconds> until IPv6 automatic addresses are assigned.
|
||||||
|
Default is 40 seconds.
|
||||||
|
|
||||||
|
rd.net.timeout.carrier=<seconds>
|
||||||
|
Wait <seconds> until carrier is recognized. Default is 5 seconds.
|
||||||
|
|
||||||
|
IMA:
|
||||||
|
- load signed certificates in the IMA keyring, see modules.d/98integrity/README
|
||||||
|
- load EVM public key in the kernel _evm keyring
|
||||||
|
|
||||||
|
FCoE:
|
||||||
|
fcoe: start with fcoemon instead of fipvlan
|
||||||
|
|
||||||
|
dracut-043
|
||||||
|
==========
|
||||||
|
- add missing dmsquash-generator
|
||||||
|
|
||||||
|
dracut-042
|
||||||
|
==========
|
||||||
|
- fixed dmsetup shutdown
|
||||||
|
- new kernel command line option "rd.live.overlay.thin"
|
||||||
|
This option changes the underlying mechanism for the overlay in the
|
||||||
|
dmsquash module.
|
||||||
|
Instead of a plain dm snapshot a dm thin snapshot is used. The advantage
|
||||||
|
of the thin snapshot is, that the TRIM command is recognized, which
|
||||||
|
means that at runtime, only the occupied blocks will be claimed from
|
||||||
|
memory, and freed blocks will really be freed in ram.
|
||||||
|
- dmsquash: Add squashfs support to rd.live.fsimg
|
||||||
|
Previously rd.live.fsimg only supported filesystems residing in
|
||||||
|
(compressed) archives.
|
||||||
|
Now rd.live.fsimg can also be used when a squashfs image is used.
|
||||||
|
This is achieved by extracting the rootfs image from the squashfs and
|
||||||
|
then continue with the default routines for rd.live.fsimg.
|
||||||
|
- lvm: add support for LVM system id
|
||||||
|
- split up the systemd dracut module
|
||||||
|
Basic systemd functionality is in 00systemd now.
|
||||||
|
Switching root and the initrd.target is in 00systemd-initrd.
|
||||||
|
Dracut additions to the systemd initrd are in 98dracut-systemd.
|
||||||
|
- support for creating a UEFI boot executable via argument "--uefi"
|
||||||
|
With an EFI stub, the kernel, the initramfs and a kernel cmdline can be
|
||||||
|
glued together to a single UEFI executable, which can be booted by a
|
||||||
|
UEFI BIOS.
|
||||||
|
- network: split out kernel-network-modules, now in 90kernel-network-modules
|
||||||
|
- support for ethernet point-to-point connections configured via DHCP
|
||||||
|
- kernel-modules: install all HID drivers
|
||||||
|
- dracut.pc pkg-config file
|
||||||
|
- mount /dev, /dev/shm and /run noexec
|
||||||
|
|
||||||
|
dracut-041
|
||||||
|
==========
|
||||||
|
- fixed the shutdown loop
|
||||||
|
- fixed gzip compression for versions, which do not have --rsyncable
|
||||||
|
- fixed ifcfg generation for persistent interface names
|
||||||
|
- multipath:
|
||||||
|
* new option to turn off multipath "rd.multipath=0" completly
|
||||||
|
* preload scsi dh modules
|
||||||
|
* start multipathd via systemd service
|
||||||
|
- do not fail, if user pressed ESC during media check
|
||||||
|
- fixed systemd-journal by symlinking /var/log to /run/initramfs/log
|
||||||
|
- initrd-release moved to /usr/lib
|
||||||
|
- lots of iSCSI fixes
|
||||||
|
- new "rd.timeout" to specify the systemd JobTimeoutSec for devices
|
||||||
|
- if $initrd/etc/cmdline.d/* has a "root=" and the kernel cmdline does not,
|
||||||
|
generate a mount unit for it
|
||||||
|
- increased the initqueue timeout for non systemd initramfs to 180s
|
||||||
|
- $initrd/etc/cmdline.d/ hostonly files are now generated for NFS
|
||||||
|
- make use of systemd-hibernate-resume, if available
|
||||||
|
- fixed ldconfig parsing for hwcap output
|
||||||
|
- network: add support for comma separated autoconf options like ip=eth0:auto6,dhcp
|
||||||
|
- new parameter "rd.live.overlay.size" to specify the overlay for live images
|
||||||
|
- changed the test suite for the new sfdisk syntax
|
||||||
|
- added cache tools for dm-cache setups
|
||||||
|
|
||||||
|
dracut-040
|
||||||
|
==========
|
||||||
|
- fixed dracut module dependency checks
|
||||||
|
- fixed test suite
|
||||||
|
|
||||||
|
dracut-039
|
||||||
|
==========
|
||||||
|
- DRACUT_PATH can now be used to specify the PATH used by dracut
|
||||||
|
to search for binaries instead of the default
|
||||||
|
/usr/sbin:/sbin:/usr/bin:/bin
|
||||||
|
This should be set in the distribution config file
|
||||||
|
/usr/lib/dracut/dracut.conf.d/01-dist.conf
|
||||||
|
- add "--loginstall <DIR>" and loginstall="<DIR>" options
|
||||||
|
to record all files, which are installed from the host fs
|
||||||
|
- "rd.writable.fsimg" - support for read/write filesystem images
|
||||||
|
- "rd.route" kernel command line parameter added
|
||||||
|
- "--install-optional" and install_optional_items added
|
||||||
|
- find plymouth pkglibdir on debian
|
||||||
|
- torrent support for live images
|
||||||
|
root=live:torrent://example.com/liveboot.img.torrent
|
||||||
|
and generally added as a download handler
|
||||||
|
- disable microcode, if the kernel does not support it
|
||||||
|
- speed up ldconfig_paths()
|
||||||
|
- more ARM modules
|
||||||
|
- fixed inst*() functions and "-H" handling
|
||||||
|
- fixed bridge setup
|
||||||
|
- added --force-drivers parameter and force_drivers=+ config option
|
||||||
|
to enforce driver loading at early boot time
|
||||||
|
- documented "iso-scan/filename" usage in grub
|
||||||
|
- various bugfixes
|
||||||
|
|
||||||
|
dracut-038
|
||||||
|
==========
|
||||||
|
- "rd.cmdline=ask" will ask the user on the console to enter additional
|
||||||
|
kernel command line parameters
|
||||||
|
- "rd.hostonly=0" removes all "hostonly" added custom files,
|
||||||
|
which is useful in combination with "rd.auto" or other specific parameters,
|
||||||
|
if you want to boot on the same hardware, but the compiled in configuration
|
||||||
|
does not match your setup anymore
|
||||||
|
- inst* functions and dracut-install now accept the "-H" flag, which logs all
|
||||||
|
installed files to /lib/dracut/hostonly-files. This is used to remove those
|
||||||
|
files, if rd.hostonly is given on the kernel command line
|
||||||
|
- strstr now only does literal string match,
|
||||||
|
please use strglob and strglobin for globs
|
||||||
|
- fixed unpacking of the microcode image on shutdown
|
||||||
|
- added systemd-gpt-auto-generator
|
||||||
|
- fcoe: wait for lldpad to be ready
|
||||||
|
- network: handle "ip=dhcp6"
|
||||||
|
- network: DCHPv6: set valid_lft and preferred_lft
|
||||||
|
- dm: support dm-cache
|
||||||
|
- fstab: do not mount and fsck from fstab if using systemd
|
||||||
|
- break at switch_root only for bare rd.break and not for any rd.break=...
|
||||||
|
- nbd: make use of "--systemd-mark", otherwise it gets killed on switch_root
|
||||||
|
- fcoe-uefi: fixed cmdline parameter generation
|
||||||
|
- iscsi: deprecate "ip=ibft", use "rd.iscsi.ibft[=1]" from now on
|
||||||
|
- "lsinitrd -m" now only lists the dracut modules of the image
|
||||||
|
- a lot of small bugfixes
|
||||||
|
|
||||||
dracut-037
|
dracut-037
|
||||||
==========
|
==========
|
||||||
- dracut: hostonly_cmdline variable and command line switch
|
- dracut: hostonly_cmdline variable and command line switch
|
||||||
|
21
PKGBUILD
21
PKGBUILD
@@ -1,6 +1,6 @@
|
|||||||
pkgname=dracut-git
|
pkgname=dracut-git
|
||||||
pkgver=$(date +%s)
|
pkgver=1
|
||||||
pkgrel=$(git log --pretty=format:%h |head -n 1)
|
pkgrel=1
|
||||||
pkgdesc="Initramfs generation utility"
|
pkgdesc="Initramfs generation utility"
|
||||||
arch=('i686' 'x86_64')
|
arch=('i686' 'x86_64')
|
||||||
url="https://dracut.wiki.kernel.org/"
|
url="https://dracut.wiki.kernel.org/"
|
||||||
@@ -14,8 +14,25 @@ backup=(etc/dracut.conf)
|
|||||||
source=()
|
source=()
|
||||||
md5sums=()
|
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() {
|
build() {
|
||||||
cd ..
|
cd ..
|
||||||
make sysconfdir=/etc || return 1
|
make sysconfdir=/etc || return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd ..
|
||||||
make DESTDIR="${pkgdir}" sysconfdir=/etc install || return 1
|
make DESTDIR="${pkgdir}" sysconfdir=/etc install || return 1
|
||||||
}
|
}
|
||||||
|
24
README
24
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
|
||||||
@@ -51,7 +52,7 @@ 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 kernel.org.
|
Currently dracut lives on github.com and kernel.org.
|
||||||
|
|
||||||
The tarballs can be found here:
|
The tarballs can be found here:
|
||||||
http://www.kernel.org/pub/linux/utils/boot/dracut/
|
http://www.kernel.org/pub/linux/utils/boot/dracut/
|
||||||
@@ -62,21 +63,14 @@ Git:
|
|||||||
http://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
|
https://git.kernel.org/pub/scm/boot/dracut/dracut.git
|
||||||
|
|
||||||
git://github.com/haraldh/dracut.git
|
git@github.com:dracutdevs/dracut.git
|
||||||
|
|
||||||
git://dracut.git.sourceforge.net/gitroot/dracut/dracut
|
|
||||||
|
|
||||||
Git Web:
|
Git Web:
|
||||||
http://git.kernel.org/?p=boot/dracut/dracut.git
|
https://github.com/dracutdevs/dracut.git
|
||||||
|
|
||||||
https://haraldh@github.com/haraldh/dracut.git
|
http://git.kernel.org/?p=boot/dracut/dracut.git
|
||||||
|
|
||||||
http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut
|
Project Documentation:
|
||||||
|
|
||||||
Git Web RSS Feed:
|
|
||||||
http://git.kernel.org/?p=boot/dracut/dracut.git;a=rss
|
|
||||||
|
|
||||||
Project Page:
|
|
||||||
http://www.kernel.org/pub/linux/utils/boot/dracut/dracut.html
|
http://www.kernel.org/pub/linux/utils/boot/dracut/dracut.html
|
||||||
|
|
||||||
Project Wiki:
|
Project Wiki:
|
||||||
|
25
README.md
Normal file
25
README.md
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
# dracut - master branch
|
||||||
|
|
||||||
|
dracut is an initramfs infrastructure.
|
||||||
|
|
||||||
|
## 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 40: [](https://ci.centos.org/job/dracut-matrix-master/TESTS=40,label=dracut-ci-slave01/)
|
||||||
|
- Test 50: [](https://ci.centos.org/job/dracut-matrix-master/TESTS=50,label=dracut-ci-slave01/)
|
||||||
|
- Test 70: [](https://ci.centos.org/job/dracut-matrix-master/TESTS=70,label=dracut-ci-slave01/)
|
@@ -1,14 +1,29 @@
|
|||||||
For the testsuite to work, you will have to install at least the following software packages:
|
For the testsuite to work, you will have to install at least the following software packages:
|
||||||
dash
|
dash \
|
||||||
asciidoc
|
asciidoc \
|
||||||
mdadm
|
mdadm \
|
||||||
lvm2
|
lvm2 \
|
||||||
cryptsetup
|
dmraid \
|
||||||
nfs-utils
|
cryptsetup \
|
||||||
netbsd-iscsi
|
nfs-utils \
|
||||||
nbd
|
nbd \
|
||||||
dhcp (dhcp-server on openSUSE)
|
dhcp-server \
|
||||||
iscsi-initiator-utils
|
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
|
TEST-04-FULL-SYSTEMD: systemd >= 187
|
||||||
|
|
||||||
How to run the testsuite:
|
How to run the testsuite:
|
||||||
|
8
TODO
8
TODO
@@ -6,6 +6,7 @@ Items are ordered in priority.
|
|||||||
|
|
||||||
INITRAMFS TODO
|
INITRAMFS TODO
|
||||||
|
|
||||||
|
- search domain string
|
||||||
- allow dual stack configuration (IPv4, IPv6) for the same interface
|
- allow dual stack configuration (IPv4, IPv6) for the same interface
|
||||||
- "bind-mount" kernel drivers in real root for the rescue image,
|
- "bind-mount" kernel drivers in real root for the rescue image,
|
||||||
if the real root does not have any kernel modules for this kernel
|
if the real root does not have any kernel modules for this kernel
|
||||||
@@ -17,17 +18,15 @@ INITRAMFS TODO
|
|||||||
- put mount hook in main initqueue loop / careful about resume!
|
- 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.
|
- the hard-coded list of udev rules that we care about is kind of lame.
|
||||||
- panic fallback
|
- panic fallback
|
||||||
- bridging/bonding without "netroot=" https://bugzilla.redhat.com/show_bug.cgi?id=822750
|
|
||||||
- progress indication for fsck https://bugzilla.redhat.com/show_bug.cgi?id=827118
|
- progress indication for fsck https://bugzilla.redhat.com/show_bug.cgi?id=827118
|
||||||
- domain, searchdomain https://bugzilla.redhat.com/show_bug.cgi?id=840778
|
- domain, searchdomain https://bugzilla.redhat.com/show_bug.cgi?id=840778
|
||||||
- disable write-ifcfg https://bugzilla.redhat.com/show_bug.cgi?id=840784
|
|
||||||
- check for /var to be mounted in convertfs https://bugzilla.redhat.com/show_bug.cgi?id=848172
|
|
||||||
- probably fix "--include" https://bugzilla.redhat.com/show_bug.cgi?id=849338
|
- probably fix "--include" https://bugzilla.redhat.com/show_bug.cgi?id=849338
|
||||||
|
|
||||||
GENERATOR TODO
|
GENERATOR TODO
|
||||||
|
|
||||||
- report errors on missing files in check()
|
- 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 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 presets (predefined set of modules)
|
||||||
- add interpreter/plugin-scripts to be sourced at the beginning or end (can use dracut-functions)
|
- add interpreter/plugin-scripts to be sourced at the beginning or end (can use dracut-functions)
|
||||||
- add mechanism for module specific command line options
|
- add mechanism for module specific command line options
|
||||||
@@ -47,3 +46,6 @@ Future Enhancement Requests
|
|||||||
- run ssh server to enter crypto password or perform debugging (supported by debian)
|
- 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
|
- 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
|
||||||
|
11
configure
vendored
11
configure
vendored
@@ -1,6 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
||||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
|
||||||
|
|
||||||
# We don't support srcdir != builddir
|
# We don't support srcdir != builddir
|
||||||
echo \#buildapi-variable-no-builddir >/dev/null
|
echo \#buildapi-variable-no-builddir >/dev/null
|
||||||
@@ -9,6 +7,8 @@ prefix=/usr
|
|||||||
|
|
||||||
enable_documentation=yes
|
enable_documentation=yes
|
||||||
|
|
||||||
|
PKG_CONFIG="${PKG_CONFIG:-pkg-config}"
|
||||||
|
|
||||||
# Little helper function for reading args from the commandline.
|
# Little helper function for reading args from the commandline.
|
||||||
# it automatically handles -a b and -a=b variants, and returns 1 if
|
# it automatically handles -a b and -a=b variants, and returns 1 if
|
||||||
# we need to shift $3.
|
# we need to shift $3.
|
||||||
@@ -52,6 +52,11 @@ while (($# > 0)); do
|
|||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if ! ${PKG_CONFIG} --exists --print-errors " libkmod >= 15 "; then
|
||||||
|
echo "dracut needs pkg-config and libkmod >= 15." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
cat > Makefile.inc.$$ <<EOF
|
cat > Makefile.inc.$$ <<EOF
|
||||||
prefix ?= ${prefix}
|
prefix ?= ${prefix}
|
||||||
libdir ?= ${libdir:-${prefix}/lib}
|
libdir ?= ${libdir:-${prefix}/lib}
|
||||||
@@ -61,6 +66,8 @@ sbindir ?= ${sbindir:-${prefix}/sbin}
|
|||||||
mandir ?= ${mandir:-${prefix}/share/man}
|
mandir ?= ${mandir:-${prefix}/share/man}
|
||||||
enable_documentation ?= ${enable_documentation:-yes}
|
enable_documentation ?= ${enable_documentation:-yes}
|
||||||
bindir ?= ${bindir:-${prefix}/bin}
|
bindir ?= ${bindir:-${prefix}/bin}
|
||||||
|
KMOD_CFLAGS ?= $(${PKG_CONFIG} --cflags " libkmod >= 15 ")
|
||||||
|
KMOD_LIBS ?= $(${PKG_CONFIG} --libs " libkmod >= 15 ")
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@@ -1,7 +1,4 @@
|
|||||||
#
|
#
|
||||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
||||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
|
||||||
#
|
|
||||||
# Copyright 2013 Red Hat, Inc. All rights reserved.
|
# Copyright 2013 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
|
||||||
@@ -34,13 +31,17 @@ _dracut() {
|
|||||||
--local --hostonly --no-hostonly --fstab --help --bzip2 --lzma
|
--local --hostonly --no-hostonly --fstab --help --bzip2 --lzma
|
||||||
--xz --no-compress --gzip --list-modules --show-modules --keep
|
--xz --no-compress --gzip --list-modules --show-modules --keep
|
||||||
--printsize --regenerate-all --noimageifnotneeded --early-microcode
|
--printsize --regenerate-all --noimageifnotneeded --early-microcode
|
||||||
--no-early-microcode --print-cmdline --prelink --noprelink'
|
--no-early-microcode --print-cmdline --prelink --noprelink --reproducible
|
||||||
|
--uefi
|
||||||
|
'
|
||||||
|
|
||||||
[ARG]='-a -m -o -d -I -k -c -L --kver --add --force-add --add-drivers
|
[ARG]='-a -m -o -d -I -k -c -L --kver --add --force-add --add-drivers
|
||||||
--omit-drivers --modules --omit --drivers --filesystems --install
|
--omit-drivers --modules --omit --drivers --filesystems --install
|
||||||
--fwdir --libdirs --fscks --add-fstab --mount --device --nofscks
|
--fwdir --libdirs --fscks --add-fstab --mount --device --nofscks
|
||||||
--kmoddir --conf --confdir --tmpdir --stdlog --compress --prefix
|
--kmoddir --conf --confdir --tmpdir --stdlog --compress --prefix
|
||||||
--kernel-cmdline --sshkey --persistent-policy'
|
--kernel-cmdline --sshkey --persistent-policy --install-optional
|
||||||
|
--loginstall --uefi-stub --kernel-image
|
||||||
|
'
|
||||||
)
|
)
|
||||||
|
|
||||||
if __contains_word "$prev" ${OPTS[ARG]}; then
|
if __contains_word "$prev" ${OPTS[ARG]}; then
|
||||||
@@ -49,7 +50,7 @@ _dracut() {
|
|||||||
comps=$(compgen -d -- "$cur")
|
comps=$(compgen -d -- "$cur")
|
||||||
compopt -o filenames
|
compopt -o filenames
|
||||||
;;
|
;;
|
||||||
-c|--conf|--sshkey|--add-fstab|--add-device|-I|--install)
|
-c|--conf|--sshkey|--add-fstab|--add-device|-I|--install|--install-optional)
|
||||||
comps=$(compgen -f -- "$cur")
|
comps=$(compgen -f -- "$cur")
|
||||||
compopt -o filenames
|
compopt -o filenames
|
||||||
;;
|
;;
|
||||||
|
@@ -1,6 +1,4 @@
|
|||||||
#!/bin/bash --norc
|
#!/bin/bash --norc
|
||||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
||||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
|
||||||
#
|
#
|
||||||
# Copyright 2009 Red Hat, Inc. All rights reserved.
|
# Copyright 2009 Red Hat, Inc. All rights reserved.
|
||||||
#
|
#
|
||||||
|
1221
dracut-functions.sh
1221
dracut-functions.sh
File diff suppressed because it is too large
Load Diff
1017
dracut-init.sh
Normal file
1017
dracut-init.sh
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,13 +1,21 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
||||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
|
||||||
|
|
||||||
set -e
|
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)"
|
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
|
[[ -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
|
if [[ $MACHINE_ID ]] && [[ -d /boot/${MACHINE_ID} || -L /boot/${MACHINE_ID} ]] ; then
|
||||||
IMG="/boot/${MACHINE_ID}/${KERNEL_VERSION}/initrd"
|
IMG="/boot/${MACHINE_ID}/${KERNEL_VERSION}/initrd"
|
||||||
fi
|
fi
|
||||||
@@ -16,11 +24,12 @@ fi
|
|||||||
cd /run/initramfs
|
cd /run/initramfs
|
||||||
|
|
||||||
[ -f .need_shutdown -a -f "$IMG" ] || exit 1
|
[ -f .need_shutdown -a -f "$IMG" ] || exit 1
|
||||||
if zcat "$IMG" | cpio -id --quiet >/dev/null; then
|
|
||||||
|
if $SKIP "$IMG" | zcat | cpio -id --no-absolute-filenames --quiet >/dev/null; then
|
||||||
rm -f -- .need_shutdown
|
rm -f -- .need_shutdown
|
||||||
elif xzcat "$IMG" | cpio -id --quiet >/dev/null; then
|
elif $SKIP "$IMG" | xzcat | cpio -id --no-absolute-filenames --quiet >/dev/null; then
|
||||||
rm -f -- .need_shutdown
|
rm -f -- .need_shutdown
|
||||||
elif lz4 -d -c "$IMG" | cpio -id --quiet >/dev/null; then
|
elif $SKIP "$IMG" | lz4 -d -c | cpio -id --no-absolute-filenames --quiet >/dev/null; then
|
||||||
rm -f -- .need_shutdown
|
rm -f -- .need_shutdown
|
||||||
else
|
else
|
||||||
# something failed, so we clean up
|
# something failed, so we clean up
|
||||||
|
@@ -1,6 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
||||||
# ex: ts=8 sw=4 et filetype=sh
|
|
||||||
#
|
#
|
||||||
# logging faciality module for dracut both at build- and boot-time
|
# logging faciality module for dracut both at build- and boot-time
|
||||||
#
|
#
|
||||||
@@ -150,8 +148,7 @@ dlog_init() {
|
|||||||
&& type -P systemd-cat &>/dev/null \
|
&& type -P systemd-cat &>/dev/null \
|
||||||
&& systemctl --quiet is-active systemd-journald.socket &>/dev/null \
|
&& systemctl --quiet is-active systemd-journald.socket &>/dev/null \
|
||||||
&& { echo "dracut-$DRACUT_VERSION" | systemd-cat -t 'dracut' &>/dev/null; } ; then
|
&& { echo "dracut-$DRACUT_VERSION" | systemd-cat -t 'dracut' &>/dev/null; } ; then
|
||||||
readonly _dlogdir="$(mktemp --tmpdir="$TMPDIR/" -d -t dracut-log.XXXXXX)"
|
readonly _systemdcatfile="$DRACUT_TMPDIR/systemd-cat"
|
||||||
readonly _systemdcatfile="$_dlogdir/systemd-cat"
|
|
||||||
mkfifo "$_systemdcatfile"
|
mkfifo "$_systemdcatfile"
|
||||||
readonly _dlogfd=15
|
readonly _dlogfd=15
|
||||||
systemd-cat -t 'dracut' --level-prefix=true <"$_systemdcatfile" &
|
systemd-cat -t 'dracut' --level-prefix=true <"$_systemdcatfile" &
|
||||||
@@ -266,9 +263,9 @@ _lvl2syspri() {
|
|||||||
# Conversion is done as follows:
|
# Conversion is done as follows:
|
||||||
#
|
#
|
||||||
# <tt>
|
# <tt>
|
||||||
# FATAL(1) -> LOG_EMERG (0)
|
# none -> LOG_EMERG (0)
|
||||||
# none -> LOG_ALERT (1)
|
# none -> LOG_ALERT (1)
|
||||||
# none -> LOG_CRIT (2)
|
# FATAL(1) -> LOG_CRIT (2)
|
||||||
# ERROR(2) -> LOG_ERR (3)
|
# ERROR(2) -> LOG_ERR (3)
|
||||||
# WARN(3) -> LOG_WARNING (4)
|
# WARN(3) -> LOG_WARNING (4)
|
||||||
# none -> LOG_NOTICE (5)
|
# none -> LOG_NOTICE (5)
|
||||||
@@ -282,7 +279,7 @@ _dlvl2syslvl() {
|
|||||||
local lvl
|
local lvl
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
1) lvl=0;;
|
1) lvl=2;;
|
||||||
2) lvl=3;;
|
2) lvl=3;;
|
||||||
3) lvl=4;;
|
3) lvl=4;;
|
||||||
4) lvl=6;;
|
4) lvl=6;;
|
||||||
@@ -326,7 +323,7 @@ _do_dlog() {
|
|||||||
local msg="$*"
|
local msg="$*"
|
||||||
local lmsg="$lvlc: $*"
|
local lmsg="$lvlc: $*"
|
||||||
|
|
||||||
(( $lvl <= $stdloglvl )) && echo "$msg" >&2
|
(( $lvl <= $stdloglvl )) && printf -- 'dracut: %s\n' "$msg" >&2
|
||||||
|
|
||||||
if (( $lvl <= $sysloglvl )); then
|
if (( $lvl <= $sysloglvl )); then
|
||||||
if [[ "$_dlogfd" ]]; then
|
if [[ "$_dlogfd" ]]; then
|
||||||
@@ -367,7 +364,7 @@ dlog() {
|
|||||||
if (( $# > 1 )); then
|
if (( $# > 1 )); then
|
||||||
_do_dlog "$@"
|
_do_dlog "$@"
|
||||||
else
|
else
|
||||||
while read line; do
|
while read line || [ -n "$line" ]; do
|
||||||
_do_dlog "$1" "$line"
|
_do_dlog "$1" "$line"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
128
dracut.8.asc
128
dracut.8.asc
@@ -6,7 +6,7 @@ DRACUT(8)
|
|||||||
|
|
||||||
NAME
|
NAME
|
||||||
----
|
----
|
||||||
dracut - low-level tool for generating an initramfs image
|
dracut - low-level tool for generating an initramfs/initrd image
|
||||||
|
|
||||||
SYNOPSIS
|
SYNOPSIS
|
||||||
--------
|
--------
|
||||||
@@ -28,10 +28,12 @@ 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
|
as initial root file system. All finding of the root device happens in this
|
||||||
early userspace.
|
early userspace.
|
||||||
|
|
||||||
|
Initramfs images are also called "initrd".
|
||||||
|
|
||||||
For a complete list of kernel command line options see *dracut.cmdline*(7).
|
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,
|
If you are dropped to an emergency shell, while booting your initramfs,
|
||||||
the file _/run/initramfs/rdsosreport.txt_ is created, which can be safed to a
|
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.
|
(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
|
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
|
command line. _/run/initramfs/rdsosreport.txt_ contains all logs and the output
|
||||||
@@ -54,33 +56,6 @@ OPTIONS
|
|||||||
**-f, --force**::
|
**-f, --force**::
|
||||||
overwrite existing initramfs file.
|
overwrite existing initramfs file.
|
||||||
|
|
||||||
**-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.
|
|
||||||
+
|
|
||||||
[NOTE]
|
|
||||||
===============================
|
|
||||||
If [LIST] has multiple arguments, then you have to put these in quotes. For
|
|
||||||
example:
|
|
||||||
----
|
|
||||||
# dracut --modules "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" ...
|
|
||||||
----
|
|
||||||
===============================
|
|
||||||
|
|
||||||
**-a, --add** _<list of dracut modules>_::
|
**-a, --add** _<list of dracut modules>_::
|
||||||
add a space-separated list of dracut modules to the default set of modules.
|
add a space-separated list of dracut modules to the default set of modules.
|
||||||
This parameter can be specified multiple times.
|
This parameter can be specified multiple times.
|
||||||
@@ -108,6 +83,35 @@ example:
|
|||||||
----
|
----
|
||||||
===============================
|
===============================
|
||||||
|
|
||||||
|
**-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>_::
|
**-d, --drivers** _<list of kernel modules>_::
|
||||||
specify a space-separated list of kernel modules to exclusively include
|
specify a space-separated list of kernel modules to exclusively include
|
||||||
in the initramfs. The kernel modules have to be specified without the ".ko"
|
in the initramfs. The kernel modules have to be specified without the ".ko"
|
||||||
@@ -136,6 +140,19 @@ example:
|
|||||||
----
|
----
|
||||||
===============================
|
===============================
|
||||||
|
|
||||||
|
**--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>_::
|
**--omit-drivers** _<list of kernel modules>_::
|
||||||
specify a space-separated list of kernel modules not to add to the
|
specify a space-separated list of kernel modules not to add to the
|
||||||
initramfs.
|
initramfs.
|
||||||
@@ -306,6 +323,12 @@ provide a valid _/etc/fstab_.
|
|||||||
**--no-hostonly-cmdline**:
|
**--no-hostonly-cmdline**:
|
||||||
Do not store kernel command line arguments needed in the initramfs
|
Do not store kernel command line arguments needed in the initramfs
|
||||||
|
|
||||||
|
**--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>_::
|
**--persistent-policy** _<policy>_::
|
||||||
Use _<policy>_ to address disks and partitions.
|
Use _<policy>_ to address disks and partitions.
|
||||||
_<policy>_ can be any directory name found in /dev/disk.
|
_<policy>_ can be any directory name found in /dev/disk.
|
||||||
@@ -325,6 +348,10 @@ provide a valid _/etc/fstab_.
|
|||||||
The default _<dump frequency>_ is "0".
|
The default _<dump frequency>_ is "0".
|
||||||
the default _<fsck order>_ is "2".
|
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>_ ::
|
**--add-device** _<device>_ ::
|
||||||
Bring up _<device>_ in initramfs, _<device>_ should be the device name.
|
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
|
This can be useful in hostonly mode for resume support when your swap is on
|
||||||
@@ -349,6 +376,9 @@ example:
|
|||||||
----
|
----
|
||||||
===============================
|
===============================
|
||||||
|
|
||||||
|
**--install-optional** _<file list>_::
|
||||||
|
install the space separated list of files into the initramfs, if they exist.
|
||||||
|
|
||||||
**--gzip**::
|
**--gzip**::
|
||||||
Compress the generated initramfs using gzip. This will be done by default,
|
Compress the generated initramfs using gzip. This will be done by default,
|
||||||
unless another compression option or --no-compress is passed. Equivalent to
|
unless another compression option or --no-compress is passed. Equivalent to
|
||||||
@@ -404,11 +434,18 @@ will not be able to boot.
|
|||||||
program with known-working arguments. If you pass a quoted string with
|
program with known-working arguments. If you pass a quoted string with
|
||||||
arguments, it will be called with exactly those arguments. Depending on what
|
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.
|
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**::
|
**--no-compress**::
|
||||||
Do not compress the generated initramfs. This will override any other
|
Do not compress the generated initramfs. This will override any other
|
||||||
compression options.
|
compression options.
|
||||||
|
|
||||||
|
**--reproducible**::
|
||||||
|
Create reproducible images.
|
||||||
|
|
||||||
|
**--no-reproducible**::
|
||||||
|
Do not create reproducible images.
|
||||||
|
|
||||||
**--list-modules**::
|
**--list-modules**::
|
||||||
List all available dracut modules.
|
List all available dracut modules.
|
||||||
|
|
||||||
@@ -443,6 +480,37 @@ will not be able to boot.
|
|||||||
Regenerate all initramfs images at the default location with the kernel
|
Regenerate all initramfs images at the default location with the kernel
|
||||||
versions found on the system. Additional parameters are passed through.
|
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
|
FILES
|
||||||
-----
|
-----
|
||||||
_/var/log/dracut.log_::
|
_/var/log/dracut.log_::
|
||||||
@@ -500,4 +568,4 @@ Will Woods
|
|||||||
|
|
||||||
SEE ALSO
|
SEE ALSO
|
||||||
--------
|
--------
|
||||||
*dracut.cmdline*(7) *dracut.conf*(5)
|
*dracut.cmdline*(7) *dracut.conf*(5) *lsinitrd*(1)
|
||||||
|
@@ -132,7 +132,7 @@ The following steps are executed during a shutdown:
|
|||||||
|
|
||||||
* systemd switches to the shutdown.target
|
* systemd switches to the shutdown.target
|
||||||
* systemd starts
|
* systemd starts
|
||||||
/lib/systemd/system/shutdown.target.wants/dracut-shutdown.service
|
$prefix/lib/systemd/system/shutdown.target.wants/dracut-shutdown.service
|
||||||
* dracut-shutdown.service executes /usr/lib/dracut/dracut-initramfs-restore
|
* dracut-shutdown.service executes /usr/lib/dracut/dracut-initramfs-restore
|
||||||
which unpacks the initramfs to /run/initramfs
|
which unpacks the initramfs to /run/initramfs
|
||||||
* systemd finishes shutdown.target
|
* systemd finishes shutdown.target
|
||||||
|
@@ -32,7 +32,7 @@ line is the value, which is honored.
|
|||||||
Standard
|
Standard
|
||||||
~~~~~~~~
|
~~~~~~~~
|
||||||
**init=**__<path to real init>__::
|
**init=**__<path to real init>__::
|
||||||
specify the path to the init programm to be started after the initramfs has
|
specify the path to the init program to be started after the initramfs has
|
||||||
finished
|
finished
|
||||||
|
|
||||||
**root=**__<path to blockdevice>__::
|
**root=**__<path to blockdevice>__::
|
||||||
@@ -81,6 +81,14 @@ rootfstype=ext3
|
|||||||
enable autoassembly of special devices like cryptoLUKS, dmraid, mdraid or
|
enable autoassembly of special devices like cryptoLUKS, dmraid, mdraid or
|
||||||
lvm. Default is off as of dracut version >= 024.
|
lvm. Default is off as of dracut version >= 024.
|
||||||
|
|
||||||
|
**rd.hostonly=0**::
|
||||||
|
removes all compiled in configuration of the host system the initramfs image
|
||||||
|
was built on. This helps booting, if any disk layout changed, especially in
|
||||||
|
combination with rd.auto or other parameters specifying the layout.
|
||||||
|
|
||||||
|
**rd.cmdline=ask**::
|
||||||
|
prompts the user for additional kernel command line parameters
|
||||||
|
|
||||||
**rd.fstab=0**::
|
**rd.fstab=0**::
|
||||||
do not honor special mount options for the root filesystem found in
|
do not honor special mount options for the root filesystem found in
|
||||||
_/etc/fstab_ of the real root.
|
_/etc/fstab_ of the real root.
|
||||||
@@ -101,9 +109,30 @@ resume=UUID=3f5ad593-4546-4a94-a374-bcfb68aa11f7
|
|||||||
the init system performs fsck before remount, you might want to use this
|
the init system performs fsck before remount, you might want to use this
|
||||||
option to avoid duplication.
|
option to avoid duplication.
|
||||||
|
|
||||||
|
iso-scan/filename
|
||||||
|
~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Using iso-scan/filename with a Fedora/Red Hat/CentOS Live iso should just work
|
||||||
|
by copying the original kernel cmdline parameters.
|
||||||
|
|
||||||
|
[listing]
|
||||||
|
.Example
|
||||||
|
--
|
||||||
|
menuentry 'Live Fedora 20' --class fedora --class gnu-linux --class gnu --class os {
|
||||||
|
set isolabel=Fedora-Live-LXDE-x86_64-20-1
|
||||||
|
set isofile="/boot/iso/Fedora-Live-LXDE-x86_64-20-1.iso"
|
||||||
|
loopback loop $isofile
|
||||||
|
linux (loop)/isolinux/vmlinuz0 boot=isolinux iso-scan/filename=$isofile root=live:LABEL=$isolabel ro rd.live.image quiet rhgb
|
||||||
|
initrd (loop)/isolinux/initrd0.img
|
||||||
|
}
|
||||||
|
--
|
||||||
|
|
||||||
Misc
|
Misc
|
||||||
~~~~
|
~~~~
|
||||||
|
**rd.emergency=**__[reboot|poweroff|halt]__::
|
||||||
|
specify, what action to execute in case of a critical failure. rd.shell=0 also
|
||||||
|
be specified.
|
||||||
|
|
||||||
**rd.driver.blacklist=**__<drivername>__[,__<drivername>__,...]::
|
**rd.driver.blacklist=**__<drivername>__[,__<drivername>__,...]::
|
||||||
do not load kernel module <drivername>. This parameter can be specified
|
do not load kernel module <drivername>. This parameter can be specified
|
||||||
multiple times.
|
multiple times.
|
||||||
@@ -117,11 +146,16 @@ Misc
|
|||||||
have been loaded. This parameter can be specified multiple times.
|
have been loaded. This parameter can be specified multiple times.
|
||||||
|
|
||||||
**rd.retry=**__<seconds>__::
|
**rd.retry=**__<seconds>__::
|
||||||
specify how long dracut should wait for devices to appear.
|
specify how long dracut should retry the initqueue to configure devices.
|
||||||
The default is 30 seconds. After 2/3 of the time, degraded raids are force
|
The default is 30 seconds. After 2/3 of the time, degraded raids are force
|
||||||
started. If you have hardware, which takes a very long time to announce its
|
started. If you have hardware, which takes a very long time to announce its
|
||||||
drives, you might want to extend this value.
|
drives, you might want to extend this value.
|
||||||
|
|
||||||
|
**rd.timeout=**__<seconds>__::
|
||||||
|
specify how long dracut should wait for devices to appear. The
|
||||||
|
default is '0', which means 'forever'. Note that this timeout
|
||||||
|
should be longer than rd.retry to allow for proper configuration.
|
||||||
|
|
||||||
**rd.noverifyssl**::
|
**rd.noverifyssl**::
|
||||||
accept self-signed certificates for ssl downloads.
|
accept self-signed certificates for ssl downloads.
|
||||||
|
|
||||||
@@ -133,7 +167,7 @@ Misc
|
|||||||
Debug
|
Debug
|
||||||
~~~~~
|
~~~~~
|
||||||
If you are dropped to an emergency shell, the file
|
If you are dropped to an emergency shell, the file
|
||||||
_/run/initramfs/rdsosreport.txt_ is created, which can be safed to a (to be
|
_/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
|
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.
|
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.
|
_/run/initramfs/rdsosreport.txt_ contains all logs and the output of some tools.
|
||||||
@@ -153,8 +187,8 @@ It should be attached to any report about dracut problems.
|
|||||||
_/run/initramfs/init.log_.
|
_/run/initramfs/init.log_.
|
||||||
If "quiet" is set, it also logs to the console.
|
If "quiet" is set, it also logs to the console.
|
||||||
|
|
||||||
**rd.memdebug=[0-3]**::
|
**rd.memdebug=[0-4]**::
|
||||||
Print memory usage info at various points, set the verbose level from 0 to 3.
|
Print memory usage info at various points, set the verbose level from 0 to 4.
|
||||||
+
|
+
|
||||||
Higher level means more debugging output:
|
Higher level means more debugging output:
|
||||||
+
|
+
|
||||||
@@ -163,6 +197,10 @@ It should be attached to any report about dracut problems.
|
|||||||
1 - partial /proc/meminfo
|
1 - partial /proc/meminfo
|
||||||
2 - /proc/meminfo
|
2 - /proc/meminfo
|
||||||
3 - /proc/meminfo + /proc/slabinfo
|
3 - /proc/meminfo + /proc/slabinfo
|
||||||
|
4 - /proc/meminfo + /proc/slabinfo + tracekomem
|
||||||
|
NOTE: tracekomem is a shell script utilizing kernel trace to track
|
||||||
|
the rough total memory consumption of kernel modules during
|
||||||
|
loading. It may override other trace configurations.
|
||||||
----
|
----
|
||||||
|
|
||||||
**rd.break**::
|
**rd.break**::
|
||||||
@@ -354,6 +392,11 @@ DM RAID
|
|||||||
only activate the raid sets with the given UUID. This parameter can be
|
only activate the raid sets with the given UUID. This parameter can be
|
||||||
specified multiple times.
|
specified multiple times.
|
||||||
|
|
||||||
|
MULTIPATH
|
||||||
|
~~~~~~~~~
|
||||||
|
**rd.multipath=0**::
|
||||||
|
disable multipath detection
|
||||||
|
|
||||||
FIPS
|
FIPS
|
||||||
~~~~
|
~~~~
|
||||||
**rd.fips**::
|
**rd.fips**::
|
||||||
@@ -437,7 +480,7 @@ USB Android phone::
|
|||||||
* enp0s29u1u2
|
* enp0s29u1u2
|
||||||
=====================
|
=====================
|
||||||
|
|
||||||
**ip=**__{dhcp|on|any|dhcp6|auto6|ibft}__::
|
**ip=**__{dhcp|on|any|dhcp6|auto6}__::
|
||||||
dhcp|on|any::: get ip from dhcp server from all interfaces. If root=dhcp,
|
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
|
loop sequentially through all interfaces (eth0, eth1, ...) and use the first
|
||||||
with a valid DHCP root-path.
|
with a valid DHCP root-path.
|
||||||
@@ -446,8 +489,6 @@ USB Android phone::
|
|||||||
|
|
||||||
dhcp6::: IPv6 DHCP
|
dhcp6::: IPv6 DHCP
|
||||||
|
|
||||||
ibft::: iBFT autoconfiguration
|
|
||||||
|
|
||||||
**ip=**__<interface>__:__{dhcp|on|any|dhcp6|auto6}__[:[__<mtu>__][:__<macaddr>__]]::
|
**ip=**__<interface>__:__{dhcp|on|any|dhcp6|auto6}__[:[__<mtu>__][:__<macaddr>__]]::
|
||||||
This parameter can be specified multiple times.
|
This parameter can be specified multiple times.
|
||||||
+
|
+
|
||||||
@@ -459,7 +500,7 @@ cannot be used in conjunction with the **ifname** argument for the
|
|||||||
same <interface>.
|
same <interface>.
|
||||||
=====================
|
=====================
|
||||||
|
|
||||||
**ip=**__<client-IP>__:[__<peer>__]:__<gateway-IP>__:__<netmask>__:__<client_hostname>__:__<interface>__:__{none|off|dhcp|on|any|dhcp6|auto6|ibft}__:[:[__<mtu>__][:__<macaddr>__]]::
|
**ip=**__<client-IP>__:[__<peer>__]:__<gateway-IP>__:__<netmask>__:__<client_hostname>__:__<interface>__:__{none|off|dhcp|on|any|dhcp6|auto6|ibft}__[:[__<mtu>__][:__<macaddr>__]]::
|
||||||
explicit network configuration. If you want do define a IPv6 address, put it
|
explicit network configuration. If you want do define a IPv6 address, put it
|
||||||
in brackets (e.g. [2001:DB8::1]). This parameter can be specified multiple
|
in brackets (e.g. [2001:DB8::1]). This parameter can be specified multiple
|
||||||
times. __<peer>__ is optional and is the address of the remote endpoint
|
times. __<peer>__ is optional and is the address of the remote endpoint
|
||||||
@@ -487,6 +528,19 @@ WARNING: Do **not** use the default kernel naming scheme for the interface name,
|
|||||||
as it can conflict with the kernel names. So, don't use "eth[0-9]+" for the
|
as it can conflict with the kernel names. So, don't use "eth[0-9]+" for the
|
||||||
interface name. Better name it "bootnet" or "bluesocket".
|
interface name. Better name it "bootnet" or "bluesocket".
|
||||||
|
|
||||||
|
**rd.route=**__<net>__/__<netmask>__:__<gateway>__[:__<interface>__]::
|
||||||
|
Add a static route with route options, which are separated by a colon.
|
||||||
|
IPv6 addresses have to be put in brackets.
|
||||||
|
+
|
||||||
|
[listing]
|
||||||
|
.Example
|
||||||
|
--
|
||||||
|
rd.route=192.168.200.0/24:192.168.100.222:ens10
|
||||||
|
rd.route=192.168.200.0/24:192.168.100.222
|
||||||
|
rd.route=192.168.200.0/24::ens10
|
||||||
|
rd.route=[2001:DB8:3::/8]:[2001:DB8:2::1]:ens10
|
||||||
|
--
|
||||||
|
|
||||||
**bootdev=**__<interface>__::
|
**bootdev=**__<interface>__::
|
||||||
specify network interface to use routing and netroot information from.
|
specify network interface to use routing and netroot information from.
|
||||||
Required if multiple ip= lines are used.
|
Required if multiple ip= lines are used.
|
||||||
@@ -500,6 +554,9 @@ interface name. Better name it "bootnet" or "bluesocket".
|
|||||||
**nameserver=**__<IP>__ [**nameserver=**__<IP>__ ...]::
|
**nameserver=**__<IP>__ [**nameserver=**__<IP>__ ...]::
|
||||||
specify nameserver(s) to use
|
specify nameserver(s) to use
|
||||||
|
|
||||||
|
**rd.peerdns=0**::
|
||||||
|
Disable DNS setting of DHCP parameters.
|
||||||
|
|
||||||
**biosdevname=0**::
|
**biosdevname=0**::
|
||||||
boolean, turn off biosdevname network interface renaming
|
boolean, turn off biosdevname network interface renaming
|
||||||
|
|
||||||
@@ -512,13 +569,14 @@ interface name. Better name it "bootnet" or "bluesocket".
|
|||||||
VLAN_PLUS_VID_NO_PAD (vlan5), DEV_PLUS_VID (eth0.0005),
|
VLAN_PLUS_VID_NO_PAD (vlan5), DEV_PLUS_VID (eth0.0005),
|
||||||
DEV_PLUS_VID_NO_PAD (eth0.5)
|
DEV_PLUS_VID_NO_PAD (eth0.5)
|
||||||
|
|
||||||
**bond=**__<bondname>__[:__<bondslaves>__:[:__<options>__]]::
|
**bond=**__<bondname>__[:__<bondslaves>__:[:__<options>__[:<mtu>]]]::
|
||||||
Setup bonding device <bondname> on top of <bondslaves>.
|
Setup bonding device <bondname> on top of <bondslaves>.
|
||||||
<bondslaves> is a comma-separated list of physical (ethernet) interfaces.
|
<bondslaves> is a comma-separated list of physical (ethernet) interfaces.
|
||||||
<options> is a comma-separated list on bonding options (modinfo bonding for
|
<options> is a comma-separated list on bonding options (modinfo bonding for
|
||||||
details) in format compatible with initscripts. If <options> includes
|
details) in format compatible with initscripts. If <options> includes
|
||||||
multi-valued arp_ip_target option, then its values should be separated by
|
multi-valued arp_ip_target option, then its values should be separated by
|
||||||
semicolon. Bond without parameters assumes
|
semicolon. if the mtu is specified, it will be set on the bond master.
|
||||||
|
Bond without parameters assumes
|
||||||
bond=bond0:eth0,eth1:mode=balance-rr
|
bond=bond0:eth0,eth1:mode=balance-rr
|
||||||
|
|
||||||
**team=**__<teammaster>__:__<teamslaves>__::
|
**team=**__<teammaster>__:__<teamslaves>__::
|
||||||
@@ -534,7 +592,7 @@ NFS
|
|||||||
~~~
|
~~~
|
||||||
**root=**\[_<server-ip>_:]__<root-dir>__[:__<nfs-options>__]::
|
**root=**\[_<server-ip>_:]__<root-dir>__[:__<nfs-options>__]::
|
||||||
mount nfs share from <server-ip>:/<root-dir>, if no server-ip is given, use
|
mount nfs share from <server-ip>:/<root-dir>, if no server-ip is given, use
|
||||||
dhcp next_server. if server-ip is an IPv6 address it has to be put in
|
dhcp next_server. If server-ip is an IPv6 address it has to be put in
|
||||||
brackets, e.g. [2001:DB8::1]. NFS options can be appended with the prefix
|
brackets, e.g. [2001:DB8::1]. NFS options can be appended with the prefix
|
||||||
":" or "," and are seperated by ",".
|
":" or "," and are seperated by ",".
|
||||||
|
|
||||||
@@ -555,7 +613,32 @@ NFS
|
|||||||
method. This is supported by dracut, but not recommended.
|
method. This is supported by dracut, but not recommended.
|
||||||
|
|
||||||
**rd.nfs.domain=**__<NFSv4 domain name>__::
|
**rd.nfs.domain=**__<NFSv4 domain name>__::
|
||||||
Set the NFSv4 domain name. Will overwrite the settings in _/etc/idmap.conf_.
|
Set the NFSv4 domain name. Will override the settings in _/etc/idmap.conf_.
|
||||||
|
|
||||||
|
**rd.net.dhcp.retry=**__<cnt>__::
|
||||||
|
If this option is set, dracut will try to connect via dhcp <cnt> times before failing.
|
||||||
|
Default is 1.
|
||||||
|
|
||||||
|
**rd.net.timeout.dhcp=**__<arg>__::
|
||||||
|
If this option is set, dhclient is called with "-timeout <arg>".
|
||||||
|
|
||||||
|
**rd.net.timeout.iflink=**__<seconds>__::
|
||||||
|
Wait <seconds> until link shows up. Default is 60 seconds.
|
||||||
|
|
||||||
|
**rd.net.timeout.ifup=**__<seconds>__::
|
||||||
|
Wait <seconds> until link has state "UP". Default is 20 seconds.
|
||||||
|
|
||||||
|
**rd.net.timeout.route=**__<seconds>__::
|
||||||
|
Wait <seconds> until route shows up. Default is 20 seconds.
|
||||||
|
|
||||||
|
**rd.net.timeout.ipv6dad=**__<seconds>__::
|
||||||
|
Wait <seconds> until IPv6 DAD is finished. Default is 50 seconds.
|
||||||
|
|
||||||
|
**rd.net.timeout.ipv6auto=**__<seconds>__::
|
||||||
|
Wait <seconds> until IPv6 automatic addresses are assigned. Default is 40 seconds.
|
||||||
|
|
||||||
|
**rd.net.timeout.carrier=**__<seconds>__::
|
||||||
|
Wait <seconds> until carrier is recognized. Default is 5 seconds.
|
||||||
|
|
||||||
CIFS
|
CIFS
|
||||||
~~~
|
~~~
|
||||||
@@ -661,6 +744,15 @@ will result in
|
|||||||
iscsistart -b --param node.session.timeo.replacement_timeout=30
|
iscsistart -b --param node.session.timeo.replacement_timeout=30
|
||||||
--
|
--
|
||||||
|
|
||||||
|
**rd.iscsi.ibft** **rd.iscsi.ibft=1**:
|
||||||
|
Turn on iBFT autoconfiguration for the interfaces
|
||||||
|
|
||||||
|
**rd.iscsi.waitnet=0**:
|
||||||
|
Turn off waiting for all interfaces to be up before trying to login to the iSCSI targets.
|
||||||
|
|
||||||
|
**rd.iscsi.testroute=0**:
|
||||||
|
Turn off checking, if the route to the iSCSI target IP is possible before trying to login.
|
||||||
|
|
||||||
FCoE
|
FCoE
|
||||||
~~~~
|
~~~~
|
||||||
**fcoe=**__<edd|interface|MAC>__:__{dcb|nodcb}__::
|
**fcoe=**__<edd|interface|MAC>__:__{dcb|nodcb}__::
|
||||||
@@ -672,13 +764,21 @@ NOTE: letters in the MAC-address must be lowercase!
|
|||||||
|
|
||||||
NBD
|
NBD
|
||||||
~~~
|
~~~
|
||||||
**root=**??? **netroot=**nbd:__<server>__:__<port>__[:__<fstype>__[:__<mountopts>__[:__<nbdopts>__]]]::
|
**root=**??? **netroot=**nbd:__<server>__:__<port/exportname>__[:__<fstype>__[:__<mountopts>__[:__<nbdopts>__]]]::
|
||||||
mount nbd share from <server>
|
mount nbd share from <server>.
|
||||||
|
+
|
||||||
|
NOTE:
|
||||||
|
If "exportname" instead of "port" is given the standard port is used.
|
||||||
|
Newer versions of nbd are only supported with "exportname".
|
||||||
|
|
||||||
**root=dhcp** with **dhcp** **root-path=**nbd:__<server>__:__<port>__[:__<fstype>__[:__<mountopts>__[:__<nbdopts>__]]]::
|
**root=dhcp** with **dhcp** **root-path=**nbd:__<server>__:__<port/exportname>__[:__<fstype>__[:__<mountopts>__[:__<nbdopts>__]]]::
|
||||||
root=dhcp alone directs initrd to look at the DHCP root-path where NBD
|
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
|
options can be specified. This syntax is only usable in cases where you are
|
||||||
directly mounting the volume as the rootfs.
|
directly mounting the volume as the rootfs.
|
||||||
|
+
|
||||||
|
NOTE:
|
||||||
|
If "exportname" instead of "port" is given the standard port is used.
|
||||||
|
Newer versions of nbd are only supported with "exportname".
|
||||||
|
|
||||||
DASD
|
DASD
|
||||||
~~~~
|
~~~~
|
||||||
@@ -688,12 +788,19 @@ DASD
|
|||||||
ZFCP
|
ZFCP
|
||||||
~~~~
|
~~~~
|
||||||
**rd.zfcp=**__<zfcp adaptor device bus ID>__,__<WWPN>__,__<FCPLUN>__::
|
**rd.zfcp=**__<zfcp adaptor device bus ID>__,__<WWPN>__,__<FCPLUN>__::
|
||||||
rd.zfcp can be specified multiple times on the kernel command line.
|
rd.zfcp can be specified multiple times on the kernel command
|
||||||
|
line.
|
||||||
|
|
||||||
|
**rd.zfcp=**__<zfcp adaptor device bus ID>__::
|
||||||
|
If NPIV is enabled and the 'allow_lun_scan' parameter to the zfcp
|
||||||
|
module is set to 'Y' then the zfcp adaptor will be initiating a
|
||||||
|
scan internally and the <WWPN> and <FCPLUN> parameters can be omitted.
|
||||||
+
|
+
|
||||||
[listing]
|
[listing]
|
||||||
.Example
|
.Example
|
||||||
--
|
--
|
||||||
rd.zfcp=0.0.4000,0x5005076300C213e9,0x5022000000000000
|
rd.zfcp=0.0.4000,0x5005076300C213e9,0x5022000000000000
|
||||||
|
rd.zfcp=0.0.4000
|
||||||
--
|
--
|
||||||
|
|
||||||
**rd.zfcp.conf=0**::
|
**rd.zfcp.conf=0**::
|
||||||
@@ -711,10 +818,191 @@ rd.znet=qeth,0.0.0600,0.0.0601,0.0.0602,layer2=1,portname=foo
|
|||||||
rd.znet=ctc,0.0.0600,0.0.0601,protocol=bar
|
rd.znet=ctc,0.0.0600,0.0.0601,protocol=bar
|
||||||
--
|
--
|
||||||
|
|
||||||
|
Booting live images
|
||||||
|
~~~~~~~~~~~~~~~~~~~
|
||||||
|
Dracut offers multiple options for live booted images:
|
||||||
|
|
||||||
|
=====================
|
||||||
|
SquashFS with read-only filesystem image::: The system will boot with a read
|
||||||
|
only filesystem from the SquashFS and apply a writable device-mapper snapshot
|
||||||
|
over the read only filesystem. Using this method ensures a relatively fast
|
||||||
|
boot and lower RAM usage. Users **must be careful** to avoid writing too many
|
||||||
|
blocks to the snapshot volume. Once the blocks of the snapshot overlay are
|
||||||
|
exhausted, the root filesystem becomes read only and may cause application
|
||||||
|
failures. The overlay file is marked 'Overflow', and a difficult recovery is
|
||||||
|
required to repair and enlarge the overlay offline. Non-persistent overlays
|
||||||
|
are sparse files in RAM that only consume content space as required blocks are
|
||||||
|
allocated. They default to an apparent size of 32 GiB in RAM. The size can be
|
||||||
|
adjusted with the **rd.live.overlay.size=** kernel command line option.
|
||||||
|
+
|
||||||
|
The filesystem structure is expected to be:
|
||||||
|
+
|
||||||
|
[listing]
|
||||||
|
--
|
||||||
|
squashfs.img | Squashfs from LiveCD .iso downloaded via network
|
||||||
|
!(mount)
|
||||||
|
/LiveOS
|
||||||
|
|- rootfs.img | Filesystem image to mount read-only
|
||||||
|
!(mount)
|
||||||
|
/bin | Live filesystem
|
||||||
|
/boot |
|
||||||
|
/dev |
|
||||||
|
... |
|
||||||
|
--
|
||||||
|
+
|
||||||
|
Dracut uses this method of live booting by default. No additional command line
|
||||||
|
options are required other than **root=live:<URL>** to specify the location
|
||||||
|
of your squashed filesystem.
|
||||||
|
+
|
||||||
|
- The compressed SquashFS image can be copied during boot to RAM at
|
||||||
|
`/run/initramfs/squashed.img` by using the **rd.live.ram=1** option.
|
||||||
|
- A device with a persistent overlay can be booted read only by using the
|
||||||
|
**rd.live.overlay.readonly** option on the kernel command line. This will
|
||||||
|
cause a temporary, writable overlay to be stacked over a read-only snapshot
|
||||||
|
of the root filesystem.
|
||||||
|
+
|
||||||
|
Uncompressed live filesystem image:::
|
||||||
|
When the live system was installed with the '--skipcompress' option of the
|
||||||
|
__livecd-iso-to-disk__ installation script for Live USB devices, the root
|
||||||
|
filesystem image, `rootfs.img`, is expanded on installation and no SquashFS
|
||||||
|
is involved during boot.
|
||||||
|
+
|
||||||
|
- If **rd.live.ram=1** is used in this situation, the full, uncompressed
|
||||||
|
root filesystem is copied during boot to `/run/initramfs/rootfs.img` in the
|
||||||
|
`/run` tmpfs.
|
||||||
|
+
|
||||||
|
- If **rd.live.overlay=none** is provided as a kernel command line option,
|
||||||
|
a writable, linear device-mapper target is created on boot with no overlay.
|
||||||
|
|
||||||
|
writable filesystem image:::
|
||||||
|
The system will retrieve a compressed filesystem image, extract it to
|
||||||
|
`/run/initramfs/fsimg/rootfs.img`, connect it to a loop device, create a
|
||||||
|
writable, linear device-mapper target at `/dev/mapper/live-rw`, and mount that
|
||||||
|
as a writable volume at `/`. More RAM is required during boot but the live
|
||||||
|
filesystem is easier to manage if it becomes full. Users can make a filesystem
|
||||||
|
image of any size and that size will be maintained when the system boots. There
|
||||||
|
is no persistence of root filesystem changes between boots with this option.
|
||||||
|
+
|
||||||
|
The filesystem structure is expected to be:
|
||||||
|
+
|
||||||
|
[listing]
|
||||||
|
--
|
||||||
|
rootfs.tgz | Compressed tarball containing fileystem image
|
||||||
|
!(unpack)
|
||||||
|
/rootfs.img | Filesystem image at /run/initramfs/fsimg/
|
||||||
|
!(mount)
|
||||||
|
/bin | Live filesystem
|
||||||
|
/boot |
|
||||||
|
/dev |
|
||||||
|
... |
|
||||||
|
--
|
||||||
|
+
|
||||||
|
To use this boot option, ensure that **rd.writable.fsimg=1** is in your kernel
|
||||||
|
command line and add the **root=live:<URL>** to specify the location
|
||||||
|
of your compressed filesystem image tarball or SquashFS image.
|
||||||
|
=====================
|
||||||
|
|
||||||
|
**rd.writable.fsimg=**1::
|
||||||
|
Enables writable filesystem support. The system will boot with a fully
|
||||||
|
writable (but non-persistent) filesystem without snapshots __(see notes above
|
||||||
|
about available live boot options)__. You can use the **rootflags** option to
|
||||||
|
set mount options for the live filesystem as well __(see documentation about
|
||||||
|
rootflags in the **Standard** section above)__.
|
||||||
|
This implies that the whole image is copied to RAM before the boot continues.
|
||||||
|
+
|
||||||
|
NOTE: There must be enough free RAM available to hold the complete image.
|
||||||
|
+
|
||||||
|
This method is very suitable for diskless boots.
|
||||||
|
|
||||||
|
**root=**live:__<url>__::
|
||||||
|
Boots a live image retrieved from __<url>__. Valid handlers: __http, https, ftp, torrent, tftp__.
|
||||||
|
+
|
||||||
|
[listing]
|
||||||
|
.Example
|
||||||
|
--
|
||||||
|
root=live:http://example.com/liveboot.img
|
||||||
|
root=live:ftp://ftp.example.com/liveboot.img
|
||||||
|
root=live:torrent://example.com/liveboot.img.torrent
|
||||||
|
--
|
||||||
|
|
||||||
|
**rd.live.debug=**1::
|
||||||
|
Enables debug output from the live boot process.
|
||||||
|
|
||||||
|
**rd.live.dir=**__<path>__::
|
||||||
|
Specifies the directory within the boot device where the squashfs.img or
|
||||||
|
rootfs.img can be found. By default, this is __LiveOS__.
|
||||||
|
|
||||||
|
**rd.live.squashimg=**__<filename of SquashFS image>__::
|
||||||
|
Specifies the filename for a SquashFS image of the root filesystem.
|
||||||
|
By default, this is __squashfs.img__.
|
||||||
|
|
||||||
|
**rd.live.ram=**1::
|
||||||
|
Copy the complete image to RAM and use this for booting. This is useful
|
||||||
|
when the image resides on, i.e., a DVD which needs to be ejected later on.
|
||||||
|
|
||||||
|
**rd.live.overlay=**__<devspec>__:__(<pathspec>|auto)__|__none__::
|
||||||
|
Allow the usage of a permanent overlay.
|
||||||
|
- _<devspec>_ specifies the path to a device with a mountable filesystem.
|
||||||
|
- _<pathspec>_ is the path to a file within that filesystem, which shall be
|
||||||
|
used to persist the changes made to the device specified by the
|
||||||
|
**root=live:__<url>__** option.
|
||||||
|
- _none_ specifies no overlay when an uncompressed live root filesystem is
|
||||||
|
available.
|
||||||
|
If a persistent overlay is detected at the standard LiveOS path, the overlay &
|
||||||
|
overlay type detected (whether Device-mapper or OverlayFS) will be used.
|
||||||
|
+
|
||||||
|
[listing]
|
||||||
|
.Example
|
||||||
|
--
|
||||||
|
rd.live.overlay=/dev/sdb1:persistent-overlay.img
|
||||||
|
--
|
||||||
|
|
||||||
|
**rd.live.overlay.size=**__<size_MiB>__::
|
||||||
|
Specifies a non-persistent overlay size in MiB. The default is _32768_.
|
||||||
|
|
||||||
|
**rd.live.overlay.readonly=**1::
|
||||||
|
Specifies a non-persistent, writable snapshot overlay to be stacked over a
|
||||||
|
read-only snapshot of the root filesystem, `/dev/mapper/live-ro`, or a read-
|
||||||
|
only loop device of a writable `rootfs.img`.
|
||||||
|
|
||||||
|
**rd.live.overlay.reset=**1::
|
||||||
|
Specifies that a persistent overlay should be reset on boot. All root
|
||||||
|
filesystem changes are vacated by this action.
|
||||||
|
|
||||||
|
**rd.live.overlay.thin=**1::
|
||||||
|
Enables the usage of thin snapshots instead of classic dm snapshots.
|
||||||
|
The advantage of thin snapshots is that they support discards, and will free
|
||||||
|
blocks that are not claimed by the filesystem. In this use case, this means
|
||||||
|
that memory is given back to the kernel when the filesystem does not claim it
|
||||||
|
anymore.
|
||||||
|
|
||||||
|
**rd.live.overlay.overlayfs=**1::
|
||||||
|
Enables the use of the **OverlayFS** kernel module, if available, to provide a
|
||||||
|
copy-on-write union directory for the root filesystem. OverlayFS overlays are
|
||||||
|
directories of the files that have changed on the read-only base (lower)
|
||||||
|
filesystem. The root filesystem is provided through a special overlay type
|
||||||
|
mount that merges the lower and upper directories. If an OverlayFS upper
|
||||||
|
directory is not present on the boot device, a tmpfs directory will be created
|
||||||
|
at /run/overlayfs to provide temporary storage. Persistent storage can be
|
||||||
|
provided on vfat or msdos formatted devices by supplying the OverlayFS upper
|
||||||
|
directory within an embedded filesystem that supports the creation of trusted.*
|
||||||
|
extended attributes and provides a valid d_type in readdir responses, such as
|
||||||
|
with ext4 and xfs. On non-vfat-formatted devices, a persistent OverlayFS
|
||||||
|
overlay can extend the available root filesystem storage up to the capacity of
|
||||||
|
the LiveOS device.
|
||||||
|
|
||||||
|
If a persistent overlay is detected at the standard LiveOS path, the overlay &
|
||||||
|
overlay type detected (whether OverlayFS or Device-mapper) will be used.
|
||||||
|
|
||||||
|
The **rd.live.overlay.readonly** option, which allows a persistent overlayfs to
|
||||||
|
be mounted read only through a higher level transient overlay directory, has
|
||||||
|
been implemented through the multiple lower layers feature of OverlayFS.
|
||||||
|
|
||||||
|
|
||||||
Plymouth Boot Splash
|
Plymouth Boot Splash
|
||||||
~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~
|
||||||
**plymouth.enable=0**::
|
**plymouth.enable=0**::
|
||||||
disable the plymouth bootsplash completly.
|
disable the plymouth bootsplash completely.
|
||||||
|
|
||||||
**rd.plymouth=0**::
|
**rd.plymouth=0**::
|
||||||
disable the plymouth bootsplash only for the initramfs.
|
disable the plymouth bootsplash only for the initramfs.
|
||||||
@@ -832,6 +1120,8 @@ rd_NO_MD:: rd.md=0
|
|||||||
|
|
||||||
rd_MD_UUID:: rd.md.uuid
|
rd_MD_UUID:: rd.md.uuid
|
||||||
|
|
||||||
|
rd_NO_MULTIPATH: rd.multipath=0
|
||||||
|
|
||||||
rd_NFS_DOMAIN:: rd.nfs.domain
|
rd_NFS_DOMAIN:: rd.nfs.domain
|
||||||
|
|
||||||
iscsi_initiator:: rd.iscsi.initiator
|
iscsi_initiator:: rd.iscsi.initiator
|
||||||
|
54
dracut.conf
54
dracut.conf
@@ -1,51 +1,3 @@
|
|||||||
# PUT YOUR CONFIG HERE OR IN separate files named *.conf
|
# PUT YOUR CONFIG IN separate files
|
||||||
# in /etc/dracut.conf.d
|
# in /etc/dracut.conf.d named "<name>.conf"
|
||||||
# SEE man dracut.conf(5)
|
# SEE man dracut.conf(5) for options
|
||||||
|
|
||||||
# Sample dracut config file
|
|
||||||
|
|
||||||
#logfile=/var/log/dracut.log
|
|
||||||
#fileloglvl=6
|
|
||||||
|
|
||||||
# Exact list of dracut modules to use. Modules not listed here are not going
|
|
||||||
# to be included. If you only want to add some optional modules use
|
|
||||||
# add_dracutmodules option instead.
|
|
||||||
#dracutmodules+=""
|
|
||||||
|
|
||||||
# dracut modules to omit
|
|
||||||
#omit_dracutmodules+=""
|
|
||||||
|
|
||||||
# dracut modules to add to the default
|
|
||||||
#add_dracutmodules+=""
|
|
||||||
|
|
||||||
# additional kernel modules to the default
|
|
||||||
#add_drivers+=""
|
|
||||||
|
|
||||||
# list of kernel filesystem modules to be included in the generic initramfs
|
|
||||||
#filesystems+=""
|
|
||||||
|
|
||||||
# build initrd only to boot current hardware
|
|
||||||
#hostonly="yes"
|
|
||||||
#
|
|
||||||
|
|
||||||
# install local /etc/mdadm.conf
|
|
||||||
#mdadmconf="no"
|
|
||||||
|
|
||||||
# install local /etc/lvm/lvm.conf
|
|
||||||
#lvmconf="no"
|
|
||||||
|
|
||||||
# A list of fsck tools to install. If it's not specified, module's hardcoded
|
|
||||||
# default is used, currently: "umount mount /sbin/fsck* xfs_db xfs_check
|
|
||||||
# xfs_repair e2fsck jfs_fsck reiserfsck btrfsck". The installation is
|
|
||||||
# opportunistic, so non-existing tools are just ignored.
|
|
||||||
#fscks=""
|
|
||||||
|
|
||||||
# inhibit installation of any fsck tools
|
|
||||||
#nofscks="yes"
|
|
||||||
|
|
||||||
# mount / and /usr read-only by default
|
|
||||||
#ro_mnt="no"
|
|
||||||
|
|
||||||
# set the directory for temporary files
|
|
||||||
# default: /var/tmp
|
|
||||||
#tmpdir=/tmp
|
|
||||||
|
@@ -10,35 +10,40 @@ dracut.conf - configuration file(s) for dracut
|
|||||||
|
|
||||||
SYNOPSIS
|
SYNOPSIS
|
||||||
--------
|
--------
|
||||||
_/etc/dracut.conf_ _/etc/dracut.conf.d/*.conf_
|
_/etc/dracut.conf_
|
||||||
|
_/etc/dracut.conf.d/\*.conf_
|
||||||
_/usr/lib/dracut/dracut.conf.d/*.conf_
|
_/usr/lib/dracut/dracut.conf.d/*.conf_
|
||||||
|
|
||||||
Description
|
Description
|
||||||
-----------
|
-----------
|
||||||
_dracut.conf_ is loaded during the initialisation phase of dracut. Command line
|
_dracut.conf_ is loaded during the initialisation phase of dracut. Command line
|
||||||
parameter will overwrite any values set here.
|
parameter will override any values set here.
|
||||||
|
|
||||||
_*.conf_ files are read from /usr/lib/dracut/dracut.conf.d and
|
_*.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
|
/etc/dracut.conf.d. Files with the same name in /etc/dracut.conf.d will replace
|
||||||
files in /usr/lib/dracut/dracut.conf.d.
|
files in /usr/lib/dracut/dracut.conf.d.
|
||||||
The files are then read in alphanumerical order and will overwrite parameters
|
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 '#'
|
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
|
indicates the beginning of a comment; following characters, up to the end of the
|
||||||
line are not interpreted.
|
line are not interpreted.
|
||||||
|
|
||||||
dracut command line options will overwrite any values set here.
|
dracut command line options will override any values set here.
|
||||||
|
|
||||||
Configuration files must have the extension .conf; other extensions are ignored.
|
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>__ "::
|
*dracutmodules+=*" __<dracut modules>__ "::
|
||||||
Specify a space-separated list of dracut modules to call when building the
|
Specify a space-separated list of dracut modules to call when building the
|
||||||
initramfs. Modules are located in _/usr/lib/dracut/modules.d_.
|
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_dracutmodules+=*" __<dracut modules>__ "::
|
||||||
Omit a space-separated list of 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_.
|
||||||
*add_dracutmodules+=*" __<dracut modules>__ "::
|
|
||||||
Add a space-separated list of dracut modules.
|
|
||||||
|
|
||||||
*drivers+=*" __<kernel modules>__ "::
|
*drivers+=*" __<kernel modules>__ "::
|
||||||
Specify a space-separated list of kernel modules to exclusively include in
|
Specify a space-separated list of kernel modules to exclusively include in
|
||||||
@@ -49,6 +54,10 @@ Configuration files must have the extension .conf; other extensions are ignored.
|
|||||||
Specify a space-separated list of kernel modules to add to the initramfs.
|
Specify a space-separated list of kernel modules to add to the initramfs.
|
||||||
The kernel modules have to be specified without the ".ko" suffix.
|
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>__ "::
|
*omit_drivers+=*" __<kernel modules>__ "::
|
||||||
Specify a space-separated list of kernel modules not to add to the
|
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.
|
initramfs. The kernel modules have to be specified without the ".ko" suffix.
|
||||||
@@ -66,6 +75,17 @@ Configuration files must have the extension .conf; other extensions are ignored.
|
|||||||
*install_items+=*" __<file>__[ __<file>__ ...] "::
|
*install_items+=*" __<file>__[ __<file>__ ...] "::
|
||||||
Specify additional files to include in the initramfs, separated by spaces.
|
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|<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}__"::
|
*do_strip=*"__{yes|no}__"::
|
||||||
Strip binaries in the initramfs (default=yes)
|
Strip binaries in the initramfs (default=yes)
|
||||||
|
|
||||||
@@ -76,8 +96,8 @@ Configuration files must have the extension .conf; other extensions are ignored.
|
|||||||
Host-Only mode: Install only what is needed for booting the local host
|
Host-Only mode: Install only what is needed for booting the local host
|
||||||
instead of a generic host and generate host-specific configuration.
|
instead of a generic host and generate host-specific configuration.
|
||||||
|
|
||||||
*hostonly_cmdline*"__{yes|no}__"::
|
*hostonly_cmdline=*"__{yes|no}__"::
|
||||||
If set, store the kernel command line arguments needed in the initramfs
|
If set to "yes", store the kernel command line arguments needed in the initramfs
|
||||||
|
|
||||||
*persistent_policy=*"__<policy>__"::
|
*persistent_policy=*"__<policy>__"::
|
||||||
Use _<policy>_ to address disks and partitions.
|
Use _<policy>_ to address disks and partitions.
|
||||||
@@ -164,7 +184,7 @@ provide a valid _/etc/fstab_.
|
|||||||
*show_modules=*"__{yes|no}__"::
|
*show_modules=*"__{yes|no}__"::
|
||||||
Print the name of the included modules to standard output during build.
|
Print the name of the included modules to standard output during build.
|
||||||
|
|
||||||
*i18n_vars="__<variable mapping>__"::
|
*i18n_vars=*"__<variable mapping>__"::
|
||||||
Distribution specific variable mapping.
|
Distribution specific variable mapping.
|
||||||
See dracut/modules.d/10i18n/README for a detailed description.
|
See dracut/modules.d/10i18n/README for a detailed description.
|
||||||
|
|
||||||
@@ -175,6 +195,22 @@ provide a valid _/etc/fstab_.
|
|||||||
*i18n_install_all=*"__{yes|no}__"::
|
*i18n_install_all=*"__{yes|no}__"::
|
||||||
Install everything regardless of generic or hostonly mode.
|
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
|
Files
|
||||||
-----
|
-----
|
||||||
_/etc/dracut.conf_::
|
_/etc/dracut.conf_::
|
||||||
@@ -182,7 +218,7 @@ _/etc/dracut.conf_::
|
|||||||
_/etc/dracut.conf.d/_.
|
_/etc/dracut.conf.d/_.
|
||||||
|
|
||||||
_/etc/dracut.conf.d/_::
|
_/etc/dracut.conf.d/_::
|
||||||
Any _/etc/dracut.conf.d/*.conf_ file can overwrite the values in
|
Any _/etc/dracut.conf.d/*.conf_ file can override the values in
|
||||||
_/etc/dracut.conf_. The configuration files are read in alphanumerical
|
_/etc/dracut.conf_. The configuration files are read in alphanumerical
|
||||||
order.
|
order.
|
||||||
|
|
||||||
|
@@ -2,11 +2,13 @@
|
|||||||
|
|
||||||
# i18n
|
# i18n
|
||||||
i18n_vars="/etc/sysconfig/keyboard:KEYTABLE-KEYMAP /etc/sysconfig/i18n:SYSFONT-FONT,FONTACM-FONT_MAP,FONT_UNIMAP"
|
i18n_vars="/etc/sysconfig/keyboard:KEYTABLE-KEYMAP /etc/sysconfig/i18n:SYSFONT-FONT,FONTACM-FONT_MAP,FONT_UNIMAP"
|
||||||
i18n_default_font="latarcyrheb-sun16"
|
i18n_default_font="eurlatgr"
|
||||||
i18n_install_all="yes"
|
i18n_install_all="yes"
|
||||||
|
|
||||||
|
|
||||||
stdloglvl=3
|
stdloglvl=3
|
||||||
sysloglvl=5
|
sysloglvl=5
|
||||||
install_items+=" vi /etc/virc ps grep cat rm "
|
install_optional_items+=" vi /etc/virc ps grep cat rm "
|
||||||
prefix="/"
|
prefix="/"
|
||||||
systemdutildir=/usr/lib/systemd
|
systemdutildir=/usr/lib/systemd
|
||||||
systemdsystemunitdir=/usr/lib/systemd/system
|
systemdsystemunitdir=/usr/lib/systemd/system
|
||||||
@@ -14,3 +16,5 @@ systemdsystemconfdir=/etc/systemd/system
|
|||||||
udevdir=/usr/lib/udev
|
udevdir=/usr/lib/udev
|
||||||
hostonly="yes"
|
hostonly="yes"
|
||||||
hostonly_cmdline="no"
|
hostonly_cmdline="no"
|
||||||
|
early_microcode="yes"
|
||||||
|
reproducible="yes"
|
||||||
|
@@ -1,3 +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"
|
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"
|
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
|
||||||
|
@@ -19,7 +19,7 @@ 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
|
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>>.
|
point of time in which they are executed, are described in <<stages>>.
|
||||||
|
|
||||||
The main script, which creates the initramfs is dracut itsself. It parses all
|
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
|
arguments and sets up the directory, in which everything is installed. It then
|
||||||
executes all check, install, installkernel scripts found in the modules, which
|
executes all check, install, installkernel scripts found in the modules, which
|
||||||
are to be processed. After everything is installed, the install directory is
|
are to be processed. After everything is installed, the install directory is
|
||||||
@@ -168,7 +168,7 @@ inst_hook cmdline 20 "$moddir/parse-insmodpost.sh"
|
|||||||
inst_simple "$moddir/insmodpost.sh" /sbin/insmodpost.sh
|
inst_simple "$moddir/insmodpost.sh" /sbin/insmodpost.sh
|
||||||
----
|
----
|
||||||
|
|
||||||
The _pase-instmodpost.sh_ parses the kernel command line for a argument
|
The _parse-instmodpost.sh_ parses the kernel command line for a argument
|
||||||
rd.driver.post, blacklists the module from being autoloaded and installs the
|
rd.driver.post, blacklists the module from being autoloaded and installs the
|
||||||
hook _insmodpost.sh_ in the _initqueue/settled_.
|
hook _insmodpost.sh_ in the _initqueue/settled_.
|
||||||
|
|
||||||
|
BIN
dracut.png
BIN
dracut.png
Binary file not shown.
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 6.2 KiB |
117
dracut.spec
117
dracut.spec
@@ -1,6 +1,11 @@
|
|||||||
%define dracutlibdir %{_prefix}/lib/dracut
|
%define dracutlibdir %{_prefix}/lib/dracut
|
||||||
%bcond_without doc
|
%bcond_without doc
|
||||||
|
|
||||||
|
# We ship a .pc file but don't want to have a dep on pkg-config. We
|
||||||
|
# strip the automatically generated dep here and instead co-own the
|
||||||
|
# directory.
|
||||||
|
%global __requires_exclude pkg-config
|
||||||
|
|
||||||
# Variables must be defined
|
# Variables must be defined
|
||||||
%define with_nbd 1
|
%define with_nbd 1
|
||||||
|
|
||||||
@@ -28,10 +33,12 @@ License: GPLv2+ and LGPLv2+
|
|||||||
URL: https://dracut.wiki.kernel.org/
|
URL: https://dracut.wiki.kernel.org/
|
||||||
|
|
||||||
# Source can be generated by
|
# Source can be generated by
|
||||||
# http://git.kernel.org/?p=boot/dracut/dracut.git;a=snapshot;h=%{version};sf=tgz
|
# 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
|
Source0: http://www.kernel.org/pub/linux/utils/boot/dracut/dracut-%{version}.tar.xz
|
||||||
|
Source1: https://www.gnu.org/licenses/lgpl-2.1.txt
|
||||||
|
|
||||||
BuildRequires: bash git
|
BuildRequires: bash git
|
||||||
|
BuildRequires: kmod-devel >= 15
|
||||||
|
|
||||||
%if 0%{?fedora} || 0%{?rhel}
|
%if 0%{?fedora} || 0%{?rhel}
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
@@ -39,7 +46,6 @@ BuildRequires: pkgconfig
|
|||||||
%endif
|
%endif
|
||||||
%if 0%{?fedora}
|
%if 0%{?fedora}
|
||||||
BuildRequires: bash-completion
|
BuildRequires: bash-completion
|
||||||
BuildRequires: pkgconfig
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if 0%{?suse_version}
|
%if 0%{?suse_version}
|
||||||
@@ -58,14 +64,13 @@ BuildRequires: docbook-style-xsl docbook-dtds libxslt
|
|||||||
BuildRequires: asciidoc
|
BuildRequires: asciidoc
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%if 0%{?fedora} > 12 || 0%{?rhel}
|
%if 0%{?fedora} > 12 || 0%{?rhel}
|
||||||
# no "provides", because dracut does not offer
|
# no "provides", because dracut does not offer
|
||||||
# all functionality of the obsoleted packages
|
# all functionality of the obsoleted packages
|
||||||
Obsoletes: mkinitrd <= 6.0.93
|
Obsoletes: mkinitrd < 6.0.94
|
||||||
Obsoletes: mkinitrd-devel <= 6.0.93
|
Obsoletes: mkinitrd-devel < 6.0.94
|
||||||
Obsoletes: nash <= 6.0.93
|
Obsoletes: nash < 6.0.94
|
||||||
Obsoletes: libbdevid-python <= 6.0.93
|
Obsoletes: libbdevid-python < 6.0.94
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if 0%{?fedora} > 16 || 0%{?rhel} > 6
|
%if 0%{?fedora} > 16 || 0%{?rhel} > 6
|
||||||
@@ -80,9 +85,9 @@ Provides: mkinitrd = 2.6.1
|
|||||||
Obsoletes: dracut-kernel < 005
|
Obsoletes: dracut-kernel < 005
|
||||||
Provides: dracut-kernel = %{version}-%{release}
|
Provides: dracut-kernel = %{version}-%{release}
|
||||||
|
|
||||||
Obsoletes: dracut <= 029
|
Obsoletes: dracut < 030
|
||||||
Obsoletes: dracut-norescue
|
Obsoletes: dracut-norescue < 030
|
||||||
Provides: dracut-norescue
|
Provides: dracut-norescue = %{version}-%{release}
|
||||||
|
|
||||||
Requires: bash >= 4
|
Requires: bash >= 4
|
||||||
Requires: coreutils
|
Requires: coreutils
|
||||||
@@ -90,15 +95,26 @@ Requires: cpio
|
|||||||
Requires: filesystem >= 2.1.0
|
Requires: filesystem >= 2.1.0
|
||||||
Requires: findutils
|
Requires: findutils
|
||||||
Requires: grep
|
Requires: grep
|
||||||
Requires: hardlink
|
|
||||||
Requires: gzip xz
|
|
||||||
Requires: kmod
|
Requires: kmod
|
||||||
Requires: sed
|
Requires: sed
|
||||||
|
Requires: xz
|
||||||
|
Requires: gzip
|
||||||
|
|
||||||
|
%if 0%{?fedora} > 22 || 0%{?rhel} > 7
|
||||||
|
Recommends: grubby
|
||||||
|
Recommends: hardlink
|
||||||
|
Recommends: pigz
|
||||||
|
Recommends: kpartx
|
||||||
|
%else
|
||||||
|
Requires: hardlink
|
||||||
|
Requires: gzip
|
||||||
Requires: kpartx
|
Requires: kpartx
|
||||||
|
%endif
|
||||||
|
|
||||||
%if 0%{?fedora} || 0%{?rhel} > 6
|
%if 0%{?fedora} || 0%{?rhel} > 6
|
||||||
Requires: util-linux >= 2.21
|
Requires: util-linux >= 2.21
|
||||||
Requires: systemd >= 199
|
Requires: systemd >= 219
|
||||||
|
Requires: systemd-udev >= 219
|
||||||
Requires: procps-ng
|
Requires: procps-ng
|
||||||
Conflicts: grubby < 8.23
|
Conflicts: grubby < 8.23
|
||||||
Conflicts: initscripts < 8.63-1
|
Conflicts: initscripts < 8.63-1
|
||||||
@@ -166,11 +182,21 @@ Requires: libcap
|
|||||||
This package requires everything which is needed to build an
|
This package requires everything which is needed to build an
|
||||||
initramfs with dracut, which drops capabilities.
|
initramfs with dracut, which drops capabilities.
|
||||||
|
|
||||||
|
%package live
|
||||||
|
Summary: dracut modules to build a dracut initramfs with live image capabilities
|
||||||
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
Requires: %{name}-network = %{version}-%{release}
|
||||||
|
Requires: tar gzip coreutils bash device-mapper curl
|
||||||
|
|
||||||
|
%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
|
%package config-generic
|
||||||
Summary: dracut configuration to turn off hostonly image generation
|
Summary: dracut configuration to turn off hostonly image generation
|
||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{name} = %{version}-%{release}
|
||||||
Obsoletes: dracut-nohostonly
|
Obsoletes: dracut-nohostonly < 030
|
||||||
Provides: dracut-nohostonly
|
Provides: dracut-nohostonly = %{version}-%{release}
|
||||||
|
|
||||||
%description config-generic
|
%description config-generic
|
||||||
This package provides the configuration to turn off the host specific initramfs
|
This package provides the configuration to turn off the host specific initramfs
|
||||||
@@ -179,7 +205,7 @@ generation with dracut and generates a generic image by default.
|
|||||||
%package config-rescue
|
%package config-rescue
|
||||||
Summary: dracut configuration to turn on rescue image generation
|
Summary: dracut configuration to turn on rescue image generation
|
||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{name} = %{version}-%{release}
|
||||||
Obsoletes: dracut <= 029
|
Obsoletes: dracut < 030
|
||||||
|
|
||||||
%description config-rescue
|
%description config-rescue
|
||||||
This package provides the configuration to turn on the rescue initramfs
|
This package provides the configuration to turn on the rescue initramfs
|
||||||
@@ -193,24 +219,17 @@ Requires: %{name} = %{version}-%{release}
|
|||||||
This package contains tools to assemble the local initrd and host configuration.
|
This package contains tools to assemble the local initrd and host configuration.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}-%{version}
|
%autosetup -n %{name}-%{version} -S git_am
|
||||||
|
cp %{SOURCE1} .
|
||||||
%if %{defined PATCH1}
|
|
||||||
git init
|
|
||||||
git config user.email "dracut-maint@redhat.com"
|
|
||||||
git config user.name "Fedora dracut team"
|
|
||||||
git add .
|
|
||||||
git commit -a -q -m "%{version} baseline."
|
|
||||||
|
|
||||||
# Apply all the patches.
|
|
||||||
git am -p1 %{patches}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure --systemdsystemunitdir=%{_unitdir} --bashcompletiondir=$(pkg-config --variable=completionsdir bash-completion) --libdir=%{_prefix}/lib \
|
%configure --systemdsystemunitdir=%{_unitdir} \
|
||||||
|
--bashcompletiondir=$(pkg-config --variable=completionsdir bash-completion) \
|
||||||
|
--libdir=%{_prefix}/lib \
|
||||||
%if %{without doc}
|
%if %{without doc}
|
||||||
--disable-documentation
|
--disable-documentation \
|
||||||
%endif
|
%endif
|
||||||
|
${NULL}
|
||||||
|
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
@@ -283,21 +302,17 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/
|
|||||||
> $RPM_BUILD_ROOT/etc/system-fips
|
> $RPM_BUILD_ROOT/etc/system-fips
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# create compat symlink
|
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_sbindir}
|
|
||||||
ln -sr $RPM_BUILD_ROOT%{_bindir}/dracut $RPM_BUILD_ROOT%{_sbindir}/dracut
|
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf -- $RPM_BUILD_ROOT
|
rm -rf -- $RPM_BUILD_ROOT
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,0755)
|
%defattr(-,root,root,0755)
|
||||||
%if %{with doc}
|
%if %{with doc}
|
||||||
%doc README HACKING TODO COPYING AUTHORS NEWS dracut.html dracut.png dracut.svg
|
%doc README HACKING TODO AUTHORS NEWS dracut.html dracut.png dracut.svg
|
||||||
%endif
|
%endif
|
||||||
|
%{!?_licensedir:%global license %%doc}
|
||||||
|
%license COPYING lgpl-2.1.txt
|
||||||
%{_bindir}/dracut
|
%{_bindir}/dracut
|
||||||
# compat symlink
|
|
||||||
%{_sbindir}/dracut
|
|
||||||
%{_datadir}/bash-completion/completions/dracut
|
%{_datadir}/bash-completion/completions/dracut
|
||||||
%{_datadir}/bash-completion/completions/lsinitrd
|
%{_datadir}/bash-completion/completions/lsinitrd
|
||||||
%if 0%{?fedora} > 12 || 0%{?rhel} >= 6 || 0%{?suse_version} > 9999
|
%if 0%{?fedora} > 12 || 0%{?rhel} >= 6 || 0%{?suse_version} > 9999
|
||||||
@@ -307,6 +322,7 @@ rm -rf -- $RPM_BUILD_ROOT
|
|||||||
%dir %{dracutlibdir}
|
%dir %{dracutlibdir}
|
||||||
%dir %{dracutlibdir}/modules.d
|
%dir %{dracutlibdir}/modules.d
|
||||||
%{dracutlibdir}/dracut-functions.sh
|
%{dracutlibdir}/dracut-functions.sh
|
||||||
|
%{dracutlibdir}/dracut-init.sh
|
||||||
%{dracutlibdir}/dracut-functions
|
%{dracutlibdir}/dracut-functions
|
||||||
%{dracutlibdir}/dracut-version.sh
|
%{dracutlibdir}/dracut-version.sh
|
||||||
%{dracutlibdir}/dracut-logger.sh
|
%{dracutlibdir}/dracut-logger.sh
|
||||||
@@ -319,6 +335,8 @@ rm -rf -- $RPM_BUILD_ROOT
|
|||||||
%endif
|
%endif
|
||||||
%dir %{_sysconfdir}/dracut.conf.d
|
%dir %{_sysconfdir}/dracut.conf.d
|
||||||
%dir %{dracutlibdir}/dracut.conf.d
|
%dir %{dracutlibdir}/dracut.conf.d
|
||||||
|
%dir %{_datadir}/pkgconfig
|
||||||
|
%{_datadir}/pkgconfig/dracut.pc
|
||||||
|
|
||||||
%if %{with doc}
|
%if %{with doc}
|
||||||
%{_mandir}/man8/dracut.8*
|
%{_mandir}/man8/dracut.8*
|
||||||
@@ -340,6 +358,8 @@ rm -rf -- $RPM_BUILD_ROOT
|
|||||||
%{dracutlibdir}/modules.d/00bootchart
|
%{dracutlibdir}/modules.d/00bootchart
|
||||||
%endif
|
%endif
|
||||||
%{dracutlibdir}/modules.d/00bash
|
%{dracutlibdir}/modules.d/00bash
|
||||||
|
%{dracutlibdir}/modules.d/00systemd
|
||||||
|
%{dracutlibdir}/modules.d/01systemd-initrd
|
||||||
%{dracutlibdir}/modules.d/03modsign
|
%{dracutlibdir}/modules.d/03modsign
|
||||||
%{dracutlibdir}/modules.d/03rescue
|
%{dracutlibdir}/modules.d/03rescue
|
||||||
%{dracutlibdir}/modules.d/04watchdog
|
%{dracutlibdir}/modules.d/04watchdog
|
||||||
@@ -350,15 +370,16 @@ rm -rf -- $RPM_BUILD_ROOT
|
|||||||
%{dracutlibdir}/modules.d/50drm
|
%{dracutlibdir}/modules.d/50drm
|
||||||
%{dracutlibdir}/modules.d/50plymouth
|
%{dracutlibdir}/modules.d/50plymouth
|
||||||
%{dracutlibdir}/modules.d/80cms
|
%{dracutlibdir}/modules.d/80cms
|
||||||
|
%{dracutlibdir}/modules.d/80lvmmerge
|
||||||
%{dracutlibdir}/modules.d/90btrfs
|
%{dracutlibdir}/modules.d/90btrfs
|
||||||
%{dracutlibdir}/modules.d/90crypt
|
%{dracutlibdir}/modules.d/90crypt
|
||||||
%{dracutlibdir}/modules.d/90dm
|
%{dracutlibdir}/modules.d/90dm
|
||||||
%{dracutlibdir}/modules.d/90dmraid
|
%{dracutlibdir}/modules.d/90dmraid
|
||||||
%{dracutlibdir}/modules.d/90dmsquash-live
|
|
||||||
%{dracutlibdir}/modules.d/90kernel-modules
|
%{dracutlibdir}/modules.d/90kernel-modules
|
||||||
%{dracutlibdir}/modules.d/90lvm
|
%{dracutlibdir}/modules.d/90lvm
|
||||||
%{dracutlibdir}/modules.d/90mdraid
|
%{dracutlibdir}/modules.d/90mdraid
|
||||||
%{dracutlibdir}/modules.d/90multipath
|
%{dracutlibdir}/modules.d/90multipath
|
||||||
|
%{dracutlibdir}/modules.d/90multipath-hostonly
|
||||||
%{dracutlibdir}/modules.d/90qemu
|
%{dracutlibdir}/modules.d/90qemu
|
||||||
%{dracutlibdir}/modules.d/91crypt-gpg
|
%{dracutlibdir}/modules.d/91crypt-gpg
|
||||||
%{dracutlibdir}/modules.d/91crypt-loop
|
%{dracutlibdir}/modules.d/91crypt-loop
|
||||||
@@ -384,17 +405,16 @@ rm -rf -- $RPM_BUILD_ROOT
|
|||||||
%{dracutlibdir}/modules.d/98pollcdrom
|
%{dracutlibdir}/modules.d/98pollcdrom
|
||||||
%{dracutlibdir}/modules.d/98selinux
|
%{dracutlibdir}/modules.d/98selinux
|
||||||
%{dracutlibdir}/modules.d/98syslog
|
%{dracutlibdir}/modules.d/98syslog
|
||||||
%{dracutlibdir}/modules.d/98systemd
|
%{dracutlibdir}/modules.d/98dracut-systemd
|
||||||
%{dracutlibdir}/modules.d/98usrmount
|
%{dracutlibdir}/modules.d/98usrmount
|
||||||
%{dracutlibdir}/modules.d/99base
|
%{dracutlibdir}/modules.d/99base
|
||||||
%{dracutlibdir}/modules.d/99fs-lib
|
%{dracutlibdir}/modules.d/99fs-lib
|
||||||
%{dracutlibdir}/modules.d/99img-lib
|
|
||||||
%{dracutlibdir}/modules.d/99shutdown
|
%{dracutlibdir}/modules.d/99shutdown
|
||||||
%attr(0644,root,root) %ghost %config(missingok,noreplace) %{_localstatedir}/log/dracut.log
|
%attr(0644,root,root) %ghost %config(missingok,noreplace) %{_localstatedir}/log/dracut.log
|
||||||
%dir %{_sharedstatedir}/initramfs
|
%dir %{_sharedstatedir}/initramfs
|
||||||
%if %{defined _unitdir}
|
%if %{defined _unitdir}
|
||||||
%{_unitdir}/dracut-shutdown.service
|
%{_unitdir}/dracut-shutdown.service
|
||||||
%{_unitdir}/shutdown.target.wants/dracut-shutdown.service
|
%{_unitdir}/sysinit.target.wants/dracut-shutdown.service
|
||||||
%{_unitdir}/dracut-cmdline.service
|
%{_unitdir}/dracut-cmdline.service
|
||||||
%{_unitdir}/dracut-initqueue.service
|
%{_unitdir}/dracut-initqueue.service
|
||||||
%{_unitdir}/dracut-mount.service
|
%{_unitdir}/dracut-mount.service
|
||||||
@@ -417,10 +437,11 @@ rm -rf -- $RPM_BUILD_ROOT
|
|||||||
|
|
||||||
%files network
|
%files network
|
||||||
%defattr(-,root,root,0755)
|
%defattr(-,root,root,0755)
|
||||||
|
%{dracutlibdir}/modules.d/02systemd-networkd
|
||||||
%{dracutlibdir}/modules.d/40network
|
%{dracutlibdir}/modules.d/40network
|
||||||
|
%{dracutlibdir}/modules.d/90kernel-network-modules
|
||||||
%{dracutlibdir}/modules.d/95fcoe
|
%{dracutlibdir}/modules.d/95fcoe
|
||||||
%{dracutlibdir}/modules.d/95iscsi
|
%{dracutlibdir}/modules.d/95iscsi
|
||||||
%{dracutlibdir}/modules.d/90livenet
|
|
||||||
%{dracutlibdir}/modules.d/90qemu-net
|
%{dracutlibdir}/modules.d/90qemu-net
|
||||||
%{dracutlibdir}/modules.d/95cifs
|
%{dracutlibdir}/modules.d/95cifs
|
||||||
%{dracutlibdir}/modules.d/95nbd
|
%{dracutlibdir}/modules.d/95nbd
|
||||||
@@ -441,17 +462,19 @@ rm -rf -- $RPM_BUILD_ROOT
|
|||||||
|
|
||||||
%files fips-aesni
|
%files fips-aesni
|
||||||
%defattr(-,root,root,0755)
|
%defattr(-,root,root,0755)
|
||||||
|
|
||||||
%if %{with doc}
|
|
||||||
%doc COPYING
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%{dracutlibdir}/modules.d/02fips-aesni
|
%{dracutlibdir}/modules.d/02fips-aesni
|
||||||
|
|
||||||
%files caps
|
%files caps
|
||||||
%defattr(-,root,root,0755)
|
%defattr(-,root,root,0755)
|
||||||
%{dracutlibdir}/modules.d/02caps
|
%{dracutlibdir}/modules.d/02caps
|
||||||
|
|
||||||
|
%files live
|
||||||
|
%defattr(-,root,root,0755)
|
||||||
|
%{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)
|
%defattr(-,root,root,0755)
|
||||||
|
|
||||||
|
@@ -99,10 +99,6 @@ 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
|
filesystem LABEL or UUID on the kernel command line for your root device, dracut
|
||||||
will find it and boot from it.
|
will find it and boot from it.
|
||||||
|
|
||||||
The kernel command line usually can be configured in _/boot/grub/grub.conf_ or
|
|
||||||
_/boot/grub2/grub.cfg_, if grub is your bootloader and it also can be edited in
|
|
||||||
the real boot process in the grub menu.
|
|
||||||
|
|
||||||
The kernel command line can also be provided by the dhcp server with the
|
The kernel command line can also be provided by the dhcp server with the
|
||||||
root-path option. See <<NetworkBoot>>.
|
root-path option. See <<NetworkBoot>>.
|
||||||
|
|
||||||
@@ -209,7 +205,7 @@ be specified once.
|
|||||||
----
|
----
|
||||||
# mkdir -p rd.live.overlay/etc/cmdline.d
|
# mkdir -p rd.live.overlay/etc/cmdline.d
|
||||||
# mkdir -p rd.live.overlay/etc/conf.d
|
# mkdir -p rd.live.overlay/etc/conf.d
|
||||||
# echo "ip=auto" >> rd.live.overlay/etc/cmdline.d/mycmdline.conf
|
# 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 FOO=testtest >> rd.live.overlay/etc/conf.d/testvar.conf
|
||||||
# echo export BAR=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/
|
# tree rd.live.overlay/
|
||||||
@@ -246,22 +242,7 @@ specified multiple times.
|
|||||||
If your root partition is on a network drive, you have to have the network
|
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.
|
dracut modules installed to create a network aware initramfs image.
|
||||||
|
|
||||||
On a Red Hat Enterprise Linux or Fedora system, this means, you have to install
|
If you specify ip=dhcp on the kernel command line, then dracut asks a dhcp
|
||||||
the _dracut-network_ rpm package:
|
|
||||||
|
|
||||||
|
|
||||||
----
|
|
||||||
# yum install dracut-network
|
|
||||||
----
|
|
||||||
|
|
||||||
The resulting initramfs image can be served by a boot manager residing on your
|
|
||||||
local hard drive or it can be served by a PXE/TFTP server.
|
|
||||||
|
|
||||||
How to setup your PXE/TFTP server can be found in the
|
|
||||||
http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Storage_Administration_Guide/[Red
|
|
||||||
Hat Enterprise Linux Storage Administration Guide].
|
|
||||||
|
|
||||||
If you specify ip=auto on the kernel command line, then dracut asks a dhcp
|
|
||||||
server about the ip adress for the machine. The dhcp server can also serve an
|
server about the ip adress for the machine. The dhcp server can also serve an
|
||||||
additional root-path, which will set the root device for dracut. With this
|
additional root-path, which will set the root device for dracut. With this
|
||||||
mechanism, you have static configuration on your client machine and a
|
mechanism, you have static configuration on your client machine and a
|
||||||
@@ -300,7 +281,7 @@ This will reduce the size of the initramfs image significantly.
|
|||||||
If the boot process does not succeed, you have several options to debug the
|
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
|
situation. Some of the basic operations are covered here. For more information
|
||||||
you should also visit:
|
you should also visit:
|
||||||
http://fedoraproject.org/wiki/How_to_debug_Dracut_problems
|
https://www.kernel.org/pub/linux/utils/boot/dracut/dracut.html
|
||||||
|
|
||||||
|
|
||||||
[[identifying-your-problem-area]]
|
[[identifying-your-problem-area]]
|
||||||
@@ -325,7 +306,7 @@ stick and mount that. Then you can store the output for later inspection.
|
|||||||
In all cases, the following should be mentioned and attached to your bug report:
|
In all cases, the following should be mentioned and attached to your bug report:
|
||||||
|
|
||||||
* The exact kernel command-line used. Typically from the bootloader
|
* The exact kernel command-line used. Typically from the bootloader
|
||||||
configuration file (e.g. _/etc/grub.conf_) or from _/proc/cmdline_.
|
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
|
* A copy of your disk partition information from _/etc/fstab_, which might be
|
||||||
obtained booting an old working initramfs or a rescue medium.
|
obtained booting an old working initramfs or a rescue medium.
|
||||||
* Turn on dracut debugging (see _the 'debugging dracut' section_), and attach
|
* Turn on dracut debugging (see _the 'debugging dracut' section_), and attach
|
||||||
@@ -360,7 +341,7 @@ logging during the system boot. This section documents configuring a
|
|||||||
serial console connection to record boot messages.
|
serial console connection to record boot messages.
|
||||||
|
|
||||||
. First, enable serial console output for both the kernel and the bootloader.
|
. First, enable serial console output for both the kernel and the bootloader.
|
||||||
. Open the file _/etc/grub.conf_ for editing. Below the line ''timeout=5'', add
|
. Open the file _/boot/grub2/grub.cfg_ for editing. Below the line ''timeout=5'', add
|
||||||
the following:
|
the following:
|
||||||
+
|
+
|
||||||
----
|
----
|
||||||
@@ -368,14 +349,14 @@ serial --unit=0 --speed=9600
|
|||||||
terminal --timeout=5 serial console
|
terminal --timeout=5 serial console
|
||||||
----
|
----
|
||||||
+
|
+
|
||||||
. Also in _/etc/grub.conf_, add the following boot arguemnts to the ''kernel''
|
. Also in _/boot/grub2/grub.cfg_, add the following boot arguemnts to the ''kernel''
|
||||||
line:
|
line:
|
||||||
+
|
+
|
||||||
----
|
----
|
||||||
console=tty0 console=ttyS0,9600
|
console=tty0 console=ttyS0,9600
|
||||||
----
|
----
|
||||||
+
|
+
|
||||||
. When finished, the _/etc/grub.conf_ file should look similar to the example
|
. When finished, the _/boot/grub2/grub.cfg_ file should look similar to the example
|
||||||
below.
|
below.
|
||||||
+
|
+
|
||||||
----
|
----
|
||||||
@@ -410,10 +391,10 @@ dracut offers a shell for interactive debugging in the event dracut fails to
|
|||||||
locate your root filesystem. To enable the shell:
|
locate your root filesystem. To enable the shell:
|
||||||
|
|
||||||
. Add the boot parameter ''rd.shell'' to your bootloader configuration file
|
. Add the boot parameter ''rd.shell'' to your bootloader configuration file
|
||||||
(e.g. _/etc/grub.conf_)
|
(e.g. _/boot/grub2/grub.cfg_)
|
||||||
. Remove the boot arguments ''rhgb'' and ''quiet''
|
. Remove the boot arguments ''rhgb'' and ''quiet''
|
||||||
+
|
+
|
||||||
A sample _/etc/grub.conf_ bootloader configuration file is listed below.
|
A sample _/boot/grub2/grub.cfg_ bootloader configuration file is listed below.
|
||||||
+
|
+
|
||||||
----
|
----
|
||||||
default=0
|
default=0
|
||||||
@@ -528,7 +509,7 @@ on _pre-shutdown_ or _shutdown_.
|
|||||||
To do this from an already booted system:
|
To do this from an already booted system:
|
||||||
----
|
----
|
||||||
# mkdir -p /run/initramfs/etc/cmdline.d
|
# mkdir -p /run/initramfs/etc/cmdline.d
|
||||||
# echo "rd.break=pre-shutdown" > /run/initramfs/etc/cmdline.d/debug.conf
|
# echo "rd.debug rd.break=pre-shutdown rd.break=shutdown" > /run/initramfs/etc/cmdline.d/debug.conf
|
||||||
# touch /run/initramfs/.need_shutdown
|
# touch /run/initramfs/.need_shutdown
|
||||||
----
|
----
|
||||||
|
|
||||||
|
22
git2spec.pl
22
git2spec.pl
@@ -3,10 +3,22 @@
|
|||||||
sub create_patches {
|
sub create_patches {
|
||||||
my $tag=shift;
|
my $tag=shift;
|
||||||
my $pdir=shift;
|
my $pdir=shift;
|
||||||
my $num=0;
|
my $n=1;
|
||||||
open( GIT, 'git format-patch -M -N --no-signature -o "'.$pdir.'" '.$tag.' |');
|
my @lines;
|
||||||
@lines=<GIT>;
|
|
||||||
close GIT; # be done
|
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} .*$/) {
|
||||||
|
my $fname = sprintf("%04d", $n++).".patch";
|
||||||
|
push @lines, $fname;
|
||||||
|
open FH, ">".$pdir."/".$fname;
|
||||||
|
}
|
||||||
|
print FH;
|
||||||
|
}
|
||||||
|
|
||||||
return @lines;
|
return @lines;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -35,7 +47,7 @@ while(<>) {
|
|||||||
$num=1;
|
$num=1;
|
||||||
for(@patches) {
|
for(@patches) {
|
||||||
s/.*\///g;
|
s/.*\///g;
|
||||||
print "Patch$num: $_";
|
print "Patch$num: $_\n";
|
||||||
$num++;
|
$num++;
|
||||||
}
|
}
|
||||||
print "\n";
|
print "\n";
|
||||||
|
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;
|
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,3 @@
|
|||||||
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
|
|
||||||
|
|
||||||
/***
|
/***
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
|
|
||||||
|
@@ -1,5 +1,3 @@
|
|||||||
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
|
|
||||||
|
|
||||||
#ifndef foohashmaphfoo
|
#ifndef foohashmaphfoo
|
||||||
#define foohashmaphfoo
|
#define foohashmaphfoo
|
||||||
|
|
||||||
|
@@ -1,5 +1,3 @@
|
|||||||
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
|
|
||||||
|
|
||||||
/***
|
/***
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
|
|
||||||
@@ -103,11 +101,10 @@ void log_set_facility(int facility) {
|
|||||||
static int write_to_console(
|
static int write_to_console(
|
||||||
int level,
|
int level,
|
||||||
const char*file,
|
const char*file,
|
||||||
int line,
|
unsigned int line,
|
||||||
const char *func,
|
const char *func,
|
||||||
const char *buffer) {
|
const char *buffer) {
|
||||||
|
|
||||||
char location[64];
|
|
||||||
struct iovec iovec[5];
|
struct iovec iovec[5];
|
||||||
unsigned n = 0;
|
unsigned n = 0;
|
||||||
|
|
||||||
@@ -119,7 +116,9 @@ static int write_to_console(
|
|||||||
IOVEC_SET_STRING(iovec[n++], "dracut-install: ");
|
IOVEC_SET_STRING(iovec[n++], "dracut-install: ");
|
||||||
|
|
||||||
if (show_location) {
|
if (show_location) {
|
||||||
snprintf(location, sizeof(location), "(%s:%u) ", file, line);
|
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++], location);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,5 +1,3 @@
|
|||||||
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
|
|
||||||
|
|
||||||
#ifndef foologhfoo
|
#ifndef foologhfoo
|
||||||
#define foologhfoo
|
#define foologhfoo
|
||||||
|
|
||||||
|
@@ -1,5 +1,3 @@
|
|||||||
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
|
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
/***
|
/***
|
||||||
@@ -207,7 +205,7 @@ static inline size_t IOVEC_INCREMENT(struct iovec *i, unsigned n, size_t k) {
|
|||||||
for (j = 0; j < n; j++) {
|
for (j = 0; j < n; j++) {
|
||||||
size_t sub;
|
size_t sub;
|
||||||
|
|
||||||
if (_unlikely_(k <= 0))
|
if (_unlikely_(k == 0))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
sub = MIN(i[j].iov_len, k);
|
sub = MIN(i[j].iov_len, k);
|
||||||
|
@@ -1,5 +1,3 @@
|
|||||||
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
|
|
||||||
|
|
||||||
/***
|
/***
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
|
|
||||||
@@ -84,7 +82,7 @@ char **strv_copy(char * const *l) {
|
|||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned strv_length(char * const *l) {
|
unsigned int strv_length(char * const *l) {
|
||||||
unsigned n = 0;
|
unsigned n = 0;
|
||||||
|
|
||||||
if (!l)
|
if (!l)
|
||||||
@@ -299,7 +297,7 @@ char **strv_split_quoted(const char *s) {
|
|||||||
|
|
||||||
char **strv_split_newlines(const char *s) {
|
char **strv_split_newlines(const char *s) {
|
||||||
char **l;
|
char **l;
|
||||||
unsigned n;
|
unsigned int n;
|
||||||
|
|
||||||
assert(s);
|
assert(s);
|
||||||
|
|
||||||
@@ -311,7 +309,7 @@ char **strv_split_newlines(const char *s) {
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
n = strv_length(l);
|
n = strv_length(l);
|
||||||
if (n <= 0)
|
if (n == 0)
|
||||||
return l;
|
return l;
|
||||||
|
|
||||||
if (isempty(l[n-1])) {
|
if (isempty(l[n-1])) {
|
||||||
@@ -491,9 +489,9 @@ char **strv_parse_nulstr(const char *s, size_t l) {
|
|||||||
unsigned c = 0, i = 0;
|
unsigned c = 0, i = 0;
|
||||||
char **v;
|
char **v;
|
||||||
|
|
||||||
assert(s || l <= 0);
|
assert(s || l == 0);
|
||||||
|
|
||||||
if (l <= 0)
|
if (l == 0)
|
||||||
return new0(char*, 1);
|
return new0(char*, 1);
|
||||||
|
|
||||||
for (p = s; p < s + l; p++)
|
for (p = s; p < s + l; p++)
|
||||||
|
@@ -1,5 +1,3 @@
|
|||||||
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
|
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
/***
|
/***
|
||||||
@@ -34,7 +32,7 @@ DEFINE_TRIVIAL_CLEANUP_FUNC(char**, strv_free);
|
|||||||
#define _cleanup_strv_free_ _cleanup_(strv_freep)
|
#define _cleanup_strv_free_ _cleanup_(strv_freep)
|
||||||
|
|
||||||
char **strv_copy(char * const *l);
|
char **strv_copy(char * const *l);
|
||||||
unsigned strv_length(char * const *l) _pure_;
|
unsigned int strv_length(char * const *l) _pure_;
|
||||||
|
|
||||||
char **strv_merge(char **a, char **b);
|
char **strv_merge(char **a, char **b);
|
||||||
char **strv_merge_concat(char **a, char **b, const char *suffix);
|
char **strv_merge_concat(char **a, char **b, const char *suffix);
|
||||||
|
@@ -1,5 +1,3 @@
|
|||||||
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
|
|
||||||
|
|
||||||
/***
|
/***
|
||||||
This file is part of systemd.
|
This file is part of systemd.
|
||||||
|
|
||||||
@@ -224,7 +222,7 @@ char *strappend(const char *s, const char *suffix) {
|
|||||||
char *strjoin(const char *x, ...) {
|
char *strjoin(const char *x, ...) {
|
||||||
va_list ap;
|
va_list ap;
|
||||||
size_t l;
|
size_t l;
|
||||||
char *r, *p;
|
char *r;
|
||||||
|
|
||||||
va_start(ap, x);
|
va_start(ap, x);
|
||||||
|
|
||||||
@@ -257,6 +255,8 @@ char *strjoin(const char *x, ...) {
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (x) {
|
if (x) {
|
||||||
|
char *p;
|
||||||
|
|
||||||
p = stpcpy(r, x);
|
p = stpcpy(r, x);
|
||||||
|
|
||||||
va_start(ap, x);
|
va_start(ap, x);
|
||||||
|
@@ -1,5 +1,3 @@
|
|||||||
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
|
|
||||||
|
|
||||||
#ifndef fooutilhfoo
|
#ifndef fooutilhfoo
|
||||||
#define fooutilhfoo
|
#define fooutilhfoo
|
||||||
|
|
||||||
@@ -22,6 +20,8 @@
|
|||||||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||||
***/
|
***/
|
||||||
|
|
||||||
|
#define _GNU_SOURCE
|
||||||
|
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
@@ -29,6 +29,7 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <sched.h>
|
#include <sched.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
@@ -1,7 +1,4 @@
|
|||||||
#
|
#
|
||||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
||||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
|
||||||
#
|
|
||||||
# Copyright 2013 Red Hat, Inc. All rights reserved.
|
# Copyright 2013 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
|
||||||
|
@@ -34,6 +34,15 @@ OPTIONS
|
|||||||
**-k, --kver** _<kernel version>_::
|
**-k, --kver** _<kernel version>_::
|
||||||
inspect the initramfs of <kernel version>.
|
inspect the initramfs of <kernel version>.
|
||||||
|
|
||||||
|
**--unpack**::
|
||||||
|
unpack the initramfs to the current directory, instead of displaying the contents.
|
||||||
|
|
||||||
|
**--unpackearly**::
|
||||||
|
unpack the early microcode initramfs to the current directory, instead of displaying the contents.
|
||||||
|
|
||||||
|
**-v, --verbose**::
|
||||||
|
unpack verbosely
|
||||||
|
|
||||||
AVAILABILITY
|
AVAILABILITY
|
||||||
------------
|
------------
|
||||||
The lsinitrd command is part of the dracut package and is available from
|
The lsinitrd command is part of the dracut package and is available from
|
||||||
|
113
lsinitrd.sh
113
lsinitrd.sh
@@ -1,6 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
||||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
|
||||||
#
|
#
|
||||||
# Copyright 2005-2010 Harald Hoyer <harald@redhat.com>
|
# Copyright 2005-2010 Harald Hoyer <harald@redhat.com>
|
||||||
# Copyright 2005-2010 Red Hat, Inc. All rights reserved.
|
# Copyright 2005-2010 Red Hat, Inc. All rights reserved.
|
||||||
@@ -27,7 +25,11 @@ usage()
|
|||||||
echo
|
echo
|
||||||
echo "-h, --help print a help message and exit."
|
echo "-h, --help print a help message and exit."
|
||||||
echo "-s, --size sort the contents of the initramfs by size."
|
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 "-f, --file <filename> print the contents of <filename>."
|
||||||
|
echo "--unpack unpack the initramfs, instead of displaying the contents."
|
||||||
|
echo "--unpackearly unpack the early microcode part of the initramfs."
|
||||||
|
echo "-v, --verbose unpack verbosely."
|
||||||
echo "-k, --kver <kernel version> inspect the initramfs of <kernel version>."
|
echo "-k, --kver <kernel version> inspect the initramfs of <kernel version>."
|
||||||
echo
|
echo
|
||||||
} >&2
|
} >&2
|
||||||
@@ -37,15 +39,21 @@ usage()
|
|||||||
[[ $dracutbasedir ]] || dracutbasedir=/usr/lib/dracut
|
[[ $dracutbasedir ]] || dracutbasedir=/usr/lib/dracut
|
||||||
|
|
||||||
sorted=0
|
sorted=0
|
||||||
|
modules=0
|
||||||
|
unset verbose
|
||||||
declare -A filenames
|
declare -A filenames
|
||||||
|
|
||||||
unset POSIXLY_CORRECT
|
unset POSIXLY_CORRECT
|
||||||
TEMP=$(getopt \
|
TEMP=$(getopt \
|
||||||
-o "shf:k:" \
|
-o "vshmf:k:" \
|
||||||
--long kver: \
|
--long kver: \
|
||||||
--long file: \
|
--long file: \
|
||||||
|
--long mod \
|
||||||
--long help \
|
--long help \
|
||||||
--long size \
|
--long size \
|
||||||
|
--long unpack \
|
||||||
|
--long unpackearly \
|
||||||
|
--long verbose \
|
||||||
-- "$@")
|
-- "$@")
|
||||||
|
|
||||||
if (( $? != 0 )); then
|
if (( $? != 0 )); then
|
||||||
@@ -57,12 +65,16 @@ eval set -- "$TEMP"
|
|||||||
|
|
||||||
while (($# > 0)); do
|
while (($# > 0)); do
|
||||||
case $1 in
|
case $1 in
|
||||||
-k|--kver) KERNEL_VERSION="$2"; shift;;
|
-k|--kver) KERNEL_VERSION="$2"; shift;;
|
||||||
-f|--file) filenames[${2#/}]=1; shift;;
|
-f|--file) filenames[${2#/}]=1; shift;;
|
||||||
-s|--size) sorted=1;;
|
-s|--size) sorted=1;;
|
||||||
-h|--help) usage; exit 0;;
|
-h|--help) usage; exit 0;;
|
||||||
--) shift;break;;
|
-m|--mod) modules=1;;
|
||||||
*) usage; exit 1;;
|
-v|--verbose) verbose="--verbose";;
|
||||||
|
--unpack) unpack=1;;
|
||||||
|
--unpackearly) unpackearly=1;;
|
||||||
|
--) shift;break;;
|
||||||
|
*) usage; exit 1;;
|
||||||
esac
|
esac
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
@@ -106,10 +118,16 @@ if ! [[ -f "$image" ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
dracutlibdirs() {
|
||||||
|
for d in lib64/dracut lib/dracut usr/lib64/dracut usr/lib/dracut; do
|
||||||
|
echo "$d/$1"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
extract_files()
|
extract_files()
|
||||||
{
|
{
|
||||||
(( ${#filenames[@]} == 1 )) && nofileinfo=1
|
(( ${#filenames[@]} == 1 )) && nofileinfo=1
|
||||||
for f in ${!filenames[@]}; do
|
for f in "${!filenames[@]}"; do
|
||||||
[[ $nofileinfo ]] || echo "initramfs:/$f"
|
[[ $nofileinfo ]] || echo "initramfs:/$f"
|
||||||
[[ $nofileinfo ]] || echo "========================================================================"
|
[[ $nofileinfo ]] || echo "========================================================================"
|
||||||
$CAT $image | cpio --extract --verbose --quiet --to-stdout $f 2>/dev/null
|
$CAT $image | cpio --extract --verbose --quiet --to-stdout $f 2>/dev/null
|
||||||
@@ -119,6 +137,14 @@ extract_files()
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
list_modules()
|
||||||
|
{
|
||||||
|
echo "dracut modules:"
|
||||||
|
$CAT "$image" | cpio --extract --verbose --quiet --to-stdout -- \
|
||||||
|
$(dracutlibdirs modules.txt) 2>/dev/null
|
||||||
|
((ret+=$?))
|
||||||
|
}
|
||||||
|
|
||||||
list_files()
|
list_files()
|
||||||
{
|
{
|
||||||
echo "========================================================================"
|
echo "========================================================================"
|
||||||
@@ -131,9 +157,15 @@ list_files()
|
|||||||
echo "========================================================================"
|
echo "========================================================================"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unpack_files()
|
||||||
|
{
|
||||||
|
$CAT "$image" | cpio -id --quiet $verbose
|
||||||
|
((ret+=$?))
|
||||||
|
}
|
||||||
|
|
||||||
if (( ${#filenames[@]} <= 0 )); then
|
|
||||||
echo "Image: $image: $(du -h $image | while read a b; do echo $a;done)"
|
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 "========================================================================"
|
echo "========================================================================"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -143,13 +175,19 @@ case $bin in
|
|||||||
CAT="cat --"
|
CAT="cat --"
|
||||||
is_early=$(cpio --extract --verbose --quiet --to-stdout -- 'early_cpio' < "$image" 2>/dev/null)
|
is_early=$(cpio --extract --verbose --quiet --to-stdout -- 'early_cpio' < "$image" 2>/dev/null)
|
||||||
if [[ "$is_early" ]]; then
|
if [[ "$is_early" ]]; then
|
||||||
if (( ${#filenames[@]} > 0 )); then
|
if [[ -n "$unpackearly" ]]; then
|
||||||
|
unpack_files
|
||||||
|
elif (( ${#filenames[@]} > 0 )); then
|
||||||
extract_files
|
extract_files
|
||||||
else
|
else
|
||||||
echo "Early CPIO image"
|
echo "Early CPIO image"
|
||||||
list_files
|
list_files
|
||||||
fi
|
fi
|
||||||
SKIP="$dracutbasedir/skipcpio"
|
if [[ -d "$dracutbasedir/skipcpio" ]]; then
|
||||||
|
SKIP="$dracutbasedir/skipcpio/skipcpio"
|
||||||
|
else
|
||||||
|
SKIP="$dracutbasedir/skipcpio"
|
||||||
|
fi
|
||||||
if ! [[ -x $SKIP ]]; then
|
if ! [[ -x $SKIP ]]; then
|
||||||
echo
|
echo
|
||||||
echo "'$SKIP' not found, cannot display remaining contents!" >&2
|
echo "'$SKIP' not found, cannot display remaining contents!" >&2
|
||||||
@@ -160,24 +198,32 @@ case $bin in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [[ $SKIP ]]; then
|
if [[ $SKIP ]] ; then
|
||||||
read -N 6 bin < <($SKIP "$image")
|
bin="$($SKIP "$image" | { read -N 6 bin && echo "$bin" ; })"
|
||||||
|
else
|
||||||
|
read -N 6 bin < "$image"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case $bin in
|
case $bin in
|
||||||
$'\x1f\x8b'*)
|
$'\x1f\x8b'*)
|
||||||
CAT="zcat --";;
|
CAT="zcat --"
|
||||||
|
;;
|
||||||
BZh*)
|
BZh*)
|
||||||
CAT="bzcat --";;
|
CAT="bzcat --"
|
||||||
|
;;
|
||||||
$'\x71\xc7'*|070701)
|
$'\x71\xc7'*|070701)
|
||||||
CAT="cat --"
|
CAT="cat --"
|
||||||
;;
|
;;
|
||||||
$'\x02\x21'*)
|
$'\x02\x21'*)
|
||||||
CAT="lz4 -d -c";;
|
CAT="lz4 -d -c"
|
||||||
|
;;
|
||||||
|
$'\x89'LZO$'\0'*)
|
||||||
|
CAT="lzop -d -c"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
CAT="xzcat --";
|
|
||||||
if echo "test"|xz|xzcat --single-stream >/dev/null 2>&1; then
|
if echo "test"|xz|xzcat --single-stream >/dev/null 2>&1; then
|
||||||
CAT="xzcat --single-stream --"
|
CAT="xzcat --single-stream --"
|
||||||
|
else
|
||||||
|
CAT="xzcat --"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@@ -194,20 +240,27 @@ fi
|
|||||||
|
|
||||||
ret=0
|
ret=0
|
||||||
|
|
||||||
if (( ${#filenames[@]} > 0 )); then
|
if [[ -n "$unpack" ]]; then
|
||||||
|
unpack_files
|
||||||
|
elif (( ${#filenames[@]} > 0 )); then
|
||||||
extract_files
|
extract_files
|
||||||
else
|
else
|
||||||
version=$($CAT "$image" | cpio --extract --verbose --quiet --to-stdout -- 'lib/dracut/dracut-*' 'usr/lib/dracut/dracut-*' 2>/dev/null)
|
version=$($CAT "$image" | cpio --extract --verbose --quiet --to-stdout -- \
|
||||||
|
$(dracutlibdirs 'dracut-*') 2>/dev/null)
|
||||||
((ret+=$?))
|
((ret+=$?))
|
||||||
echo "Version: $version"
|
echo "Version: $version"
|
||||||
echo
|
echo
|
||||||
echo -n "Arguments: "
|
if [ "$modules" -eq 1 ]; then
|
||||||
$CAT "$image" | cpio --extract --verbose --quiet --to-stdout -- 'lib/dracut/build-parameter.txt' 'usr/lib/dracut/build-parameter.txt' 2>/dev/null
|
list_modules
|
||||||
echo
|
echo "========================================================================"
|
||||||
echo "dracut modules:"
|
else
|
||||||
$CAT "$image" | cpio --extract --verbose --quiet --to-stdout -- 'lib/dracut/modules.txt' 'usr/lib/dracut/modules.txt' 2>/dev/null
|
echo -n "Arguments: "
|
||||||
((ret+=$?))
|
$CAT "$image" | cpio --extract --verbose --quiet --to-stdout -- \
|
||||||
list_files
|
$(dracutlibdirs build-parameter.txt) 2>/dev/null
|
||||||
|
echo
|
||||||
|
list_modules
|
||||||
|
list_files
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit $ret
|
exit $ret
|
||||||
|
@@ -29,8 +29,9 @@ OPTIONS
|
|||||||
|
|
||||||
**-k** _<kernel_list>_::
|
**-k** _<kernel_list>_::
|
||||||
List of kernel images for which initrd files are created (relative
|
List of kernel images for which initrd files are created (relative
|
||||||
to _boot_dir_), defaults to _vmlinux_ on ppc/ppc64, _image_ on s390/s390x
|
to _boot_dir_), Image name should begin with the following string,
|
||||||
and _vmlinuz_ for everything else.
|
defaults to _vmlinux_ on ppc/ppc64, _image_ on s390/s390x and _vmlinuz_
|
||||||
|
for everything else.
|
||||||
|
|
||||||
**-i** _<initrd_list>_::
|
**-i** _<initrd_list>_::
|
||||||
List of file names (relative to _boot_dir_) for the initrd; positions
|
List of file names (relative to _boot_dir_) for the initrd; positions
|
||||||
@@ -76,7 +77,9 @@ OPTIONS
|
|||||||
|
|
||||||
**-A**::
|
**-A**::
|
||||||
Create a so called "monster initrd" which includes all available
|
Create a so called "monster initrd" which includes all available
|
||||||
features and modules.
|
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**::
|
**-v, --verbose**::
|
||||||
increase verbosity level
|
increase verbosity level
|
||||||
@@ -85,9 +88,6 @@ OPTIONS
|
|||||||
Disable logging to _/var/log/YaST2/mkinitrd.log_. This is useful for
|
Disable logging to _/var/log/YaST2/mkinitrd.log_. This is useful for
|
||||||
testing if you don’t want to clutter the system log.
|
testing if you don’t want to clutter the system log.
|
||||||
|
|
||||||
**--force**::
|
|
||||||
overwrite existing initramfs file.
|
|
||||||
|
|
||||||
**--help**::
|
**--help**::
|
||||||
print a help message and exit.
|
print a help message and exit.
|
||||||
|
|
||||||
|
117
mkinitrd-suse.sh
117
mkinitrd-suse.sh
@@ -1,6 +1,4 @@
|
|||||||
#!/bin/bash --norc
|
#!/bin/bash --norc
|
||||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
||||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
|
||||||
#
|
#
|
||||||
# mkinitrd compability wrapper for SUSE.
|
# mkinitrd compability wrapper for SUSE.
|
||||||
#
|
#
|
||||||
@@ -22,8 +20,6 @@
|
|||||||
|
|
||||||
boot_dir="/boot"
|
boot_dir="/boot"
|
||||||
quiet=0
|
quiet=0
|
||||||
host_only=1
|
|
||||||
force=0
|
|
||||||
logfile=/var/log/YaST2/mkinitrd.log
|
logfile=/var/log/YaST2/mkinitrd.log
|
||||||
dracut_cmd=dracut
|
dracut_cmd=dracut
|
||||||
|
|
||||||
@@ -70,10 +66,7 @@ usage () {
|
|||||||
$cmd " -j device Journal device"
|
$cmd " -j device Journal device"
|
||||||
$cmd " -D interface Run dhcp on the specified interface."
|
$cmd " -D interface Run dhcp on the specified interface."
|
||||||
$cmd " -I interface Configure the specified interface statically."
|
$cmd " -I interface Configure the specified interface statically."
|
||||||
$cmd " -a acpi_dsdt Attach compiled ACPI DSDT (Differentiated"
|
$cmd " -a acpi_dsdt Obsolete, do not use."
|
||||||
$cmd " System Description Table) to initrd. This"
|
|
||||||
$cmd " replaces the DSDT of the BIOS. Defaults to"
|
|
||||||
$cmd " the ACPI_DSDT variable in /etc/sysconfig/kernel."
|
|
||||||
$cmd " -s size Add splash animation and bootscreen to initrd."
|
$cmd " -s size Add splash animation and bootscreen to initrd."
|
||||||
|
|
||||||
[[ $1 = '-n' ]] && exit 0
|
[[ $1 = '-n' ]] && exit 0
|
||||||
@@ -111,7 +104,7 @@ calc_netmask() {
|
|||||||
local prefix=$1
|
local prefix=$1
|
||||||
|
|
||||||
[ -z "$prefix" ] && return
|
[ -z "$prefix" ] && return
|
||||||
mask=$(echo "(2 ^ 32) - (2 ^ $prefix)" | bc -l)
|
mask=$(( 0xffffffff << (32 - $prefix) ))
|
||||||
byte1=$(( mask >> 24 ))
|
byte1=$(( mask >> 24 ))
|
||||||
byte2=$(( mask >> 16 ))
|
byte2=$(( mask >> 16 ))
|
||||||
byte3=$(( mask >> 8 ))
|
byte3=$(( mask >> 8 ))
|
||||||
@@ -152,6 +145,33 @@ is_xen_kernel() {
|
|||||||
return
|
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
|
# Taken over from SUSE mkinitrd
|
||||||
default_kernel_images() {
|
default_kernel_images() {
|
||||||
@@ -190,7 +210,8 @@ default_kernel_images() {
|
|||||||
|
|
||||||
[ -L "$boot_dir/$kernel_image" ] && continue
|
[ -L "$boot_dir/$kernel_image" ] && continue
|
||||||
[ "${kernel_image%%.gz}" != "$kernel_image" ] && continue
|
[ "${kernel_image%%.gz}" != "$kernel_image" ] && continue
|
||||||
kernel_version=$(/usr/bin/get_kernel_version \
|
|
||||||
|
kernel_version=$(kernel_version_from_image \
|
||||||
$boot_dir/$kernel_image 2> /dev/null)
|
$boot_dir/$kernel_image 2> /dev/null)
|
||||||
initrd_image=$(echo $kernel_image | sed -e "s|${regex}|initrd|")
|
initrd_image=$(echo $kernel_image | sed -e "s|${regex}|initrd|")
|
||||||
if [ "$kernel_image" != "$initrd_image" -a \
|
if [ "$kernel_image" != "$initrd_image" -a \
|
||||||
@@ -206,8 +227,6 @@ default_kernel_images() {
|
|||||||
for initrd_image in $initrd_images;do
|
for initrd_image in $initrd_images;do
|
||||||
targets="$targets $initrd_image"
|
targets="$targets $initrd_image"
|
||||||
done
|
done
|
||||||
host_only=1
|
|
||||||
force=1
|
|
||||||
}
|
}
|
||||||
|
|
||||||
while (($# > 0)); do
|
while (($# > 0)); do
|
||||||
@@ -218,13 +237,13 @@ while (($# > 0)); do
|
|||||||
-k) # Would be nice to get a list of images here
|
-k) # Would be nice to get a list of images here
|
||||||
read_arg kernel_images "$@" || shift $?
|
read_arg kernel_images "$@" || shift $?
|
||||||
for kernel_image in $kernel_images;do
|
for kernel_image in $kernel_images;do
|
||||||
|
[ -L "/boot/$kernel_image" ] && kernel_image="$(readlink "/boot/$kernel_image")"
|
||||||
kernels="$kernels ${kernel_image#*-}"
|
kernels="$kernels ${kernel_image#*-}"
|
||||||
done
|
done
|
||||||
host_only=1
|
|
||||||
force=1
|
|
||||||
;;
|
;;
|
||||||
-i) read_arg initrd_images "$@" || shift $?
|
-i) read_arg initrd_images "$@" || shift $?
|
||||||
for initrd_image in $initrd_images;do
|
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.
|
# Check if the initrd_image contains a path.
|
||||||
# if not, then add the default boot_dir
|
# if not, then add the default boot_dir
|
||||||
dname=`dirname $initrd_image`
|
dname=`dirname $initrd_image`
|
||||||
@@ -263,7 +282,7 @@ while (($# > 0)); do
|
|||||||
dracut_cmdline="${dracut_cmdline} ip=$(ipconfig $static_if)":
|
dracut_cmdline="${dracut_cmdline} ip=$(ipconfig $static_if)":
|
||||||
;;
|
;;
|
||||||
-a) read_arg acpi_dsdt "$@" || shift $?
|
-a) read_arg acpi_dsdt "$@" || shift $?
|
||||||
echo "mkinitrd: custom DSDT not yet supported"
|
echo "Obsolete -a param, use acpi_table_dir= and acpi_override= variables in /etc/dracut.conf.d/"
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
-s) read_arg boot_splash "$@" || shift $?
|
-s) read_arg boot_splash "$@" || shift $?
|
||||||
@@ -277,7 +296,6 @@ while (($# > 0)); do
|
|||||||
--version|-R)
|
--version|-R)
|
||||||
echo "mkinitrd: dracut compatibility wrapper"
|
echo "mkinitrd: dracut compatibility wrapper"
|
||||||
exit 0;;
|
exit 0;;
|
||||||
--force) force=1;;
|
|
||||||
--quiet|-q) quiet=1;;
|
--quiet|-q) quiet=1;;
|
||||||
*) if [[ ! $targets ]]; then
|
*) if [[ ! $targets ]]; then
|
||||||
targets=$1
|
targets=$1
|
||||||
@@ -291,15 +309,18 @@ while (($# > 0)); do
|
|||||||
done
|
done
|
||||||
|
|
||||||
[[ $targets && $kernels ]] || default_kernel_images
|
[[ $targets && $kernels ]] || default_kernel_images
|
||||||
[[ $targets && $kernels ]] || (error "No kernel found in $boot_dir" && usage)
|
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
|
# We can have several targets/kernels, transform the list to an array
|
||||||
targets=( $targets )
|
targets=( $targets )
|
||||||
[[ $kernels ]] && kernels=( $kernels )
|
[[ $kernels ]] && kernels=( $kernels )
|
||||||
|
|
||||||
[[ $logfile ]] && dracut_args="${dracut_args} --logfile $logfile"
|
[[ $logfile ]] && dracut_args="${dracut_args} --logfile $logfile"
|
||||||
[[ $host_only == 1 ]] && dracut_args="${dracut_args} --hostonly"
|
dracut_args="${dracut_args} --force"
|
||||||
[[ $force == 1 ]] && dracut_args="${dracut_args} --force"
|
|
||||||
[[ $dracut_cmdline ]] && dracut_args="${dracut_args} --kernel-cmdline ${dracut_cmdline}"
|
[[ $dracut_cmdline ]] && dracut_args="${dracut_args} --kernel-cmdline ${dracut_cmdline}"
|
||||||
[ -z "$(type -p update-bootloader)" ] && skip_update_bootloader=1
|
[ -z "$(type -p update-bootloader)" ] && skip_update_bootloader=1
|
||||||
|
|
||||||
@@ -308,11 +329,11 @@ if [ -f /etc/sysconfig/kernel ] ; then
|
|||||||
. /etc/sysconfig/kernel
|
. /etc/sysconfig/kernel
|
||||||
fi
|
fi
|
||||||
[[ $module_list ]] || module_list="${INITRD_MODULES}"
|
[[ $module_list ]] || module_list="${INITRD_MODULES}"
|
||||||
basicmodules="$basicmodules ${module_list}"
|
|
||||||
[[ $domu_module_list ]] || domu_module_list="${DOMU_INITRD_MODULES}"
|
[[ $domu_module_list ]] || domu_module_list="${DOMU_INITRD_MODULES}"
|
||||||
[[ $acpi_dsdt ]] || acpi_dsdt="${ACPI_DSDT}"
|
shopt -s extglob
|
||||||
|
|
||||||
|
failed=""
|
||||||
|
|
||||||
echo "Creating: target|kernel|dracut args|basicmodules "
|
|
||||||
for ((i=0 ; $i<${#targets[@]} ; i++)); do
|
for ((i=0 ; $i<${#targets[@]} ; i++)); do
|
||||||
|
|
||||||
if [[ $img_vers ]];then
|
if [[ $img_vers ]];then
|
||||||
@@ -322,28 +343,38 @@ for ((i=0 ; $i<${#targets[@]} ; i++)); do
|
|||||||
fi
|
fi
|
||||||
kernel="${kernels[$i]}"
|
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
|
# Duplicate code: No way found how to redirect output based on $quiet
|
||||||
if [[ $quiet == 1 ]];then
|
if [[ $quiet == 1 ]];then
|
||||||
echo "$target|$kernel|$dracut_args|$basicmodules"
|
# Duplicate code: --force-drivers must not be called with empty string
|
||||||
if is_xen_kernel $kernel $rootfs ; then
|
# -> dracut bug workarounded ugly, because of complex whitespace
|
||||||
basicmodules="$basicmodules ${domu_module_list}"
|
# expansion magics
|
||||||
fi
|
if [ -n "${modules_all}" ];then
|
||||||
if [[ $basicmodules ]]; then
|
$dracut_cmd $dracut_args --force-drivers "${modules_all}" "$target" "$kernel" &>/dev/null
|
||||||
$dracut_cmd $dracut_args --add-drivers "$basicmodules" "$target" \
|
[ $? -ne 0 ] && failed="$failed $target"
|
||||||
"$kernel" &>/dev/null
|
else
|
||||||
else
|
|
||||||
$dracut_cmd $dracut_args "$target" "$kernel" &>/dev/null
|
$dracut_cmd $dracut_args "$target" "$kernel" &>/dev/null
|
||||||
fi
|
[ $? -ne 0 ] && failed="$failed $target"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
if is_xen_kernel $kernel $rootfs ; then
|
if [ -n "${modules_all}" ];then
|
||||||
basicmodules="$basicmodules ${domu_module_list}"
|
$dracut_cmd $dracut_args --force-drivers "${modules_all}" "$target" "$kernel"
|
||||||
fi
|
[ $? -ne 0 ] && failed="$failed $target"
|
||||||
if [[ $basicmodules ]]; then
|
else
|
||||||
$dracut_cmd $dracut_args --add-drivers "$basicmodules" "$target" \
|
|
||||||
"$kernel"
|
|
||||||
else
|
|
||||||
$dracut_cmd $dracut_args "$target" "$kernel"
|
$dracut_cmd $dracut_args "$target" "$kernel"
|
||||||
fi
|
[ $? -ne 0 ] && failed="$failed $target"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -351,4 +382,12 @@ if [ "$skip_update_bootloader" ] ; then
|
|||||||
echo 2>&1 "Did not refresh the bootloader. You might need to refresh it manually."
|
echo 2>&1 "Did not refresh the bootloader. You might need to refresh it manually."
|
||||||
else
|
else
|
||||||
update-bootloader --refresh
|
update-bootloader --refresh
|
||||||
|
[ $? -ne 0 ] && echo "Updating bootloader failed" && exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$failed" != "" ]; then
|
||||||
|
echo "Generating $failed targets failed"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
@@ -1,6 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/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
|
# called by dracut
|
||||||
check() {
|
check() {
|
||||||
|
@@ -1,6 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/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
|
# called by dracut
|
||||||
check() {
|
check() {
|
||||||
|
@@ -1,6 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/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
|
# called by dracut
|
||||||
check() {
|
check() {
|
||||||
|
@@ -1,6 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/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
|
# called by dracut
|
||||||
check() {
|
check() {
|
||||||
|
@@ -1,6 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/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
|
# called by dracut
|
||||||
check() {
|
check() {
|
||||||
@@ -20,7 +18,8 @@ depends() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
installkernel() {
|
installkernel() {
|
||||||
instmods autofs4 ipv6
|
hostonly='' instmods autofs4 ipv6
|
||||||
|
instmods -s efivarfs
|
||||||
}
|
}
|
||||||
|
|
||||||
# called by dracut
|
# called by dracut
|
||||||
@@ -44,6 +43,7 @@ install() {
|
|||||||
$systemdutildir/systemd-modules-load \
|
$systemdutildir/systemd-modules-load \
|
||||||
$systemdutildir/systemd-vconsole-setup \
|
$systemdutildir/systemd-vconsole-setup \
|
||||||
$systemdutildir/system-generators/systemd-fstab-generator \
|
$systemdutildir/system-generators/systemd-fstab-generator \
|
||||||
|
$systemdutildir/system-generators/systemd-gpt-auto-generator \
|
||||||
\
|
\
|
||||||
$systemdsystemunitdir/cryptsetup.target \
|
$systemdsystemunitdir/cryptsetup.target \
|
||||||
$systemdsystemunitdir/emergency.target \
|
$systemdsystemunitdir/emergency.target \
|
||||||
@@ -51,14 +51,14 @@ install() {
|
|||||||
$systemdsystemunitdir/basic.target \
|
$systemdsystemunitdir/basic.target \
|
||||||
$systemdsystemunitdir/halt.target \
|
$systemdsystemunitdir/halt.target \
|
||||||
$systemdsystemunitdir/kexec.target \
|
$systemdsystemunitdir/kexec.target \
|
||||||
$systemdsystemunitdir/initrd.target \
|
|
||||||
$systemdsystemunitdir/initrd-fs.target \
|
|
||||||
$systemdsystemunitdir/initrd-root-fs.target \
|
|
||||||
$systemdsystemunitdir/local-fs.target \
|
$systemdsystemunitdir/local-fs.target \
|
||||||
$systemdsystemunitdir/local-fs-pre.target \
|
$systemdsystemunitdir/local-fs-pre.target \
|
||||||
$systemdsystemunitdir/remote-fs.target \
|
$systemdsystemunitdir/remote-fs.target \
|
||||||
$systemdsystemunitdir/remote-fs-pre.target \
|
$systemdsystemunitdir/remote-fs-pre.target \
|
||||||
|
$systemdsystemunitdir/multi-user.target \
|
||||||
$systemdsystemunitdir/network.target \
|
$systemdsystemunitdir/network.target \
|
||||||
|
$systemdsystemunitdir/network-pre.target \
|
||||||
|
$systemdsystemunitdir/network-online.target \
|
||||||
$systemdsystemunitdir/nss-lookup.target \
|
$systemdsystemunitdir/nss-lookup.target \
|
||||||
$systemdsystemunitdir/nss-user-lookup.target \
|
$systemdsystemunitdir/nss-user-lookup.target \
|
||||||
$systemdsystemunitdir/poweroff.target \
|
$systemdsystemunitdir/poweroff.target \
|
||||||
@@ -77,12 +77,14 @@ install() {
|
|||||||
$systemdsystemunitdir/sys-kernel-config.mount \
|
$systemdsystemunitdir/sys-kernel-config.mount \
|
||||||
\
|
\
|
||||||
$systemdsystemunitdir/kmod-static-nodes.service \
|
$systemdsystemunitdir/kmod-static-nodes.service \
|
||||||
|
$systemdsystemunitdir/systemd-tmpfiles-setup.service \
|
||||||
$systemdsystemunitdir/systemd-tmpfiles-setup-dev.service \
|
$systemdsystemunitdir/systemd-tmpfiles-setup-dev.service \
|
||||||
$systemdsystemunitdir/systemd-ask-password-console.path \
|
$systemdsystemunitdir/systemd-ask-password-console.path \
|
||||||
$systemdsystemunitdir/systemd-udevd-control.socket \
|
$systemdsystemunitdir/systemd-udevd-control.socket \
|
||||||
$systemdsystemunitdir/systemd-udevd-kernel.socket \
|
$systemdsystemunitdir/systemd-udevd-kernel.socket \
|
||||||
$systemdsystemunitdir/systemd-ask-password-plymouth.path \
|
$systemdsystemunitdir/systemd-ask-password-plymouth.path \
|
||||||
$systemdsystemunitdir/systemd-journald.socket \
|
$systemdsystemunitdir/systemd-journald.socket \
|
||||||
|
$systemdsystemunitdir/systemd-journald-audit.socket \
|
||||||
$systemdsystemunitdir/systemd-ask-password-console.service \
|
$systemdsystemunitdir/systemd-ask-password-console.service \
|
||||||
$systemdsystemunitdir/systemd-modules-load.service \
|
$systemdsystemunitdir/systemd-modules-load.service \
|
||||||
$systemdsystemunitdir/systemd-halt.service \
|
$systemdsystemunitdir/systemd-halt.service \
|
||||||
@@ -97,6 +99,7 @@ install() {
|
|||||||
$systemdsystemunitdir/systemd-journald.service \
|
$systemdsystemunitdir/systemd-journald.service \
|
||||||
$systemdsystemunitdir/systemd-vconsole-setup.service \
|
$systemdsystemunitdir/systemd-vconsole-setup.service \
|
||||||
$systemdsystemunitdir/systemd-random-seed-load.service \
|
$systemdsystemunitdir/systemd-random-seed-load.service \
|
||||||
|
$systemdsystemunitdir/systemd-random-seed.service \
|
||||||
$systemdsystemunitdir/systemd-sysctl.service \
|
$systemdsystemunitdir/systemd-sysctl.service \
|
||||||
\
|
\
|
||||||
$systemdsystemunitdir/sysinit.target.wants/systemd-modules-load.service \
|
$systemdsystemunitdir/sysinit.target.wants/systemd-modules-load.service \
|
||||||
@@ -105,24 +108,34 @@ install() {
|
|||||||
$systemdsystemunitdir/sockets.target.wants/systemd-udevd-control.socket \
|
$systemdsystemunitdir/sockets.target.wants/systemd-udevd-control.socket \
|
||||||
$systemdsystemunitdir/sockets.target.wants/systemd-udevd-kernel.socket \
|
$systemdsystemunitdir/sockets.target.wants/systemd-udevd-kernel.socket \
|
||||||
$systemdsystemunitdir/sockets.target.wants/systemd-journald.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-udevd.service \
|
||||||
$systemdsystemunitdir/sysinit.target.wants/systemd-udev-trigger.service \
|
$systemdsystemunitdir/sysinit.target.wants/systemd-udev-trigger.service \
|
||||||
$systemdsystemunitdir/sysinit.target.wants/kmod-static-nodes.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-tmpfiles-setup-dev.service \
|
||||||
$systemdsystemunitdir/sysinit.target.wants/systemd-sysctl.service \
|
$systemdsystemunitdir/sysinit.target.wants/systemd-sysctl.service \
|
||||||
\
|
\
|
||||||
$systemdsystemunitdir/ctrl-alt-del.target \
|
$systemdsystemunitdir/ctrl-alt-del.target \
|
||||||
|
$systemdsystemunitdir/reboot.target \
|
||||||
|
$systemdsystemunitdir/systemd-reboot.service \
|
||||||
$systemdsystemunitdir/syslog.socket \
|
$systemdsystemunitdir/syslog.socket \
|
||||||
$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 \
|
|
||||||
\
|
\
|
||||||
$systemdsystemunitdir/slices.target \
|
$systemdsystemunitdir/slices.target \
|
||||||
$systemdsystemunitdir/system.slice \
|
$systemdsystemunitdir/system.slice \
|
||||||
|
$systemdsystemunitdir/-.slice \
|
||||||
\
|
\
|
||||||
journalctl systemctl echo swapoff systemd-cgls systemd-tmpfiles
|
$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 \
|
inst_multiple -o \
|
||||||
/usr/lib/modules-load.d/*.conf \
|
/usr/lib/modules-load.d/*.conf \
|
||||||
@@ -132,7 +145,7 @@ install() {
|
|||||||
local _line i
|
local _line i
|
||||||
for i in "$1"/*.conf; do
|
for i in "$1"/*.conf; do
|
||||||
[[ -f $i ]] || continue
|
[[ -f $i ]] || continue
|
||||||
while read _line; do
|
while read _line || [ -n "$_line" ]; do
|
||||||
case $_line in
|
case $_line in
|
||||||
\#*)
|
\#*)
|
||||||
;;
|
;;
|
||||||
@@ -149,16 +162,21 @@ install() {
|
|||||||
[[ $_mods ]] && instmods $_mods
|
[[ $_mods ]] && instmods $_mods
|
||||||
|
|
||||||
if [[ $hostonly ]]; then
|
if [[ $hostonly ]]; then
|
||||||
inst_multiple -o \
|
inst_multiple -H -o \
|
||||||
/etc/systemd/journald.conf \
|
/etc/systemd/journald.conf \
|
||||||
|
/etc/systemd/journald.conf.d/*.conf \
|
||||||
/etc/systemd/system.conf \
|
/etc/systemd/system.conf \
|
||||||
|
/etc/systemd/system.conf.d/*.conf \
|
||||||
/etc/hostname \
|
/etc/hostname \
|
||||||
/etc/machine-id \
|
/etc/machine-id \
|
||||||
|
/etc/machine-info \
|
||||||
/etc/vconsole.conf \
|
/etc/vconsole.conf \
|
||||||
/etc/locale.conf \
|
/etc/locale.conf \
|
||||||
/etc/modules-load.d/*.conf \
|
/etc/modules-load.d/*.conf \
|
||||||
/etc/sysctl.d/*.conf \
|
/etc/sysctl.d/*.conf \
|
||||||
/etc/sysctl.conf
|
/etc/sysctl.conf \
|
||||||
|
/etc/udev/udev.conf \
|
||||||
|
${NULL}
|
||||||
|
|
||||||
_mods=$(modules_load_get /etc/modules-load.d)
|
_mods=$(modules_load_get /etc/modules-load.d)
|
||||||
[[ $_mods ]] && instmods $_mods
|
[[ $_mods ]] && instmods $_mods
|
||||||
@@ -170,38 +188,35 @@ install() {
|
|||||||
|
|
||||||
# install adm user/group for journald
|
# install adm user/group for journald
|
||||||
inst_multiple nologin
|
inst_multiple nologin
|
||||||
egrep '^systemd-journal:' "$initdir/etc/passwd" 2>/dev/null >> "$initdir/etc/passwd"
|
grep '^systemd-journal:' /etc/passwd 2>/dev/null >> "$initdir/etc/passwd"
|
||||||
egrep '^systemd-journal:' /etc/group >> "$initdir/etc/group"
|
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 "/init"
|
||||||
ln_r $systemdutildir/systemd "/sbin/init"
|
ln_r $systemdutildir/systemd "/sbin/init"
|
||||||
|
|
||||||
inst_script "$moddir/dracut-emergency.sh" /bin/dracut-emergency
|
|
||||||
inst_simple "$moddir/emergency.service" ${systemdsystemunitdir}/emergency.service
|
|
||||||
inst_simple "$moddir/dracut-emergency.service" ${systemdsystemunitdir}/dracut-emergency.service
|
|
||||||
inst_simple "$moddir/emergency.service" ${systemdsystemunitdir}/rescue.service
|
|
||||||
|
|
||||||
ln_r "${systemdsystemunitdir}/initrd.target" "${systemdsystemunitdir}/default.target"
|
|
||||||
|
|
||||||
inst_script "$moddir/dracut-cmdline.sh" /bin/dracut-cmdline
|
|
||||||
inst_script "$moddir/dracut-pre-udev.sh" /bin/dracut-pre-udev
|
|
||||||
inst_script "$moddir/dracut-pre-trigger.sh" /bin/dracut-pre-trigger
|
|
||||||
inst_script "$moddir/dracut-initqueue.sh" /bin/dracut-initqueue
|
|
||||||
inst_script "$moddir/dracut-pre-mount.sh" /bin/dracut-pre-mount
|
|
||||||
inst_script "$moddir/dracut-mount.sh" /bin/dracut-mount
|
|
||||||
inst_script "$moddir/dracut-pre-pivot.sh" /bin/dracut-pre-pivot
|
|
||||||
|
|
||||||
inst_script "$moddir/rootfs-generator.sh" /lib/systemd/system-generators/dracut-rootfs-generator
|
|
||||||
|
|
||||||
inst_binary true
|
inst_binary true
|
||||||
ln_r $(type -P true) "/usr/bin/loginctl"
|
ln_r $(type -P true) "/usr/bin/loginctl"
|
||||||
ln_r $(type -P true) "/bin/loginctl"
|
ln_r $(type -P true) "/bin/loginctl"
|
||||||
inst_rules 70-uaccess.rules 71-seat.rules 73-seat-late.rules 99-systemd.rules
|
inst_rules \
|
||||||
|
70-uaccess.rules \
|
||||||
|
71-seat.rules \
|
||||||
|
73-seat-late.rules \
|
||||||
|
90-vconsole.rules \
|
||||||
|
99-systemd.rules \
|
||||||
|
${NULL}
|
||||||
|
|
||||||
for i in \
|
for i in \
|
||||||
emergency.target \
|
emergency.target \
|
||||||
dracut-emergency.service \
|
rescue.target \
|
||||||
rescue.service \
|
|
||||||
systemd-ask-password-console.service \
|
systemd-ask-password-console.service \
|
||||||
systemd-ask-password-plymouth.service \
|
systemd-ask-password-plymouth.service \
|
||||||
; do
|
; do
|
||||||
@@ -210,27 +225,15 @@ install() {
|
|||||||
"${systemdsystemunitdir}/${i}.wants/systemd-vconsole-setup.service"
|
"${systemdsystemunitdir}/${i}.wants/systemd-vconsole-setup.service"
|
||||||
done
|
done
|
||||||
|
|
||||||
mkdir -p "${initdir}/$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
|
|
||||||
inst_simple "$moddir/${i}" "$systemdsystemunitdir/${i}"
|
|
||||||
ln_r "$systemdsystemunitdir/${i}" "$systemdsystemunitdir/initrd.target.wants/${i}"
|
|
||||||
done
|
|
||||||
|
|
||||||
mkdir -p "$initdir/etc/systemd"
|
mkdir -p "$initdir/etc/systemd"
|
||||||
# turn off RateLimit for journal
|
# We must use a volatile journal, and we don't want rate-limiting
|
||||||
{
|
{
|
||||||
echo "[Journal]"
|
echo "[Journal]"
|
||||||
|
echo "Storage=volatile"
|
||||||
echo "RateLimitInterval=0"
|
echo "RateLimitInterval=0"
|
||||||
echo "RateLimitBurst=0"
|
echo "RateLimitBurst=0"
|
||||||
} >> "$initdir/etc/systemd/journald.conf"
|
} >> "$initdir/etc/systemd/journald.conf"
|
||||||
|
|
||||||
|
ln_r "${systemdsystemunitdir}/multi-user.target" "${systemdsystemunitdir}/default.target"
|
||||||
}
|
}
|
||||||
|
|
@@ -1,6 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
||||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
|
||||||
|
|
||||||
if ! fipsmode=$(getarg fips) || [ $fipsmode = "0" ]; then
|
if ! fipsmode=$(getarg fips) || [ $fipsmode = "0" ]; then
|
||||||
rm -f -- /etc/modprobe.d/fips.conf >/dev/null 2>&1
|
rm -f -- /etc/modprobe.d/fips.conf >/dev/null 2>&1
|
||||||
|
@@ -1,6 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
||||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
|
||||||
|
|
||||||
if ! fipsmode=$(getarg fips) || [ $fipsmode = "0" ]; then
|
if ! fipsmode=$(getarg fips) || [ $fipsmode = "0" ]; then
|
||||||
rm -f -- /etc/modprobe.d/fips.conf >/dev/null 2>&1
|
rm -f -- /etc/modprobe.d/fips.conf >/dev/null 2>&1
|
||||||
|
@@ -1,6 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
||||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
|
||||||
|
|
||||||
mount_boot()
|
mount_boot()
|
||||||
{
|
{
|
||||||
@@ -61,8 +59,8 @@ do_rhevh_check()
|
|||||||
kpath=${1}
|
kpath=${1}
|
||||||
|
|
||||||
# If we're on RHEV-H, the kernel is in /run/initramfs/live/vmlinuz0
|
# 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; do printf "%s\n" $a; done)
|
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; do printf "%s\n" $a; done || return 1)
|
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
|
if [ -z "$HMAC_SUM_ORIG" ] || [ -z "$HMAC_SUM_CALC" ] || [ "${HMAC_SUM_ORIG}" != "${HMAC_SUM_CALC}" ]; then
|
||||||
warn "HMAC sum mismatch"
|
warn "HMAC sum mismatch"
|
||||||
return 1
|
return 1
|
||||||
@@ -80,11 +78,6 @@ do_fips()
|
|||||||
|
|
||||||
KERNEL=$(uname -r)
|
KERNEL=$(uname -r)
|
||||||
|
|
||||||
if ! [ -e "/boot/.vmlinuz-${KERNEL}.hmac" ]; then
|
|
||||||
warn "/boot/.vmlinuz-${KERNEL}.hmac does not exist"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
FIPSMODULES=$(cat /etc/fipsmodules)
|
FIPSMODULES=$(cat /etc/fipsmodules)
|
||||||
|
|
||||||
info "Loading and integrity checking all crypto modules"
|
info "Loading and integrity checking all crypto modules"
|
||||||
@@ -94,7 +87,7 @@ do_fips()
|
|||||||
if ! modprobe "${_module}"; then
|
if ! modprobe "${_module}"; then
|
||||||
# check if kernel provides generic algo
|
# check if kernel provides generic algo
|
||||||
_found=0
|
_found=0
|
||||||
while read _k _s _v; do
|
while read _k _s _v || [ -n "$_k" ]; do
|
||||||
[ "$_k" != "name" -a "$_k" != "driver" ] && continue
|
[ "$_k" != "name" -a "$_k" != "driver" ] && continue
|
||||||
[ "$_v" != "$_module" ] && continue
|
[ "$_v" != "$_module" ] && continue
|
||||||
_found=1
|
_found=1
|
||||||
@@ -116,7 +109,14 @@ do_fips()
|
|||||||
elif [ -e "/run/initramfs/live/isolinux/vmlinuz0" ]; then
|
elif [ -e "/run/initramfs/live/isolinux/vmlinuz0" ]; then
|
||||||
do_rhevh_check /run/initramfs/live/isolinux/vmlinuz0 || return 1
|
do_rhevh_check /run/initramfs/live/isolinux/vmlinuz0 || return 1
|
||||||
else
|
else
|
||||||
sha512hmac -c "/boot/.vmlinuz-${KERNEL}.hmac" || return 1
|
BOOT_IMAGE="$(getarg BOOT_IMAGE)"
|
||||||
|
[ -e "/boot/.${BOOT_IMAGE}.hmac" ] || BOOT_IMAGE="vmlinuz-${KERNEL}"
|
||||||
|
|
||||||
|
if ! [ -e "/boot/.${BOOT_IMAGE}.hmac" ]; then
|
||||||
|
warn "/boot/.${BOOT_IMAGE}.hmac does not exist"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
sha512hmac -c "/boot/.${BOOT_IMAGE}.hmac" || return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
info "All initrd crypto checks done"
|
info "All initrd crypto checks done"
|
||||||
|
@@ -1,6 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/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
|
# called by dracut
|
||||||
check() {
|
check() {
|
||||||
@@ -15,11 +13,16 @@ depends() {
|
|||||||
# called by dracut
|
# called by dracut
|
||||||
installkernel() {
|
installkernel() {
|
||||||
local _fipsmodules _mod
|
local _fipsmodules _mod
|
||||||
_fipsmodules="aead aes_generic aes-x86_64 ansi_cprng arc4 blowfish camellia cast6 cbc ccm "
|
if [[ -f "${srcmods}/modules.fips" ]]; then
|
||||||
_fipsmodules+="chainiv crc32c crct10dif_generic cryptomgr crypto_null ctr cts deflate des des3_ede dm-crypt dm-mod "
|
_fipsmodules="$(cat "${srcmods}/modules.fips")"
|
||||||
_fipsmodules+="ecb eseqiv fcrypt gcm ghash_generic hmac khazad lzo md4 md5 michael_mic rmd128 "
|
else
|
||||||
_fipsmodules+="rmd160 rmd256 rmd320 rot13 salsa20 seed seqiv serpent sha1 sha224 sha256 sha256_generic "
|
_fipsmodules="aead aes_generic aes-x86_64 ansi_cprng arc4 authenc authencesn blowfish camellia cast6 cbc ccm "
|
||||||
_fipsmodules+="sha384 sha512 sha512_generic tcrypt tea tnepres twofish wp256 wp384 wp512 xeta xtea xts zlib"
|
_fipsmodules+="chainiv crc32c crct10dif_generic cryptomgr crypto_null ctr cts deflate des des3_ede dm-crypt dm-mod drbg "
|
||||||
|
_fipsmodules+="ecb eseqiv fcrypt gcm ghash_generic hmac khazad lzo md4 md5 michael_mic rmd128 "
|
||||||
|
_fipsmodules+="rmd160 rmd256 rmd320 rot13 salsa20 seed seqiv serpent sha1 sha224 sha256 sha256_generic "
|
||||||
|
_fipsmodules+="sha384 sha512 sha512_generic tcrypt tea tnepres twofish wp256 wp384 wp512 xeta xtea xts zlib "
|
||||||
|
_fipsmodules+="aes_s390 des_s390 prng sha256_s390 sha_common des_check_key ghash_s390 sha1_s390 sha512_s390 cmac authenc "
|
||||||
|
fi
|
||||||
|
|
||||||
mkdir -m 0755 -p "${initdir}/etc/modprobe.d"
|
mkdir -m 0755 -p "${initdir}/etc/modprobe.d"
|
||||||
|
|
||||||
@@ -42,9 +45,21 @@ install() {
|
|||||||
|
|
||||||
inst_libdir_file libsoftokn3.so libsoftokn3.so \
|
inst_libdir_file libsoftokn3.so libsoftokn3.so \
|
||||||
libsoftokn3.chk libfreebl3.so libfreebl3.chk \
|
libsoftokn3.chk libfreebl3.so libfreebl3.chk \
|
||||||
libssl.so 'hmaccalc/sha512hmac.hmac' libssl.so.10
|
libssl.so 'hmaccalc/sha512hmac.hmac' libssl.so.10 \
|
||||||
|
libfreeblpriv3.so libfreeblpriv3.chk
|
||||||
|
|
||||||
inst_multiple -o prelink
|
inst_multiple -o prelink
|
||||||
inst_simple /etc/system-fips
|
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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
69
modules.d/01systemd-initrd/module-setup.sh
Executable file
69
modules.d/01systemd-initrd/module-setup.sh
Executable file
@@ -0,0 +1,69 @@
|
|||||||
|
#!/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"
|
||||||
|
|
||||||
|
if [ -e /etc/os-release ]; then
|
||||||
|
. /etc/os-release
|
||||||
|
VERSION+=" "
|
||||||
|
PRETTY_NAME+=" "
|
||||||
|
else
|
||||||
|
VERSION=""
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
@@ -1,12 +1,10 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
||||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
|
||||||
|
|
||||||
capsmode=$(getarg rd.caps)
|
capsmode=$(getarg rd.caps)
|
||||||
|
|
||||||
if [ "$capsmode" = "1" ]; then
|
if [ "$capsmode" = "1" ]; then
|
||||||
CAPS_INIT_DROP=$(getarg rd.caps.initdrop=)
|
CAPS_INIT_DROP=$(getarg rd.caps.initdrop=)
|
||||||
CAPS_USERMODEHELPER_BSET=$(capsh --drop="$CAPS_INIT_DROP" -- -c 'while read a b ; do [ "$a" = "CapBnd:" ] && echo $((0x${b:$((${#b}-8)):8})) $((0x${b:$((${#b}-16)):8})) && break; done < /proc/self/status')
|
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_MODULES_DISABLED=$(getarg rd.caps.disablemodules=)
|
||||||
CAPS_KEXEC_DISABLED=$(getarg rd.caps.disablekexec=)
|
CAPS_KEXEC_DISABLED=$(getarg rd.caps.disablekexec=)
|
||||||
|
|
||||||
|
@@ -1,10 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/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
|
# called by dracut
|
||||||
check() {
|
check() {
|
||||||
require_binaries capsh
|
require_binaries capsh
|
||||||
|
return 255
|
||||||
}
|
}
|
||||||
|
|
||||||
# called by dracut
|
# called by dracut
|
||||||
|
@@ -1,6 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/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
|
# called by dracut
|
||||||
check() {
|
check() {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
@@ -1,6 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
||||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
|
||||||
#
|
#
|
||||||
# Licensed under the GPLv2
|
# Licensed under the GPLv2
|
||||||
#
|
#
|
||||||
|
@@ -1,6 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
||||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
|
||||||
#
|
#
|
||||||
# Licensed under the GPLv2
|
# Licensed under the GPLv2
|
||||||
#
|
#
|
||||||
@@ -29,7 +27,7 @@ depends() {
|
|||||||
# called by dracut
|
# called by dracut
|
||||||
install() {
|
install() {
|
||||||
inst_dir /lib/modules/keys
|
inst_dir /lib/modules/keys
|
||||||
inst_binary /usr/bin/keyctl
|
inst_binary keyctl
|
||||||
|
|
||||||
inst_hook pre-trigger 01 "$moddir/load-modsign-keys.sh"
|
inst_hook pre-trigger 01 "$moddir/load-modsign-keys.sh"
|
||||||
|
|
||||||
|
@@ -1,6 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/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
|
# called by dracut
|
||||||
check() {
|
check() {
|
||||||
@@ -17,6 +15,6 @@ depends() {
|
|||||||
install() {
|
install() {
|
||||||
inst_multiple -o ps grep more cat rm strace free showmount \
|
inst_multiple -o ps grep more cat rm strace free showmount \
|
||||||
ping netstat rpcinfo vi scp ping6 ssh \
|
ping netstat rpcinfo vi scp ping6 ssh \
|
||||||
fsck fsck.ext2 fsck.ext4 fsck.ext3 fsck.ext4dev fsck.vfat e2fsck
|
fsck fsck.ext2 fsck.ext4 fsck.ext3 fsck.ext4dev fsck.f2fs fsck.vfat e2fsck
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,6 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/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
|
# called by dracut
|
||||||
check() {
|
check() {
|
||||||
@@ -14,18 +12,68 @@ depends() {
|
|||||||
|
|
||||||
# called by dracut
|
# called by dracut
|
||||||
install() {
|
install() {
|
||||||
inst_hook cmdline 00 "$moddir/watchdog.sh"
|
# Do not add watchdog hooks if systemd module is included
|
||||||
inst_hook cmdline 50 "$moddir/watchdog.sh"
|
# In that case, systemd will manage watchdog kick
|
||||||
inst_hook pre-trigger 00 "$moddir/watchdog.sh"
|
if ! dracut_module_included "systemd"; then
|
||||||
inst_hook initqueue 00 "$moddir/watchdog.sh"
|
inst_hook cmdline 00 "$moddir/watchdog.sh"
|
||||||
inst_hook mount 00 "$moddir/watchdog.sh"
|
inst_hook cmdline 50 "$moddir/watchdog.sh"
|
||||||
inst_hook mount 50 "$moddir/watchdog.sh"
|
inst_hook pre-trigger 00 "$moddir/watchdog.sh"
|
||||||
inst_hook mount 99 "$moddir/watchdog.sh"
|
inst_hook initqueue 00 "$moddir/watchdog.sh"
|
||||||
inst_hook pre-pivot 00 "$moddir/watchdog.sh"
|
inst_hook mount 00 "$moddir/watchdog.sh"
|
||||||
inst_hook pre-pivot 99 "$moddir/watchdog.sh"
|
inst_hook mount 50 "$moddir/watchdog.sh"
|
||||||
inst_hook cleanup 00 "$moddir/watchdog.sh"
|
inst_hook mount 99 "$moddir/watchdog.sh"
|
||||||
inst_hook cleanup 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_hook emergency 02 "$moddir/watchdog-stop.sh"
|
||||||
inst_multiple -o wdctl
|
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
|
||||||
|
}
|
||||||
|
@@ -1,2 +1,2 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
[ -c /dev/watchdog ] && echo -n 'V' > /dev/watchdog
|
[ -c /dev/watchdog ] && printf 'V' > /dev/watchdog
|
||||||
|
@@ -1,6 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/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
|
# called by dracut
|
||||||
check() {
|
check() {
|
||||||
|
@@ -1,6 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
||||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
|
||||||
|
|
||||||
[ -n "$DRACUT_SYSTEMD" ] && exit 0
|
[ -n "$DRACUT_SYSTEMD" ] && exit 0
|
||||||
|
|
||||||
|
@@ -1,6 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/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
|
# called by dracut
|
||||||
check() {
|
check() {
|
||||||
@@ -32,8 +30,9 @@ install() {
|
|||||||
# This is from 10redhat-i18n.
|
# This is from 10redhat-i18n.
|
||||||
findkeymap () {
|
findkeymap () {
|
||||||
local MAP=$1
|
local MAP=$1
|
||||||
|
local MAPNAME=${1%.map*}
|
||||||
[[ ! -f $MAP ]] && \
|
[[ ! -f $MAP ]] && \
|
||||||
MAP=$(find ${kbddir}/keymaps -type f -name $MAP -o -name $MAP.\* | head -n1)
|
MAP=$(find ${kbddir}/keymaps -type f -name ${MAPNAME} -o -name ${MAPNAME}.map -o -name ${MAPNAME}.map.\* | head -n1)
|
||||||
[[ " $KEYMAPS " = *" $MAP "* ]] && return
|
[[ " $KEYMAPS " = *" $MAP "* ]] && return
|
||||||
KEYMAPS="$KEYMAPS $MAP"
|
KEYMAPS="$KEYMAPS $MAP"
|
||||||
case $MAP in
|
case $MAP in
|
||||||
@@ -42,7 +41,7 @@ install() {
|
|||||||
*) cmd=grep ;;
|
*) cmd=grep ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
for INCL in $($cmd "^include " $MAP | while read a a b; do echo ${a//\"/}; done); do
|
for INCL in $($cmd "^include " $MAP | while read a a b || [ -n "$a" ]; do echo ${a//\"/}; done); do
|
||||||
for FN in $(find ${kbddir}/keymaps -type f -name $INCL\*); do
|
for FN in $(find ${kbddir}/keymaps -type f -name $INCL\*); do
|
||||||
findkeymap $FN
|
findkeymap $FN
|
||||||
done
|
done
|
||||||
@@ -102,6 +101,13 @@ install() {
|
|||||||
inst_rules ${moddir}/10-console.rules
|
inst_rules ${moddir}/10-console.rules
|
||||||
inst_hook cmdline 20 "${moddir}/parse-i18n.sh"
|
inst_hook cmdline 20 "${moddir}/parse-i18n.sh"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ ${kbddir} != "/usr/share" ]]; then
|
||||||
|
inst_dir /usr/share
|
||||||
|
for _src in $(eval echo {${KBDSUBDIRS}}); do
|
||||||
|
[ ! -e "${initdir}/usr/share/${_src}" ] && ln -s "${kbddir}/${_src}" "${initdir}/usr/share/${_src}"
|
||||||
|
done
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
install_all_kbd() {
|
install_all_kbd() {
|
||||||
@@ -109,19 +115,19 @@ install() {
|
|||||||
|
|
||||||
for _src in $(eval echo ${kbddir}/{${KBDSUBDIRS}}); do
|
for _src in $(eval echo ${kbddir}/{${KBDSUBDIRS}}); do
|
||||||
inst_dir "$_src"
|
inst_dir "$_src"
|
||||||
cp --reflink=auto --sparse=auto -prfL -t "${initdir}/${_src}" "$_src"/*
|
$DRACUT_CP -L -t "${initdir}/${_src}" "$_src"/*
|
||||||
done
|
done
|
||||||
|
|
||||||
# remove unnecessary files
|
# remove unnecessary files
|
||||||
rm -f -- "${initdir}${kbddir}/consoletrans/utflist"
|
rm -f -- "${initdir}${kbddir}/consoletrans/utflist"
|
||||||
find "${initdir}${kbddir}/" -name README\* -delete
|
find "${initdir}${kbddir}/" -name README\* -delete
|
||||||
find "${initdir}${kbddir}/" -name '*.gz' -print -quit \
|
find "${initdir}${kbddir}/" -name '*.gz' -print -quit \
|
||||||
| while read line; do
|
| while read line || [ -n "$line" ]; do
|
||||||
inst_multiple gzip
|
inst_multiple gzip
|
||||||
done
|
done
|
||||||
|
|
||||||
find "${initdir}${kbddir}/" -name '*.bz2' -print -quit \
|
find "${initdir}${kbddir}/" -name '*.bz2' -print -quit \
|
||||||
| while read line; do
|
| while read line || [ -n "$line" ]; do
|
||||||
inst_multiple bzip2
|
inst_multiple bzip2
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
@@ -247,7 +253,7 @@ install() {
|
|||||||
if checks; then
|
if checks; then
|
||||||
install_base
|
install_base
|
||||||
|
|
||||||
if [[ ${hostonly} ]] && ! [[ ${i18n_install_all} ]]; then
|
if [[ ${hostonly} ]] && ! [[ ${i18n_install_all} == "yes" ]]; then
|
||||||
install_local_i18n || install_all_kbd
|
install_local_i18n || install_all_kbd
|
||||||
else
|
else
|
||||||
install_all_kbd
|
install_all_kbd
|
||||||
|
@@ -1,6 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
||||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
|
||||||
|
|
||||||
inst_key_val() {
|
inst_key_val() {
|
||||||
local _value
|
local _value
|
||||||
@@ -12,7 +10,7 @@ inst_key_val() {
|
|||||||
_value="$(getarg $@)"
|
_value="$(getarg $@)"
|
||||||
[ -z "${_value}" ] && _value=$_default
|
[ -z "${_value}" ] && _value=$_default
|
||||||
if [ -n "${_value}" ]; then
|
if [ -n "${_value}" ]; then
|
||||||
printf '%s="%s"\n' $key ${_value} >> $_file
|
printf '%s="%s"\n' ${_key} ${_value} >> $_file
|
||||||
fi
|
fi
|
||||||
unset _file
|
unset _file
|
||||||
unset _value
|
unset _value
|
||||||
|
@@ -1,6 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
||||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
|
||||||
|
|
||||||
ROOT="$1"
|
ROOT="$1"
|
||||||
|
|
||||||
@@ -76,7 +74,7 @@ rm -f -- "$testfile"
|
|||||||
find_mount() {
|
find_mount() {
|
||||||
local dev mnt etc wanted_dev
|
local dev mnt etc wanted_dev
|
||||||
wanted_dev="$(readlink -e -q $1)"
|
wanted_dev="$(readlink -e -q $1)"
|
||||||
while read dev mnt etc; do
|
while read dev mnt etc || [ -n "$dev" ]; do
|
||||||
[ "$dev" = "$wanted_dev" ] && echo "$dev" && return 0
|
[ "$dev" = "$wanted_dev" ] && echo "$dev" && return 0
|
||||||
done < /proc/mounts
|
done < /proc/mounts
|
||||||
return 1
|
return 1
|
||||||
@@ -95,7 +93,7 @@ else
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while read a m a; do
|
while read a m a || [ -n "$m" ]; do
|
||||||
[ "$m" = "$1" ] && return 0
|
[ "$m" = "$1" ] && return 0
|
||||||
done < /proc/mounts
|
done < /proc/mounts
|
||||||
return 1
|
return 1
|
||||||
|
@@ -1,6 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
||||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
|
||||||
|
|
||||||
if getargbool 0 rd.convertfs; then
|
if getargbool 0 rd.convertfs; then
|
||||||
if getargbool 0 rd.debug; then
|
if getargbool 0 rd.debug; then
|
||||||
|
@@ -1,6 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/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
|
# called by dracut
|
||||||
check() {
|
check() {
|
||||||
|
@@ -1,6 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
||||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
|
||||||
|
|
||||||
PATH=/usr/sbin:/usr/bin:/sbin:/bin
|
PATH=/usr/sbin:/usr/bin:/sbin:/bin
|
||||||
|
|
||||||
@@ -10,9 +8,6 @@ type ip_to_var >/dev/null 2>&1 || . /lib/net-lib.sh
|
|||||||
# We already need a set netif here
|
# We already need a set netif here
|
||||||
netif=$interface
|
netif=$interface
|
||||||
|
|
||||||
# Huh? Interface configured?
|
|
||||||
[ -f "/tmp/net.$netif.up" ] && exit 0
|
|
||||||
|
|
||||||
setup_interface() {
|
setup_interface() {
|
||||||
ip=$new_ip_address
|
ip=$new_ip_address
|
||||||
mtu=$new_interface_mtu
|
mtu=$new_interface_mtu
|
||||||
@@ -23,7 +18,10 @@ setup_interface() {
|
|||||||
search=$(printf -- "$new_domain_search")
|
search=$(printf -- "$new_domain_search")
|
||||||
namesrv=$new_domain_name_servers
|
namesrv=$new_domain_name_servers
|
||||||
hostname=$new_host_name
|
hostname=$new_host_name
|
||||||
lease_time=$new_dhcp_lease_time
|
[ -n "$new_dhcp_lease_time" ] && lease_time=$new_dhcp_lease_time
|
||||||
|
[ -n "$new_max_life" ] && lease_time=$new_max_life
|
||||||
|
preferred_lft=$lease_time
|
||||||
|
[ -n "$new_preferred_life" ] && preferred_lft=$new_preferred_life
|
||||||
|
|
||||||
[ -f /tmp/net.$netif.override ] && . /tmp/net.$netif.override
|
[ -f /tmp/net.$netif.override ] && . /tmp/net.$netif.override
|
||||||
|
|
||||||
@@ -41,19 +39,35 @@ setup_interface() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ip addr add $ip${mask:+/$mask} ${bcast:+broadcast $bcast} \
|
ip addr add $ip${mask:+/$mask} ${bcast:+broadcast $bcast} dev $netif \
|
||||||
valid_lft ${lease_time} preferred_lft ${lease_time} \
|
${lease_time:+valid_lft $lease_time} \
|
||||||
dev $netif
|
${preferred_lft:+preferred_lft ${preferred_lft}}
|
||||||
|
|
||||||
[ -n "$gw" ] && echo ip route add default via $gw dev $netif > /tmp/net.$netif.gw
|
if [ -n "$gw" ] ; then
|
||||||
|
if [ "$mask" = "255.255.255.255" ] ; then
|
||||||
|
# point-to-point connection => set explicit route to gateway
|
||||||
|
echo ip route add $gw dev $netif > /tmp/net.$netif.gw
|
||||||
|
fi
|
||||||
|
|
||||||
[ -n "${search}${domain}" ] && echo "search $search $domain" > /tmp/net.$netif.resolv.conf
|
echo "$gw" | {
|
||||||
if [ -n "$namesrv" ] ; then
|
IFS=' ' read -r main_gw other_gw
|
||||||
for s in $namesrv; do
|
echo ip route replace default via $main_gw dev $netif >> /tmp/net.$netif.gw
|
||||||
echo nameserver $s
|
if [ -n "$other_gw" ] ; then
|
||||||
done
|
for g in $other_gw; do
|
||||||
fi >> /tmp/net.$netif.resolv.conf
|
echo ip route add default via $g dev $netif >> /tmp/net.$netif.gw
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
|
||||||
|
if getargbool 1 rd.peerdns; then
|
||||||
|
[ -n "${search}${domain}" ] && echo "search $search $domain" > /tmp/net.$netif.resolv.conf
|
||||||
|
if [ -n "$namesrv" ] ; then
|
||||||
|
for s in $namesrv; do
|
||||||
|
echo nameserver $s
|
||||||
|
done
|
||||||
|
fi >> /tmp/net.$netif.resolv.conf
|
||||||
|
fi
|
||||||
# Note: hostname can be fqdn OR short hostname, so chop off any
|
# Note: hostname can be fqdn OR short hostname, so chop off any
|
||||||
# trailing domain name and explicity add any domain if set.
|
# trailing domain name and explicity add any domain if set.
|
||||||
[ -n "$hostname" ] && echo "echo ${hostname%.$domain}${domain:+.$domain} > /proc/sys/kernel/hostname" > /tmp/net.$netif.hostname
|
[ -n "$hostname" ] && echo "echo ${hostname%.$domain}${domain:+.$domain} > /proc/sys/kernel/hostname" > /tmp/net.$netif.hostname
|
||||||
@@ -64,26 +78,77 @@ setup_interface6() {
|
|||||||
search=$(printf -- "$new_domain_search")
|
search=$(printf -- "$new_domain_search")
|
||||||
namesrv=$new_domain_name_servers
|
namesrv=$new_domain_name_servers
|
||||||
hostname=$new_host_name
|
hostname=$new_host_name
|
||||||
lease_time=$new_dhcp_lease_time
|
[ -n "$new_dhcp_lease_time" ] && lease_time=$new_dhcp_lease_time
|
||||||
|
[ -n "$new_max_life" ] && lease_time=$new_max_life
|
||||||
|
preferred_lft=$lease_time
|
||||||
|
[ -n "$new_preferred_life" ] && preferred_lft=$new_preferred_life
|
||||||
|
|
||||||
[ -f /tmp/net.$netif.override ] && . /tmp/net.$netif.override
|
[ -f /tmp/net.$netif.override ] && . /tmp/net.$netif.override
|
||||||
|
|
||||||
ip -6 addr add ${new_ip6_address}/${new_ip6_prefixlen} \
|
ip -6 addr add ${new_ip6_address}/${new_ip6_prefixlen} \
|
||||||
dev ${netif} scope global valid_lft ${lease_time} \
|
dev ${netif} scope global \
|
||||||
preferred_lft ${lease_time}
|
${lease_time:+valid_lft $lease_time} \
|
||||||
|
${preferred_lft:+preferred_lft ${preferred_lft}}
|
||||||
|
|
||||||
[ -n "${search}${domain}" ] && echo "search $search $domain" > /tmp/net.$netif.resolv.conf
|
if getargbool 1 rd.peerdns; then
|
||||||
if [ -n "$namesrv" ] ; then
|
[ -n "${search}${domain}" ] && echo "search $search $domain" > /tmp/net.$netif.resolv.conf
|
||||||
for s in $namesrv; do
|
if [ -n "$namesrv" ] ; then
|
||||||
echo nameserver $s
|
for s in $namesrv; do
|
||||||
done
|
echo nameserver $s
|
||||||
fi >> /tmp/net.$netif.resolv.conf
|
done
|
||||||
|
fi >> /tmp/net.$netif.resolv.conf
|
||||||
|
fi
|
||||||
|
|
||||||
# Note: hostname can be fqdn OR short hostname, so chop off any
|
# Note: hostname can be fqdn OR short hostname, so chop off any
|
||||||
# trailing domain name and explicity add any domain if set.
|
# trailing domain name and explicity add any domain if set.
|
||||||
[ -n "$hostname" ] && echo "echo ${hostname%.$domain}${domain:+.$domain} > /proc/sys/kernel/hostname" > /tmp/net.$netif.hostname
|
[ -n "$hostname" ] && echo "echo ${hostname%.$domain}${domain:+.$domain} > /proc/sys/kernel/hostname" > /tmp/net.$netif.hostname
|
||||||
}
|
}
|
||||||
|
|
||||||
|
parse_option_121() {
|
||||||
|
while [ $# -ne 0 ]; do
|
||||||
|
mask="$1"
|
||||||
|
shift
|
||||||
|
|
||||||
|
# Is the destination a multicast group?
|
||||||
|
if [ $1 -ge 224 -a $1 -lt 240 ]; then
|
||||||
|
multicast=1
|
||||||
|
else
|
||||||
|
multicast=0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Parse the arguments into a CIDR net/mask string
|
||||||
|
if [ $mask -gt 24 ]; then
|
||||||
|
destination="$1.$2.$3.$4/$mask"
|
||||||
|
shift; shift; shift; shift
|
||||||
|
elif [ $mask -gt 16 ]; then
|
||||||
|
destination="$1.$2.$3.0/$mask"
|
||||||
|
shift; shift; shift
|
||||||
|
elif [ $mask -gt 8 ]; then
|
||||||
|
destination="$1.$2.0.0/$mask"
|
||||||
|
shift; shift
|
||||||
|
else
|
||||||
|
destination="$1.0.0.0/$mask"
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Read the gateway
|
||||||
|
gateway="$1.$2.$3.$4"
|
||||||
|
shift; shift; shift; shift
|
||||||
|
|
||||||
|
# Multicast routing on Linux
|
||||||
|
# - If you set a next-hop address for a multicast group, this breaks with Cisco switches
|
||||||
|
# - If you simply leave it link-local and attach it to an interface, it works fine.
|
||||||
|
if [ $multicast -eq 1 ]; then
|
||||||
|
temp_result="$destination dev $interface"
|
||||||
|
else
|
||||||
|
temp_result="$destination via $gateway dev $interface"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "/sbin/ip route add $temp_result"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
case $reason in
|
case $reason in
|
||||||
PREINIT)
|
PREINIT)
|
||||||
echo "dhcp: PREINIT $netif up"
|
echo "dhcp: PREINIT $netif up"
|
||||||
@@ -91,8 +156,9 @@ case $reason in
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
PREINIT6)
|
PREINIT6)
|
||||||
echo "dhcp: PREINIT $netif up"
|
echo "dhcp: PREINIT6 $netif up"
|
||||||
linkup $netif
|
linkup $netif
|
||||||
|
wait_for_ipv6_dad_link $netif
|
||||||
;;
|
;;
|
||||||
|
|
||||||
BOUND)
|
BOUND)
|
||||||
@@ -102,14 +168,21 @@ case $reason in
|
|||||||
read layer2 < /sys/class/net/$netif/device/layer2
|
read layer2 < /sys/class/net/$netif/device/layer2
|
||||||
fi
|
fi
|
||||||
if [ "$layer2" != "0" ]; then
|
if [ "$layer2" != "0" ]; then
|
||||||
if ! arping -q -D -c 2 -I $netif $new_ip_address ; then
|
if command -v arping2 >/dev/null; then
|
||||||
warn "Duplicate address detected for $new_ip_address while doing dhcp. retrying"
|
if arping2 -q -C 1 -c 2 -I $netif -0 $new_ip_address ; then
|
||||||
exit 1
|
warn "Duplicate address detected for $new_ip_address while doing dhcp. retrying"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if ! arping -f -q -D -c 2 -I $netif $new_ip_address ; then
|
||||||
|
warn "Duplicate address detected for $new_ip_address while doing dhcp. retrying"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
unset layer2
|
unset layer2
|
||||||
setup_interface
|
setup_interface
|
||||||
set | while read line; do
|
set | while read line || [ -n "$line" ]; do
|
||||||
[ "${line#new_}" = "$line" ] && continue
|
[ "${line#new_}" = "$line" ] && continue
|
||||||
echo "$line"
|
echo "$line"
|
||||||
done >/tmp/dhclient.$netif.dhcpopts
|
done >/tmp/dhclient.$netif.dhcpopts
|
||||||
@@ -117,6 +190,12 @@ case $reason in
|
|||||||
{
|
{
|
||||||
echo '. /lib/net-lib.sh'
|
echo '. /lib/net-lib.sh'
|
||||||
echo "setup_net $netif"
|
echo "setup_net $netif"
|
||||||
|
if [ -n "$new_classless_static_routes" ]; then
|
||||||
|
OLDIFS="$IFS"
|
||||||
|
IFS=".$IFS"
|
||||||
|
parse_option_121 $new_classless_static_routes
|
||||||
|
IFS="$OLDIFS"
|
||||||
|
fi
|
||||||
echo "source_hook initqueue/online $netif"
|
echo "source_hook initqueue/online $netif"
|
||||||
[ -e /tmp/net.$netif.manualup ] || echo "/sbin/netroot $netif"
|
[ -e /tmp/net.$netif.manualup ] || echo "/sbin/netroot $netif"
|
||||||
echo "rm -f -- $hookdir/initqueue/setup_net_$netif.sh"
|
echo "rm -f -- $hookdir/initqueue/setup_net_$netif.sh"
|
||||||
@@ -124,13 +203,28 @@ case $reason in
|
|||||||
|
|
||||||
echo "[ -f /tmp/net.$netif.did-setup ]" > $hookdir/initqueue/finished/dhclient-$netif.sh
|
echo "[ -f /tmp/net.$netif.did-setup ]" > $hookdir/initqueue/finished/dhclient-$netif.sh
|
||||||
>/tmp/net.$netif.up
|
>/tmp/net.$netif.up
|
||||||
|
if [ -e /sys/class/net/${netif}/address ]; then
|
||||||
|
> /tmp/net.$(cat /sys/class/net/${netif}/address).up
|
||||||
|
fi
|
||||||
|
|
||||||
|
;;
|
||||||
|
|
||||||
|
RENEW|REBIND)
|
||||||
|
unset lease_time
|
||||||
|
[ -n "$new_dhcp_lease_time" ] && lease_time=$new_dhcp_lease_time
|
||||||
|
[ -n "$new_max_life" ] && lease_time=$new_max_life
|
||||||
|
preferred_lft=$lease_time
|
||||||
|
[ -n "$new_preferred_life" ] && preferred_lft=$new_preferred_life
|
||||||
|
ip -4 addr change ${new_ip_address}/${new_subnet_mask} broadcast ${new_broadcast_address} dev ${interface} \
|
||||||
|
${lease_time:+valid_lft $lease_time} ${preferred_lft:+preferred_lft ${preferred_lft}} \
|
||||||
|
>/dev/null 2>&1
|
||||||
;;
|
;;
|
||||||
|
|
||||||
BOUND6)
|
BOUND6)
|
||||||
echo "dhcp: BOND6 setting $netif"
|
echo "dhcp: BOND6 setting $netif"
|
||||||
setup_interface6
|
setup_interface6
|
||||||
|
|
||||||
set | while read line; do
|
set | while read line || [ -n "$line" ]; do
|
||||||
[ "${line#new_}" = "$line" ] && continue
|
[ "${line#new_}" = "$line" ] && continue
|
||||||
echo "$line"
|
echo "$line"
|
||||||
done >/tmp/dhclient.$netif.dhcpopts
|
done >/tmp/dhclient.$netif.dhcpopts
|
||||||
@@ -145,7 +239,22 @@ case $reason in
|
|||||||
|
|
||||||
echo "[ -f /tmp/net.$netif.did-setup ]" > $hookdir/initqueue/finished/dhclient-$netif.sh
|
echo "[ -f /tmp/net.$netif.did-setup ]" > $hookdir/initqueue/finished/dhclient-$netif.sh
|
||||||
>/tmp/net.$netif.up
|
>/tmp/net.$netif.up
|
||||||
|
if [ -e /sys/class/net/${netif}/address ]; then
|
||||||
|
> /tmp/net.$(cat /sys/class/net/${netif}/address).up
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
RENEW6|REBIND6)
|
||||||
|
unset lease_time
|
||||||
|
[ -n "$new_dhcp_lease_time" ] && lease_time=$new_dhcp_lease_time
|
||||||
|
[ -n "$new_max_life" ] && lease_time=$new_max_life
|
||||||
|
preferred_lft=$lease_time
|
||||||
|
[ -n "$new_preferred_life" ] && preferred_lft=$new_preferred_life
|
||||||
|
ip -6 addr change ${new_ip6_address}/${new_ip6_prefixlen} dev ${interface} scope global \
|
||||||
|
${lease_time:+valid_lft $lease_time} ${preferred_lft:+preferred_lft ${preferred_lft}} \
|
||||||
|
>/dev/null 2>&1
|
||||||
|
;;
|
||||||
|
|
||||||
*) echo "dhcp: $reason";;
|
*) echo "dhcp: $reason";;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@@ -1,3 +1,8 @@
|
|||||||
|
|
||||||
|
option classless-static-routes code 121 = array of unsigned integer 8;
|
||||||
|
|
||||||
|
send dhcp-client-identifier = hardware;
|
||||||
|
|
||||||
request subnet-mask, broadcast-address, time-offset, routers,
|
request subnet-mask, broadcast-address, time-offset, routers,
|
||||||
domain-name, domain-name-servers, domain-search, host-name,
|
domain-name, domain-name-servers, domain-search, host-name,
|
||||||
root-path, interface-mtu;
|
root-path, interface-mtu, classless-static-routes;
|
||||||
|
@@ -1,6 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
||||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
|
||||||
|
|
||||||
# This script is sourced, so root should be set. But let's be paranoid
|
# This script is sourced, so root should be set. But let's be paranoid
|
||||||
[ -z "$root" ] && root=$(getarg root=)
|
[ -z "$root" ] && root=$(getarg root=)
|
||||||
|
@@ -1,6 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
||||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
|
||||||
|
|
||||||
# if there are no ifname parameters, just use NAME=KERNEL
|
# if there are no ifname parameters, just use NAME=KERNEL
|
||||||
if ! getarg ifname= >/dev/null ; then
|
if ! getarg ifname= >/dev/null ; then
|
||||||
|
@@ -1,6 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
||||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
|
||||||
#
|
#
|
||||||
# We don't need to check for ip= errors here, that is handled by the
|
# We don't need to check for ip= errors here, that is handled by the
|
||||||
# cmdline parser script
|
# cmdline parser script
|
||||||
@@ -17,75 +15,12 @@ type ip_to_var >/dev/null 2>&1 || . /lib/net-lib.sh
|
|||||||
|
|
||||||
# $netif reads easier than $1
|
# $netif reads easier than $1
|
||||||
netif=$1
|
netif=$1
|
||||||
use_bridge='false'
|
|
||||||
use_vlan='false'
|
|
||||||
|
|
||||||
# enslave this interface to bond?
|
# loopback is always handled the same way
|
||||||
for i in /tmp/bond.*.info; do
|
if [ "$netif" = "lo" ] ; then
|
||||||
[ -e "$i" ] || continue
|
ip link set lo up
|
||||||
unset bondslaves
|
ip addr add 127.0.0.1/8 dev lo
|
||||||
unset bondname
|
exit 0
|
||||||
. "$i"
|
|
||||||
for slave in $bondslaves ; do
|
|
||||||
if [ "$netif" = "$slave" ] ; then
|
|
||||||
netif=$bondname
|
|
||||||
break 2
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ -e /tmp/team.info ]; then
|
|
||||||
. /tmp/team.info
|
|
||||||
for slave in $teamslaves ; do
|
|
||||||
if [ "$netif" = "$slave" ] ; then
|
|
||||||
netif=$teammaster
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -e /tmp/vlan.info ]; then
|
|
||||||
. /tmp/vlan.info
|
|
||||||
if [ "$netif" = "$phydevice" ]; then
|
|
||||||
if [ "$netif" = "$bondname" ] && [ -n "$DO_BOND_SETUP" ] ; then
|
|
||||||
: # We need to really setup bond (recursive call)
|
|
||||||
elif [ "$netif" = "$teammaster" ] && [ -n "$DO_TEAM_SETUP" ] ; then
|
|
||||||
: # We need to really setup team (recursive call)
|
|
||||||
else
|
|
||||||
netif="$vlanname"
|
|
||||||
use_vlan='true'
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# bridge this interface?
|
|
||||||
if [ -e /tmp/bridge.info ]; then
|
|
||||||
. /tmp/bridge.info
|
|
||||||
for ethname in $ethnames ; do
|
|
||||||
if [ "$netif" = "$ethname" ]; then
|
|
||||||
if [ "$netif" = "$bondname" ] && [ -n "$DO_BOND_SETUP" ] ; then
|
|
||||||
: # We need to really setup bond (recursive call)
|
|
||||||
elif [ "$netif" = "$teammaster" ] && [ -n "$DO_TEAM_SETUP" ] ; then
|
|
||||||
: # We need to really setup team (recursive call)
|
|
||||||
elif [ "$netif" = "$vlanname" ] && [ -n "$DO_VLAN_SETUP" ]; then
|
|
||||||
: # We need to really setup vlan (recursive call)
|
|
||||||
else
|
|
||||||
netif="$bridgename"
|
|
||||||
use_bridge='true'
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
# disable manual ifup while netroot is set for simplifying our logic
|
|
||||||
# in netroot case we prefer netroot to bringup $netif automaticlly
|
|
||||||
[ -n "$2" -a "$2" = "-m" ] && [ -z "$netroot" ] && manualup="$2"
|
|
||||||
[ -z "$netroot" ] && [ -z "$manualup" ] && exit 0
|
|
||||||
if [ -n "$manualup" ]; then
|
|
||||||
>/tmp/net.$netif.manualup
|
|
||||||
else
|
|
||||||
[ -e /tmp/net.${netif}.did-setup ] && exit 0
|
|
||||||
[ -e /sys/class/net/$netif/address ] && \
|
|
||||||
[ -e /tmp/net.$(cat /sys/class/net/$netif/address).did-setup ] && exit 0
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Run dhclient
|
# Run dhclient
|
||||||
@@ -94,18 +29,37 @@ do_dhcp() {
|
|||||||
# event for nfsroot
|
# event for nfsroot
|
||||||
# XXX add -V vendor class and option parsing per kernel
|
# XXX add -V vendor class and option parsing per kernel
|
||||||
|
|
||||||
|
local _COUNT=0
|
||||||
|
local _timeout=$(getargs rd.net.timeout.dhcp=)
|
||||||
|
local _DHCPRETRY=$(getargs rd.net.dhcp.retry=)
|
||||||
|
_DHCPRETRY=${_DHCPRETRY:-1}
|
||||||
|
|
||||||
[ -e /tmp/dhclient.$netif.pid ] && return 0
|
[ -e /tmp/dhclient.$netif.pid ] && return 0
|
||||||
|
|
||||||
if ! iface_has_link $netif; then
|
if ! iface_has_carrier $netif; then
|
||||||
echo "No carrier detected"
|
warn "No carrier detected on interface $netif"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
echo "Starting dhcp for interface $netif"
|
|
||||||
dhclient "$@" -1 -q -cf /etc/dhclient.conf -pf /tmp/dhclient.$netif.pid -lf /tmp/dhclient.$netif.lease $netif \
|
while [ $_COUNT -lt $_DHCPRETRY ]; do
|
||||||
|| echo "dhcp failed"
|
info "Starting dhcp for interface $netif"
|
||||||
|
dhclient "$@" \
|
||||||
|
${_timeout:+-timeout $_timeout} \
|
||||||
|
-q \
|
||||||
|
-cf /etc/dhclient.conf \
|
||||||
|
-pf /tmp/dhclient.$netif.pid \
|
||||||
|
-lf /tmp/dhclient.$netif.lease \
|
||||||
|
$netif \
|
||||||
|
&& return 0
|
||||||
|
_COUNT=$(($_COUNT+1))
|
||||||
|
[ $_COUNT -lt $_DHCPRETRY ] && sleep 1
|
||||||
|
done
|
||||||
|
warn "dhcp for interface $netif failed"
|
||||||
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
load_ipv6() {
|
load_ipv6() {
|
||||||
|
[ -d /proc/sys/net/ipv6 ] && return
|
||||||
modprobe ipv6
|
modprobe ipv6
|
||||||
i=0
|
i=0
|
||||||
while [ ! -d /proc/sys/net/ipv6 ]; do
|
while [ ! -d /proc/sys/net/ipv6 ]; do
|
||||||
@@ -130,125 +84,58 @@ do_ipv6auto() {
|
|||||||
|
|
||||||
# Handle static ip configuration
|
# Handle static ip configuration
|
||||||
do_static() {
|
do_static() {
|
||||||
strstr $ip '*:*:*' && load_ipv6
|
strglobin $ip '*:*:*' && load_ipv6
|
||||||
|
|
||||||
|
if [ -z "$dev" ] && ! iface_has_carrier "$netif"; then
|
||||||
|
warn "No carrier detected on interface $netif"
|
||||||
|
return 1
|
||||||
|
elif ! linkup "$netif"; then
|
||||||
|
warn "Could not bring interface $netif up!"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
ip route get "$ip" | {
|
||||||
|
read a rest
|
||||||
|
if [ "$a" = "local" ]; then
|
||||||
|
warn "Not assigning $ip to interface $netif, cause it is already assigned!"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
return 0
|
||||||
|
} || return 1
|
||||||
|
|
||||||
linkup $netif
|
|
||||||
[ -n "$macaddr" ] && ip link set address $macaddr dev $netif
|
[ -n "$macaddr" ] && ip link set address $macaddr dev $netif
|
||||||
[ -n "$mtu" ] && ip link set mtu $mtu dev $netif
|
[ -n "$mtu" ] && ip link set mtu $mtu dev $netif
|
||||||
if strstr $ip '*:*:*'; then
|
if strglobin $ip '*:*:*'; then
|
||||||
# note no ip addr flush for ipv6
|
# note no ip addr flush for ipv6
|
||||||
ip addr add $ip/$mask ${srv:+peer $srv} dev $netif
|
ip addr add $ip/$mask ${srv:+peer $srv} dev $netif
|
||||||
|
echo 0 > /proc/sys/net/ipv6/conf/$netif/forwarding
|
||||||
|
echo 1 > /proc/sys/net/ipv6/conf/$netif/accept_ra
|
||||||
|
echo 1 > /proc/sys/net/ipv6/conf/$netif/accept_redirects
|
||||||
wait_for_ipv6_dad $netif
|
wait_for_ipv6_dad $netif
|
||||||
else
|
else
|
||||||
|
if [ -z "$srv" ]; then
|
||||||
|
if command -v arping2 >/dev/null; then
|
||||||
|
if arping2 -q -C 1 -c 2 -I $netif -0 $ip ; then
|
||||||
|
warn "Duplicate address detected for $ip for interface $netif."
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if ! arping -f -q -D -c 2 -I $netif $ip ; then
|
||||||
|
warn "Duplicate address detected for $ip for interface $netif."
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
ip addr flush dev $netif
|
ip addr flush dev $netif
|
||||||
ip addr add $ip/$mask ${srv:+peer $srv} brd + dev $netif
|
ip addr add $ip/$mask ${srv:+peer $srv} brd + dev $netif
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -n "$gw" ] && echo ip route add default via $gw dev $netif > /tmp/net.$netif.gw
|
[ -n "$gw" ] && echo ip route replace default via $gw dev $netif > /tmp/net.$netif.gw
|
||||||
[ -n "$hostname" ] && echo "echo $hostname > /proc/sys/kernel/hostname" > /tmp/net.$netif.hostname
|
[ -n "$hostname" ] && echo "echo $hostname > /proc/sys/kernel/hostname" > /tmp/net.$netif.hostname
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
# loopback is always handled the same way
|
|
||||||
if [ "$netif" = "lo" ] ; then
|
|
||||||
ip link set lo up
|
|
||||||
ip addr add 127.0.0.1/8 dev lo
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# start bond if needed
|
|
||||||
if [ -e /tmp/bond.${netif}.info ]; then
|
|
||||||
. /tmp/bond.${netif}.info
|
|
||||||
|
|
||||||
if [ "$netif" = "$bondname" ] && [ ! -e /tmp/net.$bondname.up ] ; then # We are master bond device
|
|
||||||
modprobe bonding
|
|
||||||
echo "+$netif" > /sys/class/net/bonding_masters
|
|
||||||
ip link set $netif down
|
|
||||||
|
|
||||||
# Stolen from ifup-eth
|
|
||||||
# add the bits to setup driver parameters here
|
|
||||||
for arg in $bondoptions ; do
|
|
||||||
key=${arg%%=*};
|
|
||||||
value=${arg##*=};
|
|
||||||
# %{value:0:1} is replaced with non-bash specific construct
|
|
||||||
if [ "${key}" = "arp_ip_target" -a "${#value}" != "0" -a "+${value%%+*}" != "+" ]; then
|
|
||||||
OLDIFS=$IFS;
|
|
||||||
IFS=',';
|
|
||||||
for arp_ip in $value; do
|
|
||||||
echo +$arp_ip > /sys/class/net/${netif}/bonding/$key
|
|
||||||
done
|
|
||||||
IFS=$OLDIFS;
|
|
||||||
else
|
|
||||||
echo $value > /sys/class/net/${netif}/bonding/$key
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
linkup $netif
|
|
||||||
|
|
||||||
for slave in $bondslaves ; do
|
|
||||||
ip link set $slave down
|
|
||||||
echo "+$slave" > /sys/class/net/$bondname/bonding/slaves
|
|
||||||
linkup $slave
|
|
||||||
done
|
|
||||||
|
|
||||||
# add the bits to setup the needed post enslavement parameters
|
|
||||||
for arg in $BONDING_OPTS ; do
|
|
||||||
key=${arg%%=*};
|
|
||||||
value=${arg##*=};
|
|
||||||
if [ "${key}" = "primary" ]; then
|
|
||||||
echo $value > /sys/class/net/${netif}/bonding/$key
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -e /tmp/team.info ]; then
|
|
||||||
. /tmp/team.info
|
|
||||||
if [ "$netif" = "$teammaster" ] && [ ! -e /tmp/net.$teammaster.up ] ; then
|
|
||||||
# We shall only bring up those _can_ come up
|
|
||||||
# in case of some slave is gone in active-backup mode
|
|
||||||
working_slaves=""
|
|
||||||
for slave in $teamslaves ; do
|
|
||||||
ip link set $slave up 2>/dev/null
|
|
||||||
if wait_for_if_up $slave; then
|
|
||||||
working_slaves+="$slave "
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
# Do not add slaves now
|
|
||||||
teamd -d -U -n -t $teammaster -f /etc/teamd/$teammaster.conf
|
|
||||||
for slave in $working_slaves; do
|
|
||||||
# team requires the slaves to be down before joining team
|
|
||||||
ip link set $slave down
|
|
||||||
teamdctl $teammaster port add $slave
|
|
||||||
done
|
|
||||||
ip link set $teammaster up
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# XXX need error handling like dhclient-script
|
|
||||||
|
|
||||||
if [ -e /tmp/bridge.info ]; then
|
|
||||||
. /tmp/bridge.info
|
|
||||||
# start bridge if necessary
|
|
||||||
if [ "$netif" = "$bridgename" ] && [ ! -e /tmp/net.$bridgename.up ]; then
|
|
||||||
brctl addbr $bridgename
|
|
||||||
brctl setfd $bridgename 0
|
|
||||||
for ethname in $ethnames ; do
|
|
||||||
if [ "$ethname" = "$bondname" ] ; then
|
|
||||||
DO_BOND_SETUP=yes ifup $bondname -m
|
|
||||||
elif [ "$ethname" = "$teammaster" ] ; then
|
|
||||||
DO_TEAM_SETUP=yes ifup $teammaster -m
|
|
||||||
elif [ "$ethname" = "$vlanname" ]; then
|
|
||||||
DO_VLAN_SETUP=yes ifup $vlanname -m
|
|
||||||
else
|
|
||||||
linkup $ethname
|
|
||||||
fi
|
|
||||||
brctl addif $bridgename $ethname
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
get_vid() {
|
get_vid() {
|
||||||
case "$1" in
|
case "$1" in
|
||||||
vlan*)
|
vlan*)
|
||||||
@@ -260,33 +147,237 @@ get_vid() {
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ "$netif" = "$vlanname" ] && [ ! -e /tmp/net.$vlanname.up ]; then
|
# check, if we need VLAN's for this interface
|
||||||
modprobe 8021q
|
if [ -z "$DO_VLAN_PHY" ] && [ -e /tmp/vlan.${netif}.phy ]; then
|
||||||
if [ "$phydevice" = "$bondname" ] ; then
|
unset DO_VLAN
|
||||||
DO_BOND_SETUP=yes ifup $phydevice -m
|
NO_AUTO_DHCP=yes DO_VLAN_PHY=yes ifup "$netif"
|
||||||
elif [ "$phydevice" = "$teammaster" ] ; then
|
modprobe -b -q 8021q
|
||||||
DO_TEAM_SETUP=yes ifup $phydevice -m
|
|
||||||
else
|
for i in /tmp/vlan.*.${netif}; do
|
||||||
linkup "$phydevice"
|
[ -e "$i" ] || continue
|
||||||
fi
|
unset vlanname
|
||||||
ip link add dev "$vlanname" link "$phydevice" type vlan id "$(get_vid $vlanname)"
|
unset phydevice
|
||||||
ip link set "$vlanname" up
|
. "$i"
|
||||||
|
if [ -n "$vlanname" ]; then
|
||||||
|
linkup "$phydevice"
|
||||||
|
ip link add dev "$vlanname" link "$phydevice" type vlan id "$(get_vid $vlanname)"
|
||||||
|
ifup "$vlanname"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Check, if interface is VLAN interface
|
||||||
|
if ! [ -e /tmp/vlan.${netif}.phy ]; then
|
||||||
|
for i in /tmp/vlan.${netif}.*; do
|
||||||
|
[ -e "$i" ] || continue
|
||||||
|
export DO_VLAN=yes
|
||||||
|
break
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# bridge this interface?
|
||||||
|
if [ -z "$NO_BRIDGE_MASTER" ]; then
|
||||||
|
for i in /tmp/bridge.*.info; do
|
||||||
|
[ -e "$i" ] || continue
|
||||||
|
unset bridgeslaves
|
||||||
|
unset bridgename
|
||||||
|
. "$i"
|
||||||
|
for ethname in $bridgeslaves ; do
|
||||||
|
[ "$netif" != "$ethname" ] && continue
|
||||||
|
|
||||||
|
NO_BRIDGE_MASTER=yes NO_AUTO_DHCP=yes ifup $ethname
|
||||||
|
linkup $ethname
|
||||||
|
if [ ! -e /tmp/bridge.$bridgename.up ]; then
|
||||||
|
ip link add name $bridgename type bridge
|
||||||
|
echo 0 > /sys/devices/virtual/net/$bridgename/bridge/forward_delay
|
||||||
|
> /tmp/bridge.$bridgename.up
|
||||||
|
fi
|
||||||
|
ip link set dev $ethname master $bridgename
|
||||||
|
ifup $bridgename
|
||||||
|
exit 0
|
||||||
|
done
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
# enslave this interface to bond?
|
||||||
|
if [ -z "$NO_BOND_MASTER" ]; then
|
||||||
|
for i in /tmp/bond.*.info; do
|
||||||
|
[ -e "$i" ] || continue
|
||||||
|
unset bondslaves
|
||||||
|
unset bondname
|
||||||
|
. "$i"
|
||||||
|
for slave in $bondslaves ; do
|
||||||
|
[ "$netif" != "$slave" ] && continue
|
||||||
|
|
||||||
|
# already setup
|
||||||
|
[ -e /tmp/bond.$bondname.up ] && exit 0
|
||||||
|
|
||||||
|
# wait for all slaves to show up
|
||||||
|
for slave in $bondslaves ; do
|
||||||
|
# try to create the slave (maybe vlan or bridge)
|
||||||
|
NO_BOND_MASTER=yes NO_AUTO_DHCP=yes ifup $slave
|
||||||
|
|
||||||
|
if ! ip link show dev $slave >/dev/null 2>&1; then
|
||||||
|
# wait for the last slave to show up
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
modprobe -q -b bonding
|
||||||
|
echo "+$bondname" > /sys/class/net/bonding_masters 2>/dev/null
|
||||||
|
ip link set $bondname down
|
||||||
|
|
||||||
|
# Stolen from ifup-eth
|
||||||
|
# add the bits to setup driver parameters here
|
||||||
|
for arg in $bondoptions ; do
|
||||||
|
key=${arg%%=*};
|
||||||
|
value=${arg##*=};
|
||||||
|
# %{value:0:1} is replaced with non-bash specific construct
|
||||||
|
if [ "${key}" = "arp_ip_target" -a "${#value}" != "0" -a "+${value%%+*}" != "+" ]; then
|
||||||
|
OLDIFS=$IFS;
|
||||||
|
IFS=',';
|
||||||
|
for arp_ip in $value; do
|
||||||
|
echo +$arp_ip > /sys/class/net/${bondname}/bonding/$key
|
||||||
|
done
|
||||||
|
IFS=$OLDIFS;
|
||||||
|
else
|
||||||
|
echo $value > /sys/class/net/${bondname}/bonding/$key
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
linkup $bondname
|
||||||
|
|
||||||
|
for slave in $bondslaves ; do
|
||||||
|
cat /sys/class/net/$slave/address > /tmp/net.${bondname}.${slave}.hwaddr
|
||||||
|
ip link set $slave down
|
||||||
|
echo "+$slave" > /sys/class/net/$bondname/bonding/slaves
|
||||||
|
linkup $slave
|
||||||
|
done
|
||||||
|
|
||||||
|
# Set mtu on bond master
|
||||||
|
[ -n "$bondmtu" ] && ip link set mtu $bondmtu dev $netif
|
||||||
|
|
||||||
|
# add the bits to setup the needed post enslavement parameters
|
||||||
|
for arg in $bondoptions ; do
|
||||||
|
key=${arg%%=*};
|
||||||
|
value=${arg##*=};
|
||||||
|
if [ "${key}" = "primary" ]; then
|
||||||
|
echo $value > /sys/class/net/${bondname}/bonding/$key
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
> /tmp/bond.$bondname.up
|
||||||
|
|
||||||
|
NO_BOND_MASTER=yes ifup $bondname
|
||||||
|
exit $?
|
||||||
|
done
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$NO_TEAM_MASTER" ]; then
|
||||||
|
for i in /tmp/team.*.info; do
|
||||||
|
[ -e "$i" ] || continue
|
||||||
|
unset teammaster
|
||||||
|
unset teamslaves
|
||||||
|
. "$i"
|
||||||
|
for slave in $teamslaves ; do
|
||||||
|
[ "$netif" != "$slave" ] && continue
|
||||||
|
|
||||||
|
[ -e /tmp/team.$teammaster.up ] && exit 0
|
||||||
|
|
||||||
|
# wait for all slaves to show up
|
||||||
|
for slave in $teamslaves ; do
|
||||||
|
# try to create the slave (maybe vlan or bridge)
|
||||||
|
NO_TEAM_MASTER=yes NO_AUTO_DHCP=yes ifup $slave
|
||||||
|
|
||||||
|
if ! ip link show dev $slave >/dev/null 2>&1; then
|
||||||
|
# wait for the last slave to show up
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ ! -e /tmp/team.$teammaster.up ] ; then
|
||||||
|
# We shall only bring up those _can_ come up
|
||||||
|
# in case of some slave is gone in active-backup mode
|
||||||
|
working_slaves=""
|
||||||
|
for slave in $teamslaves ; do
|
||||||
|
teamdctl ${teammaster} port present ${slave} 2>/dev/null \
|
||||||
|
&& continue
|
||||||
|
ip link set dev $slave up 2>/dev/null
|
||||||
|
if wait_for_if_up $slave; then
|
||||||
|
working_slaves="$working_slaves$slave "
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
# Do not add slaves now
|
||||||
|
teamd -d -U -n -N -t $teammaster -f /etc/teamd/${teammaster}.conf
|
||||||
|
for slave in $working_slaves; do
|
||||||
|
# team requires the slaves to be down before joining team
|
||||||
|
ip link set dev $slave down
|
||||||
|
(
|
||||||
|
unset TEAM_PORT_CONFIG
|
||||||
|
_hwaddr=$(cat /sys/class/net/$slave/address)
|
||||||
|
_subchannels=$(iface_get_subchannels "$slave")
|
||||||
|
if [ -n "$_hwaddr" ] && [ -e "/etc/sysconfig/network-scripts/mac-${_hwaddr}.conf" ]; then
|
||||||
|
. "/etc/sysconfig/network-scripts/mac-${_hwaddr}.conf"
|
||||||
|
elif [ -n "$_subchannels" ] && [ -e "/etc/sysconfig/network-scripts/ccw-${_subchannels}.conf" ]; then
|
||||||
|
. "/etc/sysconfig/network-scripts/ccw-${_subchannels}.conf"
|
||||||
|
elif [ -e "/etc/sysconfig/network-scripts/ifcfg-${slave}" ]; then
|
||||||
|
. "/etc/sysconfig/network-scripts/ifcfg-${slave}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "${TEAM_PORT_CONFIG}" ]; then
|
||||||
|
/usr/bin/teamdctl ${teammaster} port config update ${slave} "${TEAM_PORT_CONFIG}"
|
||||||
|
fi
|
||||||
|
)
|
||||||
|
teamdctl $teammaster port add $slave
|
||||||
|
done
|
||||||
|
|
||||||
|
ip link set dev $teammaster up
|
||||||
|
|
||||||
|
> /tmp/team.$teammaster.up
|
||||||
|
NO_TEAM_MASTER=yes ifup $teammaster
|
||||||
|
exit $?
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
# all synthetic interfaces done.. now check if the interface is available
|
||||||
|
if ! ip link show dev $netif >/dev/null 2>&1; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# disable manual ifup while netroot is set for simplifying our logic
|
||||||
|
# in netroot case we prefer netroot to bringup $netif automaticlly
|
||||||
|
[ -n "$2" -a "$2" = "-m" ] && [ -z "$netroot" ] && manualup="$2"
|
||||||
|
|
||||||
|
if [ -n "$manualup" ]; then
|
||||||
|
>/tmp/net.$netif.manualup
|
||||||
|
rm -f /tmp/net.${netif}.did-setup
|
||||||
|
else
|
||||||
|
[ -e /tmp/net.${netif}.did-setup ] && exit 0
|
||||||
|
[ -z "$DO_VLAN" ] && \
|
||||||
|
[ -e /sys/class/net/$netif/address ] && \
|
||||||
|
[ -e /tmp/net.$(cat /sys/class/net/$netif/address).did-setup ] && exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# No ip lines default to dhcp
|
# No ip lines default to dhcp
|
||||||
ip=$(getarg ip)
|
ip=$(getarg ip)
|
||||||
|
|
||||||
if [ -z "$ip" ]; then
|
if [ -z "$NO_AUTO_DHCP" ] && [ -z "$ip" ]; then
|
||||||
namesrv=$(getargs nameserver)
|
|
||||||
for s in $namesrv; do
|
|
||||||
echo nameserver $s >> /tmp/net.$netif.resolv.conf
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ "$netroot" = "dhcp6" ]; then
|
if [ "$netroot" = "dhcp6" ]; then
|
||||||
do_dhcp -6
|
do_dhcp -6
|
||||||
else
|
else
|
||||||
do_dhcp -4
|
do_dhcp -4
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
for s in $(getargs nameserver); do
|
||||||
|
[ -n "$s" ] || continue
|
||||||
|
echo nameserver $s >> /tmp/net.$netif.resolv.conf
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
@@ -309,62 +400,75 @@ for p in $(getargs ip=); do
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
# If this option isn't directed at our interface, skip it
|
# If this option isn't directed at our interface, skip it
|
||||||
[ -n "$dev" ] && [ "$dev" != "$netif" ] && \
|
[ -n "$dev" ] && [ "$dev" != "$netif" ] && continue
|
||||||
[ "$use_bridge" != 'true' ] && \
|
|
||||||
[ "$use_vlan" != 'true' ] && continue
|
|
||||||
|
|
||||||
# setup nameserver
|
|
||||||
namesrv="$dns1 $dns2 $(getargs nameserver)"
|
|
||||||
for s in $namesrv; do
|
|
||||||
echo nameserver $s >> /tmp/net.$netif.resolv.conf
|
|
||||||
done
|
|
||||||
|
|
||||||
# Store config for later use
|
# Store config for later use
|
||||||
for i in ip srv gw mask hostname macaddr dns1 dns2; do
|
for i in ip srv gw mask hostname macaddr mtu dns1 dns2; do
|
||||||
eval '[ "$'$i'" ] && echo '$i'="$'$i'"'
|
eval '[ "$'$i'" ] && echo '$i'="$'$i'"'
|
||||||
done > /tmp/net.$netif.override
|
done > /tmp/net.$netif.override
|
||||||
|
|
||||||
case $autoconf in
|
for autoopt in $(str_replace "$autoconf" "," " "); do
|
||||||
dhcp|on|any)
|
case $autoopt in
|
||||||
do_dhcp -4 ;;
|
dhcp|on|any)
|
||||||
dhcp6)
|
do_dhcp -4 ;;
|
||||||
load_ipv6
|
dhcp6)
|
||||||
do_dhcp -6 ;;
|
load_ipv6
|
||||||
auto6)
|
do_dhcp -6 ;;
|
||||||
do_ipv6auto ;;
|
auto6)
|
||||||
*)
|
do_ipv6auto ;;
|
||||||
do_static ;;
|
*)
|
||||||
esac
|
do_static ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
ret=$?
|
||||||
|
|
||||||
> /tmp/net.${netif}.up
|
# setup nameserver
|
||||||
|
for s in "$dns1" "$dns2" $(getargs nameserver); do
|
||||||
|
[ -n "$s" ] || continue
|
||||||
|
echo nameserver $s >> /tmp/net.$netif.resolv.conf
|
||||||
|
done
|
||||||
|
|
||||||
case $autoconf in
|
if [ $ret -eq 0 ]; then
|
||||||
dhcp|on|any|dhcp6)
|
> /tmp/net.${netif}.up
|
||||||
|
|
||||||
|
if [ -z "$DO_VLAN" ] && [ -e /sys/class/net/${netif}/address ]; then
|
||||||
|
> /tmp/net.$(cat /sys/class/net/${netif}/address).up
|
||||||
|
fi
|
||||||
|
|
||||||
|
case $autoconf in
|
||||||
|
dhcp|on|any|dhcp6)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
if [ $? -eq 0 ]; then
|
if [ $ret -eq 0 ]; then
|
||||||
setup_net $netif
|
setup_net $netif
|
||||||
source_hook initqueue/online $netif
|
source_hook initqueue/online $netif
|
||||||
if [ -z "$manualup" ]; then
|
if [ -z "$manualup" ]; then
|
||||||
/sbin/netroot $netif
|
/sbin/netroot $netif
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
;;
|
||||||
;;
|
esac
|
||||||
esac
|
exit $ret
|
||||||
|
fi
|
||||||
exit 0
|
|
||||||
done
|
done
|
||||||
|
|
||||||
# netif isn't the top stack? Then we should exit here.
|
|
||||||
# eg. netif is bond0. br0 is on top of it. dhcp br0 is correct but dhcp
|
|
||||||
# bond0 doesn't make sense.
|
|
||||||
if [ -n "$DO_BOND_SETUP" -o -n "$DO_TEAM_SETUP" -o -n "$DO_VLAN_SETUP" ]; then
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# no ip option directed at our interface?
|
# no ip option directed at our interface?
|
||||||
if [ ! -e /tmp/net.${netif}.up ]; then
|
if [ -z "$NO_AUTO_DHCP" ] && [ ! -e /tmp/net.${netif}.up ]; then
|
||||||
do_dhcp -4
|
if [ -e /tmp/net.bootdev ]; then
|
||||||
|
BOOTDEV=$(cat /tmp/net.bootdev)
|
||||||
|
if [ "$netif" = "$BOOTDEV" ] || [ "$BOOTDEV" = "$(cat /sys/class/net/${netif}/address)" ]; then
|
||||||
|
load_ipv6
|
||||||
|
do_dhcp
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if getargs 'ip=dhcp6'; then
|
||||||
|
load_ipv6
|
||||||
|
do_dhcp -6
|
||||||
|
fi
|
||||||
|
if getargs 'ip=dhcp'; then
|
||||||
|
do_dhcp -4
|
||||||
|
fi
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
@@ -1,6 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
||||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
|
||||||
|
|
||||||
for f in /tmp/dhclient.*.pid; do
|
for f in /tmp/dhclient.*.pid; do
|
||||||
[ -e $f ] || continue
|
[ -e $f ] || continue
|
||||||
|
@@ -1,87 +1,43 @@
|
|||||||
#!/bin/bash
|
#!/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
|
# called by dracut
|
||||||
check() {
|
check() {
|
||||||
local _program
|
local _program
|
||||||
|
|
||||||
require_binaries ip arping dhclient || return 1
|
require_binaries ip dhclient || return 1
|
||||||
|
require_any_binary arping arping2 || return 1
|
||||||
|
|
||||||
return 255
|
return 255
|
||||||
}
|
}
|
||||||
|
|
||||||
# called by dracut
|
# called by dracut
|
||||||
depends() {
|
depends() {
|
||||||
|
echo "kernel-network-modules"
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
# called by dracut
|
# called by dracut
|
||||||
installkernel() {
|
installkernel() {
|
||||||
# Include wired net drivers, excluding wireless
|
return 0
|
||||||
|
|
||||||
net_module_filter() {
|
|
||||||
local _net_drivers='eth_type_trans|register_virtio_device|usbnet_open'
|
|
||||||
local _unwanted_drivers='/(wireless|isdn|uwb|net/ethernet|net/phy|net/team)/'
|
|
||||||
local _ret
|
|
||||||
# subfunctions inherit following FDs
|
|
||||||
local _merge=8 _side2=9
|
|
||||||
function nmf1() {
|
|
||||||
local _fname _fcont
|
|
||||||
while read _fname; do
|
|
||||||
[[ $_fname =~ $_unwanted_drivers ]] && continue
|
|
||||||
case "$_fname" in
|
|
||||||
*.ko) _fcont="$(< $_fname)" ;;
|
|
||||||
*.ko.gz) _fcont="$(gzip -dc $_fname)" ;;
|
|
||||||
*.ko.xz) _fcont="$(xz -dc $_fname)" ;;
|
|
||||||
esac
|
|
||||||
[[ $_fcont =~ $_net_drivers
|
|
||||||
&& ! $_fcont =~ iw_handler_get_spy ]] \
|
|
||||||
&& echo "$_fname"
|
|
||||||
done
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
function rotor() {
|
|
||||||
local _f1 _f2
|
|
||||||
while read _f1; do
|
|
||||||
echo "$_f1"
|
|
||||||
if read _f2; then
|
|
||||||
echo "$_f2" 1>&${_side2}
|
|
||||||
fi
|
|
||||||
done | nmf1 1>&${_merge}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
# Use two parallel streams to filter alternating modules.
|
|
||||||
set +x
|
|
||||||
eval "( ( rotor ) ${_side2}>&1 | nmf1 ) ${_merge}>&1"
|
|
||||||
[[ $debug ]] && set -x
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
{ find_kernel_modules_by_path drivers/net; if [ "$_arch" = "s390" -o "$_arch" = "s390x" ]; then find_kernel_modules_by_path drivers/s390/net; fi; } \
|
|
||||||
| net_module_filter | instmods
|
|
||||||
|
|
||||||
#instmods() will take care of hostonly
|
|
||||||
instmods \
|
|
||||||
=drivers/net/phy \
|
|
||||||
=drivers/net/team \
|
|
||||||
=drivers/net/ethernet \
|
|
||||||
ecb arc4 bridge stp llc ipv6 bonding 8021q af_packet virtio_net
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# called by dracut
|
# called by dracut
|
||||||
install() {
|
install() {
|
||||||
local _arch _i _dir
|
local _arch _i _dir
|
||||||
inst_multiple ip arping dhclient sed
|
inst_multiple ip dhclient sed awk
|
||||||
|
|
||||||
|
inst_multiple -o arping arping2
|
||||||
|
strstr "$(arping 2>&1)" "ARPing 2" && mv "$initdir/bin/arping" "$initdir/bin/arping2"
|
||||||
|
|
||||||
inst_multiple -o ping ping6
|
inst_multiple -o ping ping6
|
||||||
inst_multiple -o brctl
|
|
||||||
inst_multiple -o teamd teamdctl teamnl
|
inst_multiple -o teamd teamdctl teamnl
|
||||||
inst_simple /etc/libnl/classid
|
inst_simple /etc/libnl/classid
|
||||||
inst_script "$moddir/ifup.sh" "/sbin/ifup"
|
inst_script "$moddir/ifup.sh" "/sbin/ifup"
|
||||||
inst_script "$moddir/netroot.sh" "/sbin/netroot"
|
inst_script "$moddir/netroot.sh" "/sbin/netroot"
|
||||||
inst_script "$moddir/dhclient-script.sh" "/sbin/dhclient-script"
|
inst_script "$moddir/dhclient-script.sh" "/sbin/dhclient-script"
|
||||||
inst_simple "$moddir/net-lib.sh" "/lib/net-lib.sh"
|
inst_simple "$moddir/net-lib.sh" "/lib/net-lib.sh"
|
||||||
inst_simple "$moddir/dhclient.conf" "/etc/dhclient.conf"
|
inst_simple -H "/etc/dhclient.conf"
|
||||||
|
cat "$moddir/dhclient.conf" >> "${initdir}/etc/dhclient.conf"
|
||||||
inst_hook pre-udev 50 "$moddir/ifname-genrules.sh"
|
inst_hook pre-udev 50 "$moddir/ifname-genrules.sh"
|
||||||
inst_hook pre-udev 60 "$moddir/net-genrules.sh"
|
inst_hook pre-udev 60 "$moddir/net-genrules.sh"
|
||||||
inst_hook cmdline 91 "$moddir/dhcp-root.sh"
|
inst_hook cmdline 91 "$moddir/dhcp-root.sh"
|
||||||
@@ -94,6 +50,43 @@ install() {
|
|||||||
inst_hook cmdline 99 "$moddir/parse-ifname.sh"
|
inst_hook cmdline 99 "$moddir/parse-ifname.sh"
|
||||||
inst_hook cleanup 10 "$moddir/kill-dhclient.sh"
|
inst_hook cleanup 10 "$moddir/kill-dhclient.sh"
|
||||||
|
|
||||||
|
# install all config files for teaming
|
||||||
|
unset TEAM_MASTER
|
||||||
|
unset TEAM_CONFIG
|
||||||
|
unset TEAM_PORT_CONFIG
|
||||||
|
unset HWADDR
|
||||||
|
unset SUBCHANNELS
|
||||||
|
for i in /etc/sysconfig/network-scripts/ifcfg-*; do
|
||||||
|
[ -e "$i" ] || continue
|
||||||
|
case "$i" in
|
||||||
|
*~ | *.bak | *.orig | *.rpmnew | *.rpmorig | *.rpmsave)
|
||||||
|
continue
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
(
|
||||||
|
. "$i"
|
||||||
|
if ! [ "${ONBOOT}" = "no" -o "${ONBOOT}" = "NO" ] \
|
||||||
|
&& [ -n "${TEAM_MASTER}${TEAM_CONFIG}${TEAM_PORT_CONFIG}" ]; then
|
||||||
|
if [ -n "$TEAM_CONFIG" ] && [ -n "$DEVICE" ]; then
|
||||||
|
mkdir -p $initdir/etc/teamd
|
||||||
|
printf -- "%s" "$TEAM_CONFIG" > "$initdir/etc/teamd/${DEVICE}.conf"
|
||||||
|
elif [ -n "$TEAM_PORT_CONFIG" ]; then
|
||||||
|
inst_simple "$i"
|
||||||
|
|
||||||
|
HWADDR="$(echo $HWADDR | sed 'y/ABCDEF/abcdef/')"
|
||||||
|
if [ -n "$HWADDR" ]; then
|
||||||
|
ln_r "$i" "/etc/sysconfig/network-scripts/mac-${HWADDR}.conf"
|
||||||
|
fi
|
||||||
|
|
||||||
|
SUBCHANNELS="$(echo $SUBCHANNELS | sed 'y/ABCDEF/abcdef/')"
|
||||||
|
if [ -n "$SUBCHANNELS" ]; then
|
||||||
|
ln_r "$i" "/etc/sysconfig/network-scripts/ccw-${SUBCHANNELS}.conf"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
)
|
||||||
|
done
|
||||||
|
|
||||||
_arch=$(uname -m)
|
_arch=$(uname -m)
|
||||||
|
|
||||||
inst_libdir_file {"tls/$_arch/",tls/,"$_arch/",}"libnss_dns.so.*" \
|
inst_libdir_file {"tls/$_arch/",tls/,"$_arch/",}"libnss_dns.so.*" \
|
||||||
|
@@ -1,6 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
||||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
|
||||||
|
|
||||||
getargbool 0 rd.neednet && NEEDNET=1
|
getargbool 0 rd.neednet && NEEDNET=1
|
||||||
|
|
||||||
@@ -14,11 +12,14 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh
|
|||||||
# Write udev rules
|
# Write udev rules
|
||||||
{
|
{
|
||||||
# bridge: attempt only the defined interface
|
# bridge: attempt only the defined interface
|
||||||
if [ -e /tmp/bridge.info ]; then
|
for i in /tmp/bridge.*.info; do
|
||||||
. /tmp/bridge.info
|
[ -e "$i" ] || continue
|
||||||
IFACES="$IFACES ${ethnames%% *}"
|
unset bridgeslaves
|
||||||
|
unset bridgename
|
||||||
|
. "$i"
|
||||||
|
RAW_IFACES="$RAW_IFACES $bridgeslaves"
|
||||||
MASTER_IFACES="$MASTER_IFACES $bridgename"
|
MASTER_IFACES="$MASTER_IFACES $bridgename"
|
||||||
fi
|
done
|
||||||
|
|
||||||
# bond: attempt only the defined interface (override bridge defines)
|
# bond: attempt only the defined interface (override bridge defines)
|
||||||
for i in /tmp/bond.*.info; do
|
for i in /tmp/bond.*.info; do
|
||||||
@@ -27,21 +28,34 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh
|
|||||||
unset bondname
|
unset bondname
|
||||||
. "$i"
|
. "$i"
|
||||||
# It is enough to fire up only one
|
# It is enough to fire up only one
|
||||||
IFACES="$IFACES ${bondslaves%% *}"
|
RAW_IFACES="$RAW_IFACES $bondslaves"
|
||||||
MASTER_IFACES="$MASTER_IFACES ${bondname}"
|
MASTER_IFACES="$MASTER_IFACES ${bondname}"
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ -e /tmp/team.info ]; then
|
for i in /tmp/team.*.info; do
|
||||||
. /tmp/team.info
|
[ -e "$i" ] || continue
|
||||||
IFACES="$IFACES ${teamslaves}"
|
unset teamslaves
|
||||||
|
unset teammaster
|
||||||
|
. "$i"
|
||||||
|
RAW_IFACES="$RAW_IFACES ${teamslaves}"
|
||||||
MASTER_IFACES="$MASTER_IFACES ${teammaster}"
|
MASTER_IFACES="$MASTER_IFACES ${teammaster}"
|
||||||
fi
|
done
|
||||||
|
|
||||||
if [ -e /tmp/vlan.info ]; then
|
for i in /tmp/vlan.*.phy; do
|
||||||
. /tmp/vlan.info
|
[ -e "$i" ] || continue
|
||||||
IFACES="$IFACES $phydevice"
|
unset phydevice
|
||||||
MASTER_IFACES="$MASTER_IFACES ${vlanname}"
|
. "$i"
|
||||||
fi
|
RAW_IFACES="$RAW_IFACES $phydevice"
|
||||||
|
for j in /tmp/vlan.*.${phydevice}; do
|
||||||
|
[ -e "$j" ] || continue
|
||||||
|
unset vlanname
|
||||||
|
. "$j"
|
||||||
|
MASTER_IFACES="$MASTER_IFACES ${vlanname}"
|
||||||
|
done
|
||||||
|
done
|
||||||
|
|
||||||
|
MASTER_IFACES="$(trim "$MASTER_IFACES")"
|
||||||
|
RAW_IFACES="$(trim "$RAW_IFACES")"
|
||||||
|
|
||||||
if [ -z "$IFACES" ]; then
|
if [ -z "$IFACES" ]; then
|
||||||
[ -e /tmp/net.ifaces ] && read IFACES < /tmp/net.ifaces
|
[ -e /tmp/net.ifaces ] && read IFACES < /tmp/net.ifaces
|
||||||
@@ -52,15 +66,14 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
ifup='/sbin/ifup $env{INTERFACE}'
|
ifup='/sbin/ifup $env{INTERFACE}'
|
||||||
[ -z "$netroot" ] && ifup="$ifup -m"
|
|
||||||
|
|
||||||
runcmd="RUN+=\"/sbin/initqueue --name ifup-\$env{INTERFACE} --unique --onetime $ifup\""
|
runcmd="RUN+=\"/sbin/initqueue --name ifup-\$env{INTERFACE} --unique --onetime $ifup\""
|
||||||
|
|
||||||
# We have some specific interfaces to handle
|
# We have some specific interfaces to handle
|
||||||
if [ -n "$IFACES" ]; then
|
if [ -n "${RAW_IFACES}${IFACES}" ]; then
|
||||||
echo 'SUBSYSTEM!="net", GOTO="net_end"'
|
echo 'SUBSYSTEM!="net", GOTO="net_end"'
|
||||||
echo 'ACTION!="add|change|move", GOTO="net_end"'
|
echo 'ACTION!="add|change|move", GOTO="net_end"'
|
||||||
for iface in $IFACES; do
|
for iface in $IFACES $RAW_IFACES; do
|
||||||
case "$iface" in
|
case "$iface" in
|
||||||
??:??:??:??:??:??) # MAC address
|
??:??:??:??:??:??) # MAC address
|
||||||
cond="ATTR{address}==\"$iface\""
|
cond="ATTR{address}==\"$iface\""
|
||||||
@@ -81,13 +94,7 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh
|
|||||||
done
|
done
|
||||||
echo 'LABEL="net_end"'
|
echo 'LABEL="net_end"'
|
||||||
|
|
||||||
if [ -n "$MASTER_IFACES" ]; then
|
for iface in $IFACES; do
|
||||||
wait_ifaces=$MASTER_IFACES
|
|
||||||
else
|
|
||||||
wait_ifaces=$IFACES
|
|
||||||
fi
|
|
||||||
|
|
||||||
for iface in $wait_ifaces; do
|
|
||||||
if [ "$bootdev" = "$iface" ] || [ "$NEEDNET" = "1" ]; then
|
if [ "$bootdev" = "$iface" ] || [ "$NEEDNET" = "1" ]; then
|
||||||
echo "[ -f /tmp/net.${iface}.did-setup ]" >$hookdir/initqueue/finished/wait-$iface.sh
|
echo "[ -f /tmp/net.${iface}.did-setup ]" >$hookdir/initqueue/finished/wait-$iface.sh
|
||||||
fi
|
fi
|
||||||
@@ -95,7 +102,7 @@ command -v fix_bootif >/dev/null || . /lib/net-lib.sh
|
|||||||
# Default: We don't know the interface to use, handle all
|
# Default: We don't know the interface to use, handle all
|
||||||
# Fixme: waiting for the interface as well.
|
# Fixme: waiting for the interface as well.
|
||||||
else
|
else
|
||||||
cond='ACTION=="add", SUBSYSTEM=="net"'
|
cond='ACTION=="add", SUBSYSTEM=="net", ENV{DEVTYPE}!="wlan|wwan"'
|
||||||
# if you change the name of "91-default-net.rules", also change modules.d/80cms/cmssetup.sh
|
# if you change the name of "91-default-net.rules", also change modules.d/80cms/cmssetup.sh
|
||||||
echo "$cond, $runcmd" > /etc/udev/rules.d/91-default-net.rules
|
echo "$cond, $runcmd" > /etc/udev/rules.d/91-default-net.rules
|
||||||
fi
|
fi
|
||||||
|
@@ -1,12 +1,23 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
||||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
is_ip() {
|
||||||
|
echo "$1" | {
|
||||||
|
IFS=. read a b c d
|
||||||
|
test "$a" -ge 0 -a "$a" -le 255 \
|
||||||
|
-a "$b" -ge 0 -a "$b" -le 255 \
|
||||||
|
-a "$c" -ge 0 -a "$c" -le 255 \
|
||||||
|
-a "$d" -ge 0 -a "$d" -le 255 \
|
||||||
|
2> /dev/null
|
||||||
|
} && return 0
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
get_ip() {
|
get_ip() {
|
||||||
local iface="$1" ip=""
|
local iface="$1" ip=""
|
||||||
ip=$(ip -o -f inet addr show $iface)
|
ip=$(ip -o -f inet addr show $iface)
|
||||||
ip=${ip%%/*}
|
ip=${ip%%/*}
|
||||||
ip=${ip##* }
|
ip=${ip##* }
|
||||||
|
echo $ip
|
||||||
}
|
}
|
||||||
|
|
||||||
iface_for_remote_addr() {
|
iface_for_remote_addr() {
|
||||||
@@ -62,6 +73,14 @@ all_ifaces_up() {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
all_ifaces_setup() {
|
||||||
|
local iface="" IFACES=""
|
||||||
|
[ -e "/tmp/net.ifaces" ] && read IFACES < /tmp/net.ifaces
|
||||||
|
for iface in $IFACES; do
|
||||||
|
[ -e /tmp/net.$iface.did-setup ] || return 1
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
get_netroot_ip() {
|
get_netroot_ip() {
|
||||||
local prefix="" server="" rest=""
|
local prefix="" server="" rest=""
|
||||||
splitsep "$1" ":" prefix server rest
|
splitsep "$1" ":" prefix server rest
|
||||||
@@ -82,26 +101,50 @@ ifdown() {
|
|||||||
ip addr flush dev $netif
|
ip addr flush dev $netif
|
||||||
echo "#empty" > /etc/resolv.conf
|
echo "#empty" > /etc/resolv.conf
|
||||||
rm -f -- /tmp/net.$netif.did-setup
|
rm -f -- /tmp/net.$netif.did-setup
|
||||||
[ -e /sys/class/net/$netif/address ] && \
|
[ -z "$DO_VLAN" ] && \
|
||||||
|
[ -e /sys/class/net/$netif/address ] && \
|
||||||
rm -f -- /tmp/net.$(cat /sys/class/net/$netif/address).did-setup
|
rm -f -- /tmp/net.$(cat /sys/class/net/$netif/address).did-setup
|
||||||
# TODO: send "offline" uevent?
|
# TODO: send "offline" uevent?
|
||||||
}
|
}
|
||||||
|
|
||||||
setup_net() {
|
setup_net() {
|
||||||
local netif="$1" f="" gw_ip="" netroot_ip="" iface="" IFACES=""
|
local netif="$1" f="" gw_ip="" netroot_ip="" iface="" IFACES=""
|
||||||
|
local _p
|
||||||
[ -e /tmp/net.$netif.did-setup ] && return
|
[ -e /tmp/net.$netif.did-setup ] && return
|
||||||
[ -e /sys/class/net/$netif/address ] && \
|
[ -z "$DO_VLAN" ] && \
|
||||||
|
[ -e /sys/class/net/$netif/address ] && \
|
||||||
[ -e /tmp/net.$(cat /sys/class/net/$netif/address).did-setup ] && return
|
[ -e /tmp/net.$(cat /sys/class/net/$netif/address).did-setup ] && return
|
||||||
[ -e "/tmp/net.ifaces" ] && read IFACES < /tmp/net.ifaces
|
[ -e "/tmp/net.ifaces" ] && read IFACES < /tmp/net.ifaces
|
||||||
[ -z "$IFACES" ] && IFACES="$netif"
|
[ -z "$IFACES" ] && IFACES="$netif"
|
||||||
# run the scripts written by ifup
|
# run the scripts written by ifup
|
||||||
[ -e /tmp/net.$netif.gw ] && . /tmp/net.$netif.gw
|
|
||||||
[ -e /tmp/net.$netif.hostname ] && . /tmp/net.$netif.hostname
|
[ -e /tmp/net.$netif.hostname ] && . /tmp/net.$netif.hostname
|
||||||
[ -e /tmp/net.$netif.override ] && . /tmp/net.$netif.override
|
[ -e /tmp/net.$netif.override ] && . /tmp/net.$netif.override
|
||||||
[ -e /tmp/dhclient.$netif.dhcpopts ] && . /tmp/dhclient.$netif.dhcpopts
|
[ -e /tmp/dhclient.$netif.dhcpopts ] && . /tmp/dhclient.$netif.dhcpopts
|
||||||
# set up resolv.conf
|
# set up resolv.conf
|
||||||
[ -e /tmp/net.$netif.resolv.conf ] && \
|
[ -e /tmp/net.$netif.resolv.conf ] && \
|
||||||
cp -f /tmp/net.$netif.resolv.conf /etc/resolv.conf
|
awk '!array[$0]++' /tmp/net.$netif.resolv.conf > /etc/resolv.conf
|
||||||
|
[ -e /tmp/net.$netif.gw ] && . /tmp/net.$netif.gw
|
||||||
|
|
||||||
|
# add static route
|
||||||
|
for _p in $(getargs rd.route); do
|
||||||
|
route_to_var "$_p" || continue
|
||||||
|
[ -n "$route_dev" ] && [ "$route_dev" != "$netif" ] && continue
|
||||||
|
ip route add "$route_mask" ${route_gw:+via "$route_gw"} ${route_dev:+dev "$route_dev"}
|
||||||
|
if strstr "$route_mask" ":"; then
|
||||||
|
printf -- "%s\n" "$route_mask ${route_gw:+via $route_gw} ${route_dev:+dev $route_dev}" \
|
||||||
|
> /tmp/net.route6."$netif"
|
||||||
|
else
|
||||||
|
printf -- "%s\n" "$route_mask ${route_gw:+via $route_gw} ${route_dev:+dev $route_dev}" \
|
||||||
|
> /tmp/net.route."$netif"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# If a static route was necessary to reach the gateway, the
|
||||||
|
# first gateway setup call will have failed with
|
||||||
|
# RTNETLINK answers: Network is unreachable
|
||||||
|
# Replace the default route again after static routes to cover
|
||||||
|
# this scenario.
|
||||||
|
[ -e /tmp/net.$netif.gw ] && . /tmp/net.$netif.gw
|
||||||
|
|
||||||
# Handle STP Timeout: arping the default gateway.
|
# Handle STP Timeout: arping the default gateway.
|
||||||
# (or the root server, if a) it's local or b) there's no gateway.)
|
# (or the root server, if a) it's local or b) there's no gateway.)
|
||||||
@@ -128,12 +171,17 @@ setup_net() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$layer2" != "0" ] && [ -n "$dest" ] && ! strstr "$dest" ":"; then
|
if [ "$layer2" != "0" ] && [ -n "$dest" ] && ! strstr "$dest" ":"; then
|
||||||
arping -q -f -w 60 -I $netif $dest || info "Resolving $dest via ARP on $netif failed"
|
if command -v arping2 >/dev/null; then
|
||||||
|
arping2 -q -C 1 -c 60 -I $netif $dest || info "Resolving $dest via ARP on $netif failed"
|
||||||
|
else
|
||||||
|
arping -q -f -w 60 -I $netif $dest || info "Resolving $dest via ARP on $netif failed"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
unset layer2
|
unset layer2
|
||||||
|
|
||||||
> /tmp/net.$netif.did-setup
|
> /tmp/net.$netif.did-setup
|
||||||
[ -e /sys/class/net/$netif/address ] && \
|
[ -z "$DO_VLAN" ] && \
|
||||||
|
[ -e /sys/class/net/$netif/address ] && \
|
||||||
> /tmp/net.$(cat /sys/class/net/$netif/address).did-setup
|
> /tmp/net.$(cat /sys/class/net/$netif/address).did-setup
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -176,7 +224,7 @@ set_ifname() {
|
|||||||
fix_bootif() {
|
fix_bootif() {
|
||||||
local macaddr=${1}
|
local macaddr=${1}
|
||||||
local IFS='-'
|
local IFS='-'
|
||||||
macaddr=$(for i in ${macaddr} ; do echo -n $i:; done)
|
macaddr=$(printf '%s:' ${macaddr})
|
||||||
macaddr=${macaddr%:}
|
macaddr=${macaddr%:}
|
||||||
# strip hardware type field from pxelinux
|
# strip hardware type field from pxelinux
|
||||||
[ -n "${macaddr%??:??:??:??:??:??}" ] && macaddr=${macaddr#??:}
|
[ -n "${macaddr%??:??:??:??:??:??}" ] && macaddr=${macaddr#??:}
|
||||||
@@ -200,20 +248,55 @@ ibft_to_cmdline() {
|
|||||||
|
|
||||||
[ -e /tmp/net.${dev}.has_ibft_config ] && continue
|
[ -e /tmp/net.${dev}.has_ibft_config ] && continue
|
||||||
|
|
||||||
|
[ -e ${iface}/flags ] && flags=$(read a < ${iface}/flags; echo $a)
|
||||||
|
# Skip invalid interfaces
|
||||||
|
(( $flags & 1 )) || continue
|
||||||
|
# Skip interfaces not used for booting
|
||||||
|
(( $flags & 2 )) || continue
|
||||||
[ -e ${iface}/dhcp ] && dhcp=$(read a < ${iface}/dhcp; echo $a)
|
[ -e ${iface}/dhcp ] && dhcp=$(read a < ${iface}/dhcp; echo $a)
|
||||||
|
[ -e ${iface}/origin ] && origin=$(read a < ${iface}/origin; echo $a)
|
||||||
|
[ -e ${iface}/ip-addr ] && ip=$(read a < ${iface}/ip-addr; echo $a)
|
||||||
|
|
||||||
if [ -n "$dhcp" ]; then
|
if [ -n "$ip" ] ; then
|
||||||
echo "ip=$dev:dhcp"
|
case "$ip" in
|
||||||
|
*.*.*.*)
|
||||||
|
family=ipv4
|
||||||
|
;;
|
||||||
|
*:*)
|
||||||
|
family=ipv6
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
if [ -n "$dhcp" ] || [ "$origin" -eq 3 ]; then
|
||||||
|
if [ "$family" = "ipv6" ] ; then
|
||||||
|
echo "ip=$dev:dhcp6"
|
||||||
|
else
|
||||||
|
echo "ip=$dev:dhcp"
|
||||||
|
fi
|
||||||
elif [ -e ${iface}/ip-addr ]; then
|
elif [ -e ${iface}/ip-addr ]; then
|
||||||
[ -e ${iface}/ip-addr ] && ip=$(read a < ${iface}/ip-addr; echo $a)
|
|
||||||
# skip not assigned ip adresses
|
# skip not assigned ip adresses
|
||||||
[ "$ip" = "0.0.0.0" ] && continue
|
[ "$ip" = "0.0.0.0" ] && continue
|
||||||
[ -e ${iface}/gateway ] && gw=$(read a < ${iface}/gateway; echo $a)
|
[ -e ${iface}/gateway ] && gw=$(read a < ${iface}/gateway; echo $a)
|
||||||
|
[ "$gateway" = "0.0.0.0" ] && unset $gateway
|
||||||
[ -e ${iface}/subnet-mask ] && mask=$(read a < ${iface}/subnet-mask; echo $a)
|
[ -e ${iface}/subnet-mask ] && mask=$(read a < ${iface}/subnet-mask; echo $a)
|
||||||
|
[ -e ${iface}/prefix-len ] && prefix=$(read a < ${iface}/prefix-len; echo $a)
|
||||||
[ -e ${iface}/primary-dns ] && dns1=$(read a < ${iface}/primary-dns; echo $a)
|
[ -e ${iface}/primary-dns ] && dns1=$(read a < ${iface}/primary-dns; echo $a)
|
||||||
|
[ "$dns1" = "0.0.0.0" ] && unset $dns1
|
||||||
[ -e ${iface}/secondary-dns ] && dns2=$(read a < ${iface}/secondary-dns; echo $a)
|
[ -e ${iface}/secondary-dns ] && dns2=$(read a < ${iface}/secondary-dns; echo $a)
|
||||||
|
[ "$dns2" = "0.0.0.0" ] && unset $dns2
|
||||||
[ -e ${iface}/hostname ] && hostname=$(read a < ${iface}/hostname; echo $a)
|
[ -e ${iface}/hostname ] && hostname=$(read a < ${iface}/hostname; echo $a)
|
||||||
if [ -n "$ip" ] && [ -n "$mask" ]; then
|
if [ "$family" = "ipv6" ] ; then
|
||||||
|
if [ -n "$ip" ] ; then
|
||||||
|
ip="[$ip]"
|
||||||
|
[ -n "$prefix" ] || prefix=64
|
||||||
|
ip="[${ip}/${prefix}]"
|
||||||
|
mask=
|
||||||
|
fi
|
||||||
|
if [ -n "$gw" ] ; then
|
||||||
|
gw="[${gw}]"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [ -n "$ip" ] && [ -n "$mask" -o -n "$prefix" ]; then
|
||||||
echo "ip=$ip::$gw:$mask:$hostname:$dev:none${dns1:+:$dns1}${dns2:+:$dns2}"
|
echo "ip=$ip::$gw:$mask:$hostname:$dev:none${dns1:+:$dns1}${dns2:+:$dns2}"
|
||||||
else
|
else
|
||||||
warn "${iface} does not contain a valid iBFT configuration"
|
warn "${iface} does not contain a valid iBFT configuration"
|
||||||
@@ -228,20 +311,25 @@ ibft_to_cmdline() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -e ${iface}/vlan ]; then
|
if [ -e ${iface}/vlan ]; then
|
||||||
vlan=$(read a < ${iface}/vlan; echo $a)
|
vlan=$(read a < ${iface}/vlan; echo $a)
|
||||||
if [ "$vlan" -ne "0" ]; then
|
if [ "$vlan" -ne "0" ]; then
|
||||||
case "$vlan" in
|
case "$vlan" in
|
||||||
[0-9]*)
|
[0-9]*)
|
||||||
echo "vlan=$dev.$vlan:$dev"
|
echo "vlan=$dev.$vlan:$dev"
|
||||||
;;
|
echo $mac > /tmp/net.${dev}.${vlan}.has_ibft_config
|
||||||
*)
|
;;
|
||||||
echo "vlan=$vlan:$dev"
|
*)
|
||||||
;;
|
echo "vlan=$vlan:$dev"
|
||||||
esac
|
echo $mac > /tmp/net.${vlan}.has_ibft_config
|
||||||
fi
|
;;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
echo $mac > /tmp/net.${dev}.has_ibft_config
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo $mac > /tmp/net.${dev}.has_ibft_config
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo $mac > /tmp/net.${dev}.has_ibft_config
|
|
||||||
done
|
done
|
||||||
) >> /etc/cmdline.d/40-ibft.conf
|
) >> /etc/cmdline.d/40-ibft.conf
|
||||||
}
|
}
|
||||||
@@ -251,66 +339,63 @@ parse_iscsi_root()
|
|||||||
local v
|
local v
|
||||||
v=${1#iscsi:}
|
v=${1#iscsi:}
|
||||||
|
|
||||||
# extract authentication info
|
# extract authentication info
|
||||||
case "$v" in
|
case "$v" in
|
||||||
*@*:*:*:*:*)
|
*@*:*:*:*:*)
|
||||||
authinfo=${v%%@*}
|
authinfo=${v%%@*}
|
||||||
v=${v#*@}
|
v=${v#*@}
|
||||||
# allow empty authinfo to allow having an @ in iscsi_target_name like this:
|
# allow empty authinfo to allow having an @ in iscsi_target_name like this:
|
||||||
# netroot=iscsi:@192.168.1.100::3260::iqn.2009-01.com.example:testdi@sk
|
# netroot=iscsi:@192.168.1.100::3260::iqn.2009-01.com.example:testdi@sk
|
||||||
if [ -n "$authinfo" ]; then
|
if [ -n "$authinfo" ]; then
|
||||||
OLDIFS="$IFS"
|
OLDIFS="$IFS"
|
||||||
IFS=:
|
IFS=:
|
||||||
set $authinfo
|
set $authinfo
|
||||||
IFS="$OLDIFS"
|
IFS="$OLDIFS"
|
||||||
if [ $# -gt 4 ]; then
|
if [ $# -gt 4 ]; then
|
||||||
warn "Wrong authentication info in iscsi: parameter!"
|
warn "Wrong authentication info in iscsi: parameter!"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
iscsi_username=$1
|
iscsi_username=$1
|
||||||
iscsi_password=$2
|
iscsi_password=$2
|
||||||
if [ $# -gt 2 ]; then
|
if [ $# -gt 2 ]; then
|
||||||
iscsi_in_username=$3
|
iscsi_in_username=$3
|
||||||
iscsi_in_password=$4
|
iscsi_in_password=$4
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# extract target ip
|
# extract target ip
|
||||||
case "$v" in
|
case "$v" in
|
||||||
[[]*[]]:*)
|
[[]*[]]:*)
|
||||||
iscsi_target_ip=${v#[[]}
|
iscsi_target_ip=${v#[[]}
|
||||||
iscsi_target_ip=${iscsi_target_ip%%[]]*}
|
iscsi_target_ip=${iscsi_target_ip%%[]]*}
|
||||||
v=${v#[[]$iscsi_target_ip[]]:}
|
v=${v#[[]$iscsi_target_ip[]]:}
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
iscsi_target_ip=${v%%[:]*}
|
iscsi_target_ip=${v%%[:]*}
|
||||||
v=${v#$iscsi_target_ip:}
|
v=${v#$iscsi_target_ip:}
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# extract target name
|
unset iscsi_target_name
|
||||||
|
# extract target name
|
||||||
case "$v" in
|
case "$v" in
|
||||||
*:iqn.*)
|
*:iqn.*)
|
||||||
iscsi_target_name=iqn.${v##*:iqn.}
|
iscsi_target_name=iqn.${v##*:iqn.}
|
||||||
v=${v%:iqn.*}:
|
v=${v%:iqn.*}:
|
||||||
;;
|
;;
|
||||||
*:eui.*)
|
*:eui.*)
|
||||||
iscsi_target_name=iqn.${v##*:eui.}
|
iscsi_target_name=eui.${v##*:eui.}
|
||||||
v=${v%:iqn.*}:
|
v=${v%:eui.*}:
|
||||||
;;
|
;;
|
||||||
*:naa.*)
|
*:naa.*)
|
||||||
iscsi_target_name=iqn.${v##*:naa.}
|
iscsi_target_name=naa.${v##*:naa.}
|
||||||
v=${v%:iqn.*}:
|
v=${v%:naa.*}:
|
||||||
;;
|
;;
|
||||||
*)
|
|
||||||
warn "Invalid iscii target name, should begin with 'iqn.' or 'eui.' or 'naa.'"
|
|
||||||
return 1
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# parse the rest
|
# parse the rest
|
||||||
OLDIFS="$IFS"
|
OLDIFS="$IFS"
|
||||||
IFS=:
|
IFS=:
|
||||||
set $v
|
set $v
|
||||||
@@ -318,17 +403,34 @@ parse_iscsi_root()
|
|||||||
|
|
||||||
iscsi_protocol=$1; shift # ignored
|
iscsi_protocol=$1; shift # ignored
|
||||||
iscsi_target_port=$1; shift
|
iscsi_target_port=$1; shift
|
||||||
if [ $# -eq 3 ]; then
|
|
||||||
iscsi_iface_name=$1; shift
|
if [ -n "$iscsi_target_name" ]; then
|
||||||
|
if [ $# -eq 3 ]; then
|
||||||
|
iscsi_iface_name=$1; shift
|
||||||
|
fi
|
||||||
|
if [ $# -eq 2 ]; then
|
||||||
|
iscsi_netdev_name=$1; shift
|
||||||
|
fi
|
||||||
|
iscsi_lun=$1; shift
|
||||||
|
if [ $# -ne 0 ]; then
|
||||||
|
warn "Invalid parameter in iscsi: parameter!"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
return 0
|
||||||
fi
|
fi
|
||||||
if [ $# -eq 2 ]; then
|
|
||||||
iscsi_netdev_name=$1; shift
|
|
||||||
|
if [ $# -gt 3 ] && [ -n "$1$2" ]; then
|
||||||
|
if [ -z "$3" ] || [ "$3" -ge 0 ] 2>/dev/null ; then
|
||||||
|
iscsi_iface_name=$1; shift
|
||||||
|
iscsi_netdev_name=$1; shift
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
iscsi_lun=$1; shift
|
iscsi_lun=$1; shift
|
||||||
if [ $# -ne 0 ]; then
|
|
||||||
warn "Invalid parameter in iscsi: parameter!"
|
iscsi_target_name=$(printf "%s:" "$@")
|
||||||
return 1
|
iscsi_target_name=${iscsi_target_name%:}
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ip_to_var() {
|
ip_to_var() {
|
||||||
@@ -349,50 +451,111 @@ ip_to_var() {
|
|||||||
done
|
done
|
||||||
|
|
||||||
unset ip srv gw mask hostname dev autoconf macaddr mtu dns1 dns2
|
unset ip srv gw mask hostname dev autoconf macaddr mtu dns1 dns2
|
||||||
case $# in
|
|
||||||
0) autoconf="error" ;;
|
|
||||||
1) autoconf=$1 ;;
|
|
||||||
2) [ -n "$1" ] && dev=$1; [ -n "$2" ] && autoconf=$2 ;;
|
|
||||||
3) [ -n "$1" ] && dev=$1; [ -n "$2" ] && autoconf=$2; [ -n "$3" ] && mtu=$3 ;;
|
|
||||||
4) [ -n "$1" ] && dev=$1; [ -n "$2" ] && autoconf=$2; [ -n "$3" ] && mtu=$3; [ -n "$4" ] && macaddr=$4 ;;
|
|
||||||
*) [ -n "$1" ] && ip=$1; [ -n "$2" ] && srv=$2; [ -n "$3" ] && gw=$3; [ -n "$4" ] && mask=$4;
|
|
||||||
[ -n "$5" ] && hostname=$5; [ -n "$6" ] && dev=$6; [ -n "$7" ] && autoconf=$7;
|
|
||||||
case "$8" in
|
|
||||||
[0-9]*:*|[0-9]*.[0-9]*.[0-9]*.[0-9]*)
|
|
||||||
dns1="$8"
|
|
||||||
[ -n "$9" ] && dns2="$9"
|
|
||||||
;;
|
|
||||||
[0-9]*)
|
|
||||||
mtu="$8"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
if [ -n "${9}" -a -n "${10}" -a -n "${11}" -a -n "${12}" -a -n "${13}" -a -n "${14}" ]; then
|
|
||||||
macaddr="${9}:${10}:${11}:${12}:${13}:${14}"
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# ip=<ipv4-address> means anaconda-style static config argument cluster:
|
if [ $# -eq 0 ]; then
|
||||||
# ip=<ip> gateway=<gw> netmask=<nm> hostname=<host> mtu=<mtu>
|
autoconf="error"
|
||||||
# ksdevice={link|bootif|ibft|<MAC>|<ifname>}
|
return 0
|
||||||
if strstr "$autoconf" "*.*.*.*"; then
|
|
||||||
ip="$autoconf"
|
|
||||||
gw=$(getarg gateway=)
|
|
||||||
mask=$(getarg netmask=)
|
|
||||||
hostname=$(getarg hostname=)
|
|
||||||
dev=$(getarg ksdevice=)
|
|
||||||
autoconf="none"
|
|
||||||
mtu=$(getarg mtu=)
|
|
||||||
|
|
||||||
# handle special values for ksdevice
|
|
||||||
case "$dev" in
|
|
||||||
bootif|BOOTIF) dev=$(fix_bootif $(getarg BOOTIF=)) ;;
|
|
||||||
link) dev="" ;; # FIXME: do something useful with this
|
|
||||||
ibft) dev="" ;; # ignore - ibft is handled elsewhere
|
|
||||||
esac
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ $# -eq 1 ]; then
|
||||||
|
# format: ip={dhcp|on|any|dhcp6|auto6}
|
||||||
|
# or
|
||||||
|
# ip=<ipv4-address> means anaconda-style static config argument cluster
|
||||||
|
autoconf="$1"
|
||||||
|
|
||||||
|
if strstr "$autoconf" "*.*.*.*"; then
|
||||||
|
# ip=<ipv4-address> means anaconda-style static config argument cluster:
|
||||||
|
# ip=<ip> gateway=<gw> netmask=<nm> hostname=<host> mtu=<mtu>
|
||||||
|
# ksdevice={link|bootif|ibft|<MAC>|<ifname>}
|
||||||
|
ip="$autoconf"
|
||||||
|
gw=$(getarg gateway=)
|
||||||
|
mask=$(getarg netmask=)
|
||||||
|
hostname=$(getarg hostname=)
|
||||||
|
dev=$(getarg ksdevice=)
|
||||||
|
autoconf="none"
|
||||||
|
mtu=$(getarg mtu=)
|
||||||
|
|
||||||
|
# handle special values for ksdevice
|
||||||
|
case "$dev" in
|
||||||
|
bootif|BOOTIF) dev=$(fix_bootif $(getarg BOOTIF=)) ;;
|
||||||
|
link) dev="" ;; # FIXME: do something useful with this
|
||||||
|
ibft) dev="" ;; # ignore - ibft is handled elsewhere
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$2" = "dhcp" -o "$2" = "on" -o "$2" = "any" -o "$2" = "dhcp6" -o "$2" = "auto6" ]; then
|
||||||
|
# format: ip=<interface>:{dhcp|on|any|dhcp6|auto6}[:[<mtu>][:<macaddr>]]
|
||||||
|
[ -n "$1" ] && dev="$1"
|
||||||
|
[ -n "$2" ] && autoconf="$2"
|
||||||
|
[ -n "$3" ] && mtu=$3
|
||||||
|
if [ -z "$5" ]; then
|
||||||
|
macaddr="$4"
|
||||||
|
else
|
||||||
|
macaddr="${4}:${5}:${6}:${7}:${8}:${9}"
|
||||||
|
fi
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# format: ip=<client-IP>:[<peer>]:<gateway-IP>:<netmask>:<client_hostname>:<interface>:{none|off|dhcp|on|any|dhcp6|auto6|ibft}:[:[<mtu>][:<macaddr>]]
|
||||||
|
|
||||||
|
[ -n "$1" ] && ip=$1
|
||||||
|
[ -n "$2" ] && srv=$2
|
||||||
|
[ -n "$3" ] && gw=$3
|
||||||
|
[ -n "$4" ] && mask=$4
|
||||||
|
[ -n "$5" ] && hostname=$5
|
||||||
|
[ -n "$6" ] && dev=$6
|
||||||
|
[ -n "$7" ] && autoconf=$7
|
||||||
|
case "$8" in
|
||||||
|
[0-9]*:*|[0-9]*.[0-9]*.[0-9]*.[0-9]*)
|
||||||
|
dns1="$8"
|
||||||
|
[ -n "$9" ] && dns2="$9"
|
||||||
|
;;
|
||||||
|
[0-9]*)
|
||||||
|
mtu="$8"
|
||||||
|
if [ -n "${9}" -a -z "${10}" ]; then
|
||||||
|
macaddr="${9}"
|
||||||
|
elif [ -n "${9}" -a -n "${10}" -a -n "${11}" -a -n "${12}" -a -n "${13}" -a -n "${14}" ]; then
|
||||||
|
macaddr="${9}:${10}:${11}:${12}:${13}:${14}"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
if [ -n "${9}" -a -z "${10}" ]; then
|
||||||
|
macaddr="${9}"
|
||||||
|
elif [ -n "${9}" -a -n "${10}" -a -n "${11}" -a -n "${12}" -a -n "${13}" -a -n "${14}" ]; then
|
||||||
|
macaddr="${9}:${10}:${11}:${12}:${13}:${14}"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
route_to_var() {
|
||||||
|
local v=${1}:
|
||||||
|
local i
|
||||||
|
set --
|
||||||
|
while [ -n "$v" ]; do
|
||||||
|
if [ "${v#\[*:*:*\]:}" != "$v" ]; then
|
||||||
|
# handle IPv6 address
|
||||||
|
i="${v%%\]:*}"
|
||||||
|
i="${i##\[}"
|
||||||
|
set -- "$@" "$i"
|
||||||
|
v=${v#\[$i\]:}
|
||||||
|
else
|
||||||
|
set -- "$@" "${v%%:*}"
|
||||||
|
v=${v#*:}
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
unset route_mask route_gw route_dev
|
||||||
|
case $# in
|
||||||
|
2) [ -n "$1" ] && route_mask="$1"; [ -n "$2" ] && route_gw="$2"
|
||||||
|
return 0;;
|
||||||
|
3) [ -n "$1" ] && route_mask="$1"; [ -n "$2" ] && route_gw="$2"; [ -n "$3" ] && route_dev="$3"
|
||||||
|
return 0;;
|
||||||
|
*) return 1;;
|
||||||
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
parse_ifname_opts() {
|
parse_ifname_opts() {
|
||||||
@@ -425,7 +588,11 @@ parse_ifname_opts() {
|
|||||||
wait_for_if_link() {
|
wait_for_if_link() {
|
||||||
local cnt=0
|
local cnt=0
|
||||||
local li
|
local li
|
||||||
while [ $cnt -lt 600 ]; do
|
local timeout="$(getargs rd.net.timeout.iflink=)"
|
||||||
|
timeout=${timeout:-60}
|
||||||
|
timeout=$(($timeout*10))
|
||||||
|
|
||||||
|
while [ $cnt -lt $timeout ]; do
|
||||||
li=$(ip -o link show dev $1 2>/dev/null)
|
li=$(ip -o link show dev $1 2>/dev/null)
|
||||||
[ -n "$li" ] && return 0
|
[ -n "$li" ] && return 0
|
||||||
sleep 0.1
|
sleep 0.1
|
||||||
@@ -437,9 +604,27 @@ wait_for_if_link() {
|
|||||||
wait_for_if_up() {
|
wait_for_if_up() {
|
||||||
local cnt=0
|
local cnt=0
|
||||||
local li
|
local li
|
||||||
while [ $cnt -lt 200 ]; do
|
local timeout="$(getargs rd.net.timeout.ifup=)"
|
||||||
|
timeout=${timeout:-20}
|
||||||
|
timeout=$(($timeout*10))
|
||||||
|
|
||||||
|
while [ $cnt -lt $timeout ]; do
|
||||||
li=$(ip -o link show up dev $1)
|
li=$(ip -o link show up dev $1)
|
||||||
[ -n "$li" ] && [ -z "${li##*state UP*}" ] && return 0
|
if [ -n "$li" ]; then
|
||||||
|
case "$li" in
|
||||||
|
*\<UP*)
|
||||||
|
return 0;;
|
||||||
|
*\<*,UP\>*)
|
||||||
|
return 0;;
|
||||||
|
*\<*,UP,*\>*)
|
||||||
|
return 0;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
if strstr "$li" "LOWER_UP" \
|
||||||
|
&& strstr "$li" "state UNKNOWN" \
|
||||||
|
&& ! strstr "$li" "DORMANT"; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
sleep 0.1
|
sleep 0.1
|
||||||
cnt=$(($cnt+1))
|
cnt=$(($cnt+1))
|
||||||
done
|
done
|
||||||
@@ -448,7 +633,11 @@ wait_for_if_up() {
|
|||||||
|
|
||||||
wait_for_route_ok() {
|
wait_for_route_ok() {
|
||||||
local cnt=0
|
local cnt=0
|
||||||
while [ $cnt -lt 200 ]; do
|
local timeout="$(getargs rd.net.timeout.route=)"
|
||||||
|
timeout=${timeout:-20}
|
||||||
|
timeout=$(($timeout*10))
|
||||||
|
|
||||||
|
while [ $cnt -lt $timeout ]; do
|
||||||
li=$(ip route show)
|
li=$(ip route show)
|
||||||
[ -n "$li" ] && [ -z "${li##*$1*}" ] && return 0
|
[ -n "$li" ] && [ -z "${li##*$1*}" ] && return 0
|
||||||
sleep 0.1
|
sleep 0.1
|
||||||
@@ -457,12 +646,36 @@ wait_for_route_ok() {
|
|||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wait_for_ipv6_dad_link() {
|
||||||
|
local cnt=0
|
||||||
|
local timeout="$(getargs rd.net.timeout.ipv6dad=)"
|
||||||
|
timeout=${timeout:-50}
|
||||||
|
timeout=$(($timeout*10))
|
||||||
|
|
||||||
|
while [ $cnt -lt $timeout ]; do
|
||||||
|
[ -z "$(ip -6 addr show dev "$1" scope link tentative)" ] \
|
||||||
|
&& [ -n "$(ip -6 route list proto ra dev "$1" | grep ^default)" ] \
|
||||||
|
&& return 0
|
||||||
|
[ -n "$(ip -6 addr show dev "$1" scope link dadfailed)" ] \
|
||||||
|
&& return 1
|
||||||
|
sleep 0.1
|
||||||
|
cnt=$(($cnt+1))
|
||||||
|
done
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
wait_for_ipv6_dad() {
|
wait_for_ipv6_dad() {
|
||||||
local cnt=0
|
local cnt=0
|
||||||
local li
|
local timeout="$(getargs rd.net.timeout.ipv6dad=)"
|
||||||
while [ $cnt -lt 500 ]; do
|
timeout=${timeout:-50}
|
||||||
li=$(ip -6 addr show dev $1)
|
timeout=$(($timeout*10))
|
||||||
strstr "$li" "tentative" || return 0
|
|
||||||
|
while [ $cnt -lt $timeout ]; do
|
||||||
|
[ -z "$(ip -6 addr show dev "$1" tentative)" ] \
|
||||||
|
&& [ -n "$(ip -6 route list proto ra dev "$1" | grep ^default)" ] \
|
||||||
|
&& return 0
|
||||||
|
[ -n "$(ip -6 addr show dev "$1" dadfailed)" ] \
|
||||||
|
&& return 1
|
||||||
sleep 0.1
|
sleep 0.1
|
||||||
cnt=$(($cnt+1))
|
cnt=$(($cnt+1))
|
||||||
done
|
done
|
||||||
@@ -471,12 +684,14 @@ wait_for_ipv6_dad() {
|
|||||||
|
|
||||||
wait_for_ipv6_auto() {
|
wait_for_ipv6_auto() {
|
||||||
local cnt=0
|
local cnt=0
|
||||||
local li
|
local timeout="$(getargs rd.net.timeout.ipv6auto=)"
|
||||||
while [ $cnt -lt 400 ]; do
|
timeout=${timeout:-40}
|
||||||
li=$(ip -6 addr show dev $1)
|
timeout=$(($timeout*10))
|
||||||
if ! strstr "$li" "tentative"; then
|
|
||||||
strstr "$li" "dynamic" && return 0
|
while [ $cnt -lt $timeout ]; do
|
||||||
fi
|
[ -z "$(ip -6 addr show dev "$1" tentative)" ] \
|
||||||
|
&& [ -n "$(ip -6 route list proto ra dev "$1" | grep ^default)" ] \
|
||||||
|
&& return 0
|
||||||
sleep 0.1
|
sleep 0.1
|
||||||
cnt=$(($cnt+1))
|
cnt=$(($cnt+1))
|
||||||
done
|
done
|
||||||
@@ -490,18 +705,40 @@ linkup() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type hostname >/dev/null 2>&1 || \
|
type hostname >/dev/null 2>&1 || \
|
||||||
hostname() {
|
hostname() {
|
||||||
cat /proc/sys/kernel/hostname
|
cat /proc/sys/kernel/hostname
|
||||||
}
|
}
|
||||||
|
|
||||||
iface_has_link() {
|
iface_has_carrier() {
|
||||||
|
local cnt=0
|
||||||
local interface="$1" flags=""
|
local interface="$1" flags=""
|
||||||
[ -n "$interface" ] || return 2
|
[ -n "$interface" ] || return 2
|
||||||
interface="/sys/class/net/$interface"
|
interface="/sys/class/net/$interface"
|
||||||
[ -d "$interface" ] || return 2
|
[ -d "$interface" ] || return 2
|
||||||
|
local timeout="$(getargs rd.net.timeout.carrier=)"
|
||||||
|
timeout=${timeout:-5}
|
||||||
|
timeout=$(($timeout*10))
|
||||||
|
|
||||||
linkup "$1"
|
linkup "$1"
|
||||||
[ "$(cat $interface/carrier)" = 1 ] || return 1
|
|
||||||
# XXX Do we need to reset the flags here? anaconda never bothered..
|
li=$(ip -o link show up dev $1)
|
||||||
|
strstr "$li" "NO-CARRIER" && _no_carrier_flag=1
|
||||||
|
|
||||||
|
while [ $cnt -lt $timeout ]; do
|
||||||
|
if [ -n "$_no_carrier_flag" ]; then
|
||||||
|
# NO-CARRIER flag was cleared
|
||||||
|
strstr "$li" "NO-CARRIER" || return 0
|
||||||
|
fi
|
||||||
|
# double check the syscfs carrier flag
|
||||||
|
[ -e "$interface/carrier" ] && [ "$(cat $interface/carrier)" = 1 ] && return 0
|
||||||
|
sleep 0.1
|
||||||
|
cnt=$(($cnt+1))
|
||||||
|
done
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
iface_has_link() {
|
||||||
|
iface_has_carrier "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
find_iface_with_link() {
|
find_iface_with_link() {
|
||||||
@@ -516,3 +753,87 @@ find_iface_with_link() {
|
|||||||
done
|
done
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
is_persistent_ethernet_name() {
|
||||||
|
local _netif="$1"
|
||||||
|
local _name_assign_type="0"
|
||||||
|
|
||||||
|
[ -f "/sys/class/net/$_netif/name_assign_type" ] \
|
||||||
|
&& _name_assign_type=$(cat "/sys/class/net/$_netif/name_assign_type")
|
||||||
|
|
||||||
|
# NET_NAME_ENUM 1
|
||||||
|
[ "$_name_assign_type" = "1" ] && return 1
|
||||||
|
|
||||||
|
# NET_NAME_PREDICTABLE 2
|
||||||
|
[ "$_name_assign_type" = "2" ] && return 0
|
||||||
|
|
||||||
|
case "$_netif" in
|
||||||
|
# udev persistent interface names
|
||||||
|
eno[0-9]|eno[0-9][0-9]|eno[0-9][0-9][0-9]*)
|
||||||
|
;;
|
||||||
|
ens[0-9]|ens[0-9][0-9]|ens[0-9][0-9][0-9]*)
|
||||||
|
;;
|
||||||
|
enp[0-9]s[0-9]*|enp[0-9][0-9]s[0-9]*|enp[0-9][0-9][0-9]*s[0-9]*)
|
||||||
|
;;
|
||||||
|
enP*p[0-9]s[0-9]*|enP*p[0-9][0-9]s[0-9]*|enP*p[0-9][0-9][0-9]*s[0-9]*)
|
||||||
|
;;
|
||||||
|
# biosdevname
|
||||||
|
em[0-9]|em[0-9][0-9]|em[0-9][0-9][0-9]*)
|
||||||
|
;;
|
||||||
|
p[0-9]p[0-9]*|p[0-9][0-9]p[0-9]*|p[0-9][0-9][0-9]*p[0-9]*)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
return 1
|
||||||
|
esac
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
is_kernel_ethernet_name() {
|
||||||
|
local _netif="$1"
|
||||||
|
local _name_assign_type="1"
|
||||||
|
|
||||||
|
if [ -e "/sys/class/net/$_netif/name_assign_type" ]; then
|
||||||
|
_name_assign_type=$(cat "/sys/class/net/$_netif/name_assign_type")
|
||||||
|
|
||||||
|
case "$_name_assign_type" in
|
||||||
|
2|3|4)
|
||||||
|
# NET_NAME_PREDICTABLE 2
|
||||||
|
# NET_NAME_USER 3
|
||||||
|
# NET_NAME_RENAMED 4
|
||||||
|
return 1
|
||||||
|
;;
|
||||||
|
1|*)
|
||||||
|
# NET_NAME_ENUM 1
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
# fallback to error prone manual name check
|
||||||
|
case "$_netif" in
|
||||||
|
eth[0-9]|eth[0-9][0-9]|eth[0-9][0-9][0-9]*)
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
return 1
|
||||||
|
esac
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
iface_get_subchannels() {
|
||||||
|
local _netif
|
||||||
|
local _subchannels
|
||||||
|
|
||||||
|
_netif="$1"
|
||||||
|
|
||||||
|
_subchannels=$({
|
||||||
|
for i in /sys/class/net/$_netif/device/cdev[0-9]*; do
|
||||||
|
[ -e $i ] || continue
|
||||||
|
channel=$(readlink -f $i)
|
||||||
|
printf -- "%s" "${channel##*/},"
|
||||||
|
done
|
||||||
|
})
|
||||||
|
[ -n "$_subchannels" ] || return 1
|
||||||
|
|
||||||
|
printf -- "%s" ${_subchannels%,}
|
||||||
|
}
|
||||||
|
@@ -1,6 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
||||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
|
||||||
|
|
||||||
PATH=/usr/sbin:/usr/bin:/sbin:/bin
|
PATH=/usr/sbin:/usr/bin:/sbin:/bin
|
||||||
command -v getarg >/dev/null || . /lib/dracut-lib.sh
|
command -v getarg >/dev/null || . /lib/dracut-lib.sh
|
||||||
@@ -14,6 +12,11 @@ command -v setup_net >/dev/null || . /lib/net-lib.sh
|
|||||||
# no sense in doing something if no (net)root info is available
|
# no sense in doing something if no (net)root info is available
|
||||||
# or root is already there
|
# or root is already there
|
||||||
[ -d $NEWROOT/proc ] && exit 0
|
[ -d $NEWROOT/proc ] && exit 0
|
||||||
|
|
||||||
|
if [ -z "$netroot" ]; then
|
||||||
|
netroot=$(getarg netroot=)
|
||||||
|
fi
|
||||||
|
|
||||||
[ -z "$netroot" ] && exit 1
|
[ -z "$netroot" ] && exit 1
|
||||||
|
|
||||||
# Set or override primary interface
|
# Set or override primary interface
|
||||||
@@ -35,7 +38,7 @@ esac
|
|||||||
# Figure out the handler for root=dhcp by recalling all netroot cmdline
|
# Figure out the handler for root=dhcp by recalling all netroot cmdline
|
||||||
# handlers when this is not called from manually network bringing up.
|
# handlers when this is not called from manually network bringing up.
|
||||||
if [ -z "$2" ]; then
|
if [ -z "$2" ]; then
|
||||||
if [ "$netroot" = "dhcp" ] || [ "$netroot" = "dhcp6" ] ; then
|
if getarg "root=dhcp" || getarg "netroot=dhcp" || getarg "root=dhcp6" || getarg "netroot=dhcp6"; then
|
||||||
# Load dhcp options
|
# Load dhcp options
|
||||||
[ -e /tmp/dhclient.$netif.dhcpopts ] && . /tmp/dhclient.$netif.dhcpopts
|
[ -e /tmp/dhclient.$netif.dhcpopts ] && . /tmp/dhclient.$netif.dhcpopts
|
||||||
|
|
||||||
@@ -47,6 +50,8 @@ if [ -z "$2" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
rm -f -- $hookdir/initqueue/finished/dhcp.sh
|
||||||
|
|
||||||
# Set netroot to new_root_path, so cmdline parsers don't call
|
# Set netroot to new_root_path, so cmdline parsers don't call
|
||||||
netroot=$new_root_path
|
netroot=$new_root_path
|
||||||
|
|
||||||
@@ -76,9 +81,7 @@ source_hook netroot $netif
|
|||||||
|
|
||||||
# Run the handler; don't store the root, it may change from device to device
|
# Run the handler; don't store the root, it may change from device to device
|
||||||
# XXX other variables to export?
|
# XXX other variables to export?
|
||||||
if $handler $netif $netroot $NEWROOT; then
|
[ -n "$handler" ] && "$handler" "$netif" "$netroot" "$NEWROOT"
|
||||||
rm -f -- $hookdir/initqueue/finished/dhcp.sh
|
save_netinfo $netif
|
||||||
# Network rootfs mount successful - save interface info for ifcfg etc.
|
|
||||||
save_netinfo $netif
|
|
||||||
fi
|
|
||||||
exit 0
|
exit 0
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# Format:
|
# Format:
|
||||||
# bond=<bondname>[:<bondslaves>:[:<options>]]
|
# bond=<bondname>[:<bondslaves>:[:<options>[:<mtu>]]]
|
||||||
#
|
#
|
||||||
# bondslaves is a comma-separated list of physical (ethernet) interfaces
|
# bondslaves is a comma-separated list of physical (ethernet) interfaces
|
||||||
# options is a comma-separated list on bonding options (modinfo bonding for details) in format compatible with initscripts
|
# options is a comma-separated list on bonding options (modinfo bonding for details) in format compatible with initscripts
|
||||||
@@ -9,14 +9,8 @@
|
|||||||
#
|
#
|
||||||
# bond without parameters assumes bond=bond0:eth0,eth1:mode=balance-rr
|
# bond without parameters assumes bond=bond0:eth0,eth1:mode=balance-rr
|
||||||
#
|
#
|
||||||
|
# if the mtu is specified, it will be set on the bond master
|
||||||
# return if bond already parsed
|
#
|
||||||
[ -n "$bondname" ] && return
|
|
||||||
|
|
||||||
# Check if bond parameter is valid
|
|
||||||
if getarg bond= >/dev/null ; then
|
|
||||||
:
|
|
||||||
fi
|
|
||||||
|
|
||||||
# We translate list of slaves to space-separated here to mwke it easier to loop over them in ifup
|
# We translate list of slaves to space-separated here to mwke it easier to loop over them in ifup
|
||||||
# Ditto for bonding options
|
# Ditto for bonding options
|
||||||
@@ -28,24 +22,24 @@ parsebond() {
|
|||||||
v=${v#*:}
|
v=${v#*:}
|
||||||
done
|
done
|
||||||
|
|
||||||
unset bondname bondslaves bondoptions
|
|
||||||
case $# in
|
case $# in
|
||||||
0) bondname=bond0; bondslaves="eth0 eth1" ;;
|
0) bondname=bond0; bondslaves="eth0 eth1" ;;
|
||||||
1) bondname=$1; bondslaves="eth0 eth1" ;;
|
1) bondname=$1; bondslaves="eth0 eth1" ;;
|
||||||
2) bondname=$1; bondslaves=$(str_replace "$2" "," " ") ;;
|
2) bondname=$1; bondslaves=$(str_replace "$2" "," " ") ;;
|
||||||
3) bondname=$1; bondslaves=$(str_replace "$2" "," " "); bondoptions=$(str_replace "$3" "," " ") ;;
|
3) bondname=$1; bondslaves=$(str_replace "$2" "," " "); bondoptions=$(str_replace "$3" "," " ") ;;
|
||||||
|
4) bondname=$1; bondslaves=$(str_replace "$2" "," " "); bondoptions=$(str_replace "$3" "," " "); bondmtu=$4;;
|
||||||
*) die "bond= requires zero to four parameters" ;;
|
*) die "bond= requires zero to four parameters" ;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
unset bondname bondslaves bondoptions
|
# Parse bond for bondname, bondslaves, bondmode, bondoptions and bondmtu
|
||||||
|
for bond in $(getargs bond=); do
|
||||||
# Parse bond for bondname, bondslaves, bondmode and bondoptions
|
unset bondname
|
||||||
if getarg bond >/dev/null; then
|
unset bondslaves
|
||||||
# Read bond= parameters if they exist
|
unset bondoptions
|
||||||
bond="$(getarg bond=)"
|
unset bondmtu
|
||||||
if [ ! "$bond" = "bond" ]; then
|
if [ "$bond" != "bond" ]; then
|
||||||
parsebond "$(getarg bond=)"
|
parsebond "$bond"
|
||||||
fi
|
fi
|
||||||
# Simple default bond
|
# Simple default bond
|
||||||
if [ -z "$bondname" ]; then
|
if [ -z "$bondname" ]; then
|
||||||
@@ -57,5 +51,5 @@ if getarg bond >/dev/null; then
|
|||||||
echo "bondname=$bondname" > /tmp/bond.${bondname}.info
|
echo "bondname=$bondname" > /tmp/bond.${bondname}.info
|
||||||
echo "bondslaves=\"$bondslaves\"" >> /tmp/bond.${bondname}.info
|
echo "bondslaves=\"$bondslaves\"" >> /tmp/bond.${bondname}.info
|
||||||
echo "bondoptions=\"$bondoptions\"" >> /tmp/bond.${bondname}.info
|
echo "bondoptions=\"$bondoptions\"" >> /tmp/bond.${bondname}.info
|
||||||
return
|
echo "bondmtu=\"$bondmtu\"" >> /tmp/bond.${bondname}.info
|
||||||
fi
|
done
|
||||||
|
@@ -1,22 +1,12 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
||||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
|
||||||
#
|
#
|
||||||
# Format:
|
# Format:
|
||||||
# bridge=<bridgename>:<ethnames>
|
# bridge=<bridgename>:<bridgeslaves>
|
||||||
#
|
#
|
||||||
# <ethnames> is a comma-separated list of physical (ethernet) interfaces
|
# <bridgeslaves> is a comma-separated list of physical (ethernet) interfaces
|
||||||
# bridge without parameters assumes bridge=br0:eth0
|
# bridge without parameters assumes bridge=br0:eth0
|
||||||
#
|
#
|
||||||
|
|
||||||
# return if bridge already parsed
|
|
||||||
[ -n "$bridgename" ] && return
|
|
||||||
|
|
||||||
# Check if bridge parameter is valid
|
|
||||||
if getarg bridge= >/dev/null ; then
|
|
||||||
command -v brctl >/dev/null 2>&1 || die "No 'brctl' installed"
|
|
||||||
fi
|
|
||||||
|
|
||||||
parsebridge() {
|
parsebridge() {
|
||||||
local v=${1}:
|
local v=${1}:
|
||||||
set --
|
set --
|
||||||
@@ -24,32 +14,28 @@ parsebridge() {
|
|||||||
set -- "$@" "${v%%:*}"
|
set -- "$@" "${v%%:*}"
|
||||||
v=${v#*:}
|
v=${v#*:}
|
||||||
done
|
done
|
||||||
|
|
||||||
unset bridgename ethnames
|
|
||||||
case $# in
|
case $# in
|
||||||
0) bridgename=br0; ethnames=$iface ;;
|
0) bridgename=br0; bridgeslaves=$iface ;;
|
||||||
1) die "bridge= requires two parameters" ;;
|
1) die "bridge= requires two parameters" ;;
|
||||||
2) bridgename=$1; ethnames=$(str_replace "$2" "," " ") ;;
|
2) bridgename=$1; bridgeslaves=$(str_replace "$2" "," " ") ;;
|
||||||
*) die "bridge= requires two parameters" ;;
|
*) die "bridge= requires two parameters" ;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
unset bridgename ethnames
|
# Parse bridge for bridgename and bridgeslaves
|
||||||
|
for bridge in $(getargs bridge=); do
|
||||||
iface=eth0
|
unset bridgename
|
||||||
|
unset bridgeslaves
|
||||||
# Parse bridge for bridgename and ethnames
|
iface=eth0
|
||||||
if bridge="$(getarg bridge)"; then
|
|
||||||
# Read bridge= parameters if they exist
|
# Read bridge= parameters if they exist
|
||||||
if [ -n "$bridge" ]; then
|
if [ "$bridge" != "bridge" ]; then
|
||||||
parsebridge $bridge
|
parsebridge $bridge
|
||||||
fi
|
fi
|
||||||
# Simple default bridge
|
# Simple default bridge
|
||||||
if [ -z "$bridgename" ]; then
|
if [ -z "$bridgename" ]; then
|
||||||
bridgename=br0
|
bridgename=br0
|
||||||
ethnames=$iface
|
bridgeslaves=$iface
|
||||||
fi
|
fi
|
||||||
echo "bridgename=$bridgename" > /tmp/bridge.info
|
echo "bridgename=$bridgename" > /tmp/bridge.${bridgename}.info
|
||||||
echo "ethnames=\"$ethnames\"" >> /tmp/bridge.info
|
echo "bridgeslaves=\"$bridgeslaves\"" >> /tmp/bridge.${bridgename}.info
|
||||||
return
|
done
|
||||||
fi
|
|
||||||
|
@@ -1,10 +1,10 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
||||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
|
||||||
|
|
||||||
command -v getarg >/dev/null || . /lib/dracut-lib.sh
|
command -v getarg >/dev/null || . /lib/dracut-lib.sh
|
||||||
command -v ibft_to_cmdline >/dev/null || . /lib/net-lib.sh
|
command -v ibft_to_cmdline >/dev/null || . /lib/net-lib.sh
|
||||||
|
|
||||||
# If ibft is requested, read ibft vals and write ip=XXX cmdline args
|
if getargbool 0 rd.iscsi.ibft -d "ip=ibft"; then
|
||||||
[ "ibft" = "$(getarg ip=)" ] && ibft_to_cmdline
|
modprobe -b -q iscsi_boot_sysfs 2>/dev/null
|
||||||
|
modprobe -b -q iscsi_ibft
|
||||||
|
ibft_to_cmdline
|
||||||
|
fi
|
||||||
|
@@ -1,6 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
||||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
|
||||||
#
|
#
|
||||||
# Format:
|
# Format:
|
||||||
# ifname=<interface>:<mac>
|
# ifname=<interface>:<mac>
|
||||||
|
@@ -1,6 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
||||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
|
||||||
#
|
#
|
||||||
# Format:
|
# Format:
|
||||||
# ip=[dhcp|on|any]
|
# ip=[dhcp|on|any]
|
||||||
@@ -25,6 +23,10 @@ fi
|
|||||||
if [ -z "$NEEDBOOTDEV" ] ; then
|
if [ -z "$NEEDBOOTDEV" ] ; then
|
||||||
count=0
|
count=0
|
||||||
for p in $(getargs ip=); do
|
for p in $(getargs ip=); do
|
||||||
|
case "$p" in
|
||||||
|
ibft)
|
||||||
|
continue;;
|
||||||
|
esac
|
||||||
count=$(( $count + 1 ))
|
count=$(( $count + 1 ))
|
||||||
done
|
done
|
||||||
[ $count -gt 1 ] && NEEDBOOTDEV=1
|
[ $count -gt 1 ] && NEEDBOOTDEV=1
|
||||||
@@ -34,8 +36,12 @@ unset count
|
|||||||
# If needed, check if bootdev= contains anything usable
|
# If needed, check if bootdev= contains anything usable
|
||||||
BOOTDEV=$(getarg bootdev=)
|
BOOTDEV=$(getarg bootdev=)
|
||||||
|
|
||||||
if [ -n "$NEEDBOOTDEV" ] ; then
|
if [ -n "$NEEDBOOTDEV" ] && getargbool 1 rd.neednet; then
|
||||||
[ -z "$BOOTDEV" ] && warn "Please supply bootdev argument for multiple ip= lines"
|
#[ -z "$BOOTDEV" ] && warn "Please supply bootdev argument for multiple ip= lines"
|
||||||
|
echo "rd.neednet=1" > /etc/cmdline.d/dracut-neednet.conf
|
||||||
|
info "Multiple ip= arguments: assuming rd.neednet=1"
|
||||||
|
else
|
||||||
|
unset NEEDBOOTDEV
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check ip= lines
|
# Check ip= lines
|
||||||
@@ -44,17 +50,14 @@ for p in $(getargs ip=); do
|
|||||||
ip_to_var $p
|
ip_to_var $p
|
||||||
|
|
||||||
# make first device specified the BOOTDEV
|
# make first device specified the BOOTDEV
|
||||||
if [ -z "$BOOTDEV" ] && [ -n "$dev" ]; then
|
if [ -n "$NEEDBOOTDEV" ] && [ -z "$BOOTDEV" ] && [ -n "$dev" ]; then
|
||||||
BOOTDEV="$dev"
|
BOOTDEV="$dev"
|
||||||
[ -n "$NEEDBOOTDEV" ] && warn "Setting bootdev to '$BOOTDEV'"
|
info "Setting bootdev to '$BOOTDEV'"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# skip ibft since we did it above
|
# skip ibft since we did it above
|
||||||
[ "$autoconf" = "ibft" ] && continue
|
[ "$autoconf" = "ibft" ] && continue
|
||||||
|
|
||||||
# We need to have an ip= line for the specified bootdev
|
|
||||||
[ -n "$NEEDBOOTDEV" ] && [ "$dev" = "$BOOTDEV" ] && BOOTDEVOK=1
|
|
||||||
|
|
||||||
# Empty autoconf defaults to 'dhcp'
|
# Empty autoconf defaults to 'dhcp'
|
||||||
if [ -z "$autoconf" ] ; then
|
if [ -z "$autoconf" ] ; then
|
||||||
warn "Empty autoconf values default to dhcp"
|
warn "Empty autoconf values default to dhcp"
|
||||||
@@ -62,24 +65,26 @@ for p in $(getargs ip=); do
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Error checking for autoconf in combination with other values
|
# Error checking for autoconf in combination with other values
|
||||||
case $autoconf in
|
for autoopt in $(str_replace "$autoconf" "," " "); do
|
||||||
error) die "Error parsing option 'ip=$p'";;
|
case $autoopt in
|
||||||
bootp|rarp|both) die "Sorry, ip=$autoconf is currenty unsupported";;
|
error) die "Error parsing option 'ip=$p'";;
|
||||||
none|off)
|
bootp|rarp|both) die "Sorry, ip=$autoopt is currenty unsupported";;
|
||||||
[ -z "$ip" ] && \
|
none|off)
|
||||||
die "For argument 'ip=$p'\nValue '$autoconf' without static configuration does not make sense"
|
[ -z "$ip" ] && \
|
||||||
[ -z "$mask" ] && \
|
die "For argument 'ip=$p'\nValue '$autoopt' without static configuration does not make sense"
|
||||||
die "Sorry, automatic calculation of netmask is not yet supported"
|
[ -z "$mask" ] && \
|
||||||
;;
|
die "Sorry, automatic calculation of netmask is not yet supported"
|
||||||
auto6);;
|
;;
|
||||||
dhcp|dhcp6|on|any) \
|
auto6);;
|
||||||
[ -n "$NEEDBOOTDEV" ] && [ -z "$dev" ] && \
|
dhcp|dhcp6|on|any) \
|
||||||
die "Sorry, 'ip=$p' does not make sense for multiple interface configurations"
|
[ -n "$NEEDBOOTDEV" ] && [ -z "$dev" ] && \
|
||||||
[ -n "$ip" ] && \
|
die "Sorry, 'ip=$p' does not make sense for multiple interface configurations"
|
||||||
die "For argument 'ip=$p'\nSorry, setting client-ip does not make sense for '$autoconf'"
|
[ -n "$ip" ] && \
|
||||||
;;
|
die "For argument 'ip=$p'\nSorry, setting client-ip does not make sense for '$autoopt'"
|
||||||
*) die "For argument 'ip=$p'\nSorry, unknown value '$autoconf'";;
|
;;
|
||||||
esac
|
*) die "For argument 'ip=$p'\nSorry, unknown value '$autoopt'";;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
if [ -n "$dev" ] ; then
|
if [ -n "$dev" ] ; then
|
||||||
# We don't like duplicate device configs
|
# We don't like duplicate device configs
|
||||||
@@ -105,6 +110,16 @@ for p in $(getargs ip=); do
|
|||||||
die "Server-ip or dhcp for netboot needed, but current arguments say otherwise"
|
die "Server-ip or dhcp for netboot needed, but current arguments say otherwise"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if str_starts "$dev" "enx" && [ ${#dev} -eq 15 ]; then
|
||||||
|
printf -- "ifname=%s:%s:%s:%s:%s:%s:%s\n" \
|
||||||
|
"$dev" \
|
||||||
|
"${dev:3:2}" \
|
||||||
|
"${dev:5:2}" \
|
||||||
|
"${dev:7:2}" \
|
||||||
|
"${dev:9:2}" \
|
||||||
|
"${dev:11:2}" \
|
||||||
|
"${dev:13:2}" >> /etc/cmdline.d/80-enx.conf
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# put BOOTIF in IFACES to make sure it comes up
|
# put BOOTIF in IFACES to make sure it comes up
|
||||||
|
@@ -6,14 +6,6 @@
|
|||||||
# teamslaves is a comma-separated list of physical (ethernet) interfaces
|
# teamslaves is a comma-separated list of physical (ethernet) interfaces
|
||||||
#
|
#
|
||||||
|
|
||||||
# return if team already parsed
|
|
||||||
[ -n "$teammaster" ] && return
|
|
||||||
|
|
||||||
# Check if team parameter is valid
|
|
||||||
if getarg team= >/dev/null ; then
|
|
||||||
:
|
|
||||||
fi
|
|
||||||
|
|
||||||
parseteam() {
|
parseteam() {
|
||||||
local v=${1}:
|
local v=${1}:
|
||||||
set --
|
set --
|
||||||
@@ -22,23 +14,28 @@ parseteam() {
|
|||||||
v=${v#*:}
|
v=${v#*:}
|
||||||
done
|
done
|
||||||
|
|
||||||
unset teammaster teamslaves
|
|
||||||
case $# in
|
case $# in
|
||||||
2) teammaster=$1; teamslaves=$(str_replace "$2" "," " ") ;;
|
2) teammaster=$1; teamslaves=$(str_replace "$2" "," " ") ;;
|
||||||
*) die "team= requires two parameters" ;;
|
*) die "team= requires two parameters" ;;
|
||||||
esac
|
esac
|
||||||
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
unset teammaster teamslaves
|
for team in $(getargs team); do
|
||||||
|
[ "$team" = "team" ] && continue
|
||||||
|
|
||||||
if getarg team>/dev/null; then
|
unset teammaster
|
||||||
# Read team= parameters if they exist
|
unset teamslaves
|
||||||
team="$(getarg team=)"
|
|
||||||
if [ ! "$team" = "team" ]; then
|
parseteam "$team" || continue
|
||||||
parseteam "$(getarg team=)"
|
|
||||||
|
echo "teammaster=$teammaster" > /tmp/team.${teammaster}.info
|
||||||
|
echo "teamslaves=\"$teamslaves\"" >> /tmp/team.${teammaster}.info
|
||||||
|
|
||||||
|
if ! [ -e /etc/teamd/${teammaster}.conf ]; then
|
||||||
|
warn "Team master $teammaster specified, but no /etc/teamd/$teammaster.conf present. Using activebackup."
|
||||||
|
mkdir -p /etc/teamd
|
||||||
|
printf -- "%s" '{"runner": {"name": "activebackup"}, "link_watch": {"name": "ethtool"}}' > "/etc/teamd/${teammaster}.conf"
|
||||||
fi
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
echo "teammaster=$teammaster" > /tmp/team.info
|
|
||||||
echo "teamslaves=\"$teamslaves\"" >> /tmp/team.info
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
@@ -4,14 +4,6 @@
|
|||||||
# vlan=<vlanname>:<phydevice>
|
# vlan=<vlanname>:<phydevice>
|
||||||
#
|
#
|
||||||
|
|
||||||
# return if vlan already parsed
|
|
||||||
[ -n "$vlanname" ] && return
|
|
||||||
|
|
||||||
# Check if vlan parameter is valid
|
|
||||||
if getarg vlan= >/dev/null ; then
|
|
||||||
:
|
|
||||||
fi
|
|
||||||
|
|
||||||
parsevlan() {
|
parsevlan() {
|
||||||
local v=${1}:
|
local v=${1}:
|
||||||
set --
|
set --
|
||||||
@@ -27,16 +19,16 @@ parsevlan() {
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
unset vlanname phydevice
|
for vlan in $(getargs vlan=); do
|
||||||
|
unset vlanname
|
||||||
if getarg vlan >/dev/null; then
|
unset phydevice
|
||||||
# Read vlan= parameters if they exist
|
|
||||||
vlan="$(getarg vlan=)"
|
|
||||||
if [ ! "$vlan" = "vlan" ]; then
|
if [ ! "$vlan" = "vlan" ]; then
|
||||||
parsevlan "$(getarg vlan=)"
|
parsevlan "$vlan"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "vlanname=\"$vlanname\"" > /tmp/vlan.info
|
echo "phydevice=\"$phydevice\"" > /tmp/vlan.${phydevice}.phy
|
||||||
echo "phydevice=\"$phydevice\"" >> /tmp/vlan.info
|
{
|
||||||
return
|
echo "vlanname=\"$vlanname\""
|
||||||
fi
|
echo "phydevice=\"$phydevice\""
|
||||||
|
} > /tmp/vlan.${vlanname}.${phydevice}
|
||||||
|
done
|
||||||
|
@@ -1,6 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/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
|
# called by dracut
|
||||||
check() {
|
check() {
|
||||||
@@ -10,6 +8,7 @@ check() {
|
|||||||
|
|
||||||
# called by dracut
|
# called by dracut
|
||||||
depends() {
|
depends() {
|
||||||
|
echo "network"
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,18 +1,10 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
||||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
|
||||||
|
|
||||||
# NFS root might have reached here before /tmp/net.ifaces was written
|
# NFS root might have reached here before /tmp/net.ifaces was written
|
||||||
|
type is_persistent_ethernet_name >/dev/null 2>&1 || . /lib/net-lib.sh
|
||||||
|
|
||||||
udevadm settle --timeout=30
|
udevadm settle --timeout=30
|
||||||
|
|
||||||
if [ -e /tmp/bridge.info ]; then
|
|
||||||
. /tmp/bridge.info
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -e /tmp/vlan.info ]; then
|
|
||||||
. /tmp/vlan.info
|
|
||||||
fi
|
|
||||||
|
|
||||||
mkdir -m 0755 -p /tmp/ifcfg/
|
mkdir -m 0755 -p /tmp/ifcfg/
|
||||||
mkdir -m 0755 -p /tmp/ifcfg-leases/
|
mkdir -m 0755 -p /tmp/ifcfg-leases/
|
||||||
|
|
||||||
@@ -22,7 +14,7 @@ get_config_line_by_subchannel()
|
|||||||
local line
|
local line
|
||||||
|
|
||||||
CHANNELS="$1"
|
CHANNELS="$1"
|
||||||
while read line; do
|
while read line || [ -n "$line" ]; do
|
||||||
if strstr "$line" "$CHANNELS"; then
|
if strstr "$line" "$CHANNELS"; then
|
||||||
echo $line
|
echo $line
|
||||||
return 0
|
return 0
|
||||||
@@ -48,7 +40,7 @@ print_s390() {
|
|||||||
for i in /sys/class/net/$_netif/device/cdev[0-9]*; do
|
for i in /sys/class/net/$_netif/device/cdev[0-9]*; do
|
||||||
[ -e $i ] || continue
|
[ -e $i ] || continue
|
||||||
channel=$(readlink -f $i)
|
channel=$(readlink -f $i)
|
||||||
echo -n "${channel##*/},"
|
printf '%s' "${channel##*/},"
|
||||||
done
|
done
|
||||||
})
|
})
|
||||||
[ -n "$SUBCHANNELS" ] || return 1
|
[ -n "$SUBCHANNELS" ] || return 1
|
||||||
@@ -80,18 +72,58 @@ print_s390() {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hw_bind() {
|
||||||
|
local _netif="$1"
|
||||||
|
local _macaddr="$2"
|
||||||
|
|
||||||
|
[ -n "$_macaddr" ] \
|
||||||
|
&& echo "MACADDR=\"$_macaddr\""
|
||||||
|
|
||||||
|
print_s390 "$_netif" \
|
||||||
|
&& return 0
|
||||||
|
|
||||||
|
[ -n "$_macaddr" ] && return 0
|
||||||
|
|
||||||
|
is_persistent_ethernet_name "$_netif" && return 0
|
||||||
|
|
||||||
|
[ -f "/sys/class/net/$_netif/addr_assign_type" ] \
|
||||||
|
&& [ "$(cat "/sys/class/net/$_netif/addr_assign_type")" != "0" ] \
|
||||||
|
&& return 1
|
||||||
|
|
||||||
|
[ -f "/sys/class/net/$_netif/address" ] \
|
||||||
|
|| return 1
|
||||||
|
|
||||||
|
echo "HWADDR=\"$(cat /sys/class/net/$_netif/address)\""
|
||||||
|
}
|
||||||
|
|
||||||
|
interface_bind() {
|
||||||
|
local _netif="$1"
|
||||||
|
local _macaddr="$2"
|
||||||
|
|
||||||
|
# see, if we can bind it to some hw parms
|
||||||
|
if hw_bind "$_netif" "$_macaddr"; then
|
||||||
|
# only print out DEVICE, if it's user assigned
|
||||||
|
is_kernel_ethernet_name "$_netif" && return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "DEVICE=\"$_netif\""
|
||||||
|
}
|
||||||
|
|
||||||
for netup in /tmp/net.*.did-setup ; do
|
for netup in /tmp/net.*.did-setup ; do
|
||||||
[ -f $netup ] || continue
|
[ -f $netup ] || continue
|
||||||
|
|
||||||
netif=${netup%%.did-setup}
|
netif=${netup%%.did-setup}
|
||||||
netif=${netif##*/net.}
|
netif=${netif##*/net.}
|
||||||
strstr "$netif" ":*:*:*:*:" && continue
|
strglobin "$netif" ":*:*:*:*:" && continue
|
||||||
[ -e /tmp/ifcfg/ifcfg-$netif ] && continue
|
[ -e /tmp/ifcfg/ifcfg-$netif ] && continue
|
||||||
unset bridge
|
unset bridge
|
||||||
unset bond
|
unset bond
|
||||||
unset bondslaves
|
unset bondslaves
|
||||||
unset bondname
|
unset bondname
|
||||||
unset bondoptions
|
unset bondoptions
|
||||||
|
unset bridgename
|
||||||
|
unset bridgeslaves
|
||||||
|
unset team
|
||||||
unset uuid
|
unset uuid
|
||||||
unset ip
|
unset ip
|
||||||
unset gw
|
unset gw
|
||||||
@@ -100,29 +132,44 @@ for netup in /tmp/net.*.did-setup ; do
|
|||||||
unset macaddr
|
unset macaddr
|
||||||
unset slave
|
unset slave
|
||||||
unset ethname
|
unset ethname
|
||||||
|
unset vlan
|
||||||
|
unset vlanname
|
||||||
|
unset phydevice
|
||||||
|
|
||||||
[ -e /tmp/bond.${netif}.info ] && . /tmp/bond.${netif}.info
|
[ -e /tmp/bond.${netif}.info ] && . /tmp/bond.${netif}.info
|
||||||
|
[ -e /tmp/bridge.${netif}.info ] && . /tmp/bridge.${netif}.info
|
||||||
|
[ -e /tmp/team.${netif}.info ] && . /tmp/team.${netif}.info
|
||||||
|
|
||||||
uuid=$(cat /proc/sys/kernel/random/uuid)
|
uuid=$(cat /proc/sys/kernel/random/uuid)
|
||||||
if [ "$netif" = "$bridgename" ]; then
|
if [ "$netif" = "$bridgename" ]; then
|
||||||
bridge=yes
|
bridge=yes
|
||||||
|
elif [ "$netif" = "$teammaster" ]; then
|
||||||
|
team=yes
|
||||||
elif [ "$netif" = "$bondname" ]; then
|
elif [ "$netif" = "$bondname" ]; then
|
||||||
# $netif can't be bridge and bond at the same time
|
# $netif can't be bridge and bond at the same time
|
||||||
bond=yes
|
bond=yes
|
||||||
fi
|
fi
|
||||||
if [ "$netif" = "$vlanname" ]; then
|
|
||||||
|
for i in /tmp/vlan.${netif}.*; do
|
||||||
|
[ ! -e "$i" ] && continue
|
||||||
|
. "$i"
|
||||||
vlan=yes
|
vlan=yes
|
||||||
fi
|
break
|
||||||
[ -e /sys/class/net/$netif/address ] && \
|
done
|
||||||
cat /sys/class/net/$netif/address > /tmp/net.$netif.hwaddr
|
|
||||||
|
# skip team interfaces for now, the host config must be in sync
|
||||||
|
[ "$netif" = "$teammaster" ] && continue
|
||||||
|
|
||||||
{
|
{
|
||||||
echo "# Generated by dracut initrd"
|
echo "# Generated by dracut initrd"
|
||||||
echo "DEVICE=\"$netif\""
|
echo "NAME=\"$netif\""
|
||||||
|
[ -z "$vlan" ] && interface_bind "$netif" "$macaddr"
|
||||||
echo "ONBOOT=yes"
|
echo "ONBOOT=yes"
|
||||||
echo "NETBOOT=yes"
|
echo "NETBOOT=yes"
|
||||||
echo "UUID=\"$uuid\""
|
echo "UUID=\"$uuid\""
|
||||||
|
strstr "$(ip -6 addr show dev $netif)" 'inet6' && echo "IPV6INIT=yes"
|
||||||
if [ -f /tmp/dhclient.$netif.lease ]; then
|
if [ -f /tmp/dhclient.$netif.lease ]; then
|
||||||
[ -f /tmp/dhclient.$netif.dhcpopts ] && . /tmp/dhclient.$netif.dhcpopts
|
[ -f /tmp/dhclient.$netif.dhcpopts ] && . /tmp/dhclient.$netif.dhcpopts
|
||||||
strstr "$ip" '*:*:*' && echo "IPV6INIT=yes"
|
|
||||||
if [ -f /tmp/net.$netif.has_ibft_config ]; then
|
if [ -f /tmp/net.$netif.has_ibft_config ]; then
|
||||||
echo "BOOTPROTO=ibft"
|
echo "BOOTPROTO=ibft"
|
||||||
else
|
else
|
||||||
@@ -132,7 +179,7 @@ for netup in /tmp/net.*.did-setup ; do
|
|||||||
else
|
else
|
||||||
# If we've booted with static ip= lines, the override file is there
|
# If we've booted with static ip= lines, the override file is there
|
||||||
[ -e /tmp/net.$netif.override ] && . /tmp/net.$netif.override
|
[ -e /tmp/net.$netif.override ] && . /tmp/net.$netif.override
|
||||||
if strstr "$ip" '*:*:*'; then
|
if strglobin "$ip" '*:*:*'; then
|
||||||
echo "IPV6INIT=yes"
|
echo "IPV6INIT=yes"
|
||||||
echo "IPV6_AUTOCONF=no"
|
echo "IPV6_AUTOCONF=no"
|
||||||
echo "IPV6ADDR=\"$ip/$mask\""
|
echo "IPV6ADDR=\"$ip/$mask\""
|
||||||
@@ -149,7 +196,7 @@ for netup in /tmp/net.*.did-setup ; do
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if strstr "$gw" '*:*:*'; then
|
if strglobin "$gw" '*:*:*'; then
|
||||||
echo "IPV6_DEFAULTGW=\"$gw\""
|
echo "IPV6_DEFAULTGW=\"$gw\""
|
||||||
elif [ -n "$gw" ]; then
|
elif [ -n "$gw" ]; then
|
||||||
echo "GATEWAY=\"$gw\""
|
echo "GATEWAY=\"$gw\""
|
||||||
@@ -159,23 +206,15 @@ for netup in /tmp/net.*.did-setup ; do
|
|||||||
} > /tmp/ifcfg/ifcfg-$netif
|
} > /tmp/ifcfg/ifcfg-$netif
|
||||||
|
|
||||||
# bridge needs different things written to ifcfg
|
# bridge needs different things written to ifcfg
|
||||||
if [ -z "$bridge" ] && [ -z "$bond" ] && [ -z "$vlan" ]; then
|
if [ -z "$bridge" ] && [ -z "$bond" ] && [ -z "$vlan" ] && [ -z "$team" ]; then
|
||||||
# standard interface
|
# standard interface
|
||||||
{
|
echo "TYPE=Ethernet" >> /tmp/ifcfg/ifcfg-$netif
|
||||||
[ -n "$macaddr" ] && echo "MACADDR=\"$macaddr\""
|
|
||||||
if ! print_s390 $netif; then
|
|
||||||
[ -n "$macaddr" ] || echo "HWADDR=\"$(cat /sys/class/net/$netif/address)\""
|
|
||||||
fi
|
|
||||||
echo "TYPE=Ethernet"
|
|
||||||
echo "NAME=\"$netif\""
|
|
||||||
[ -n "$mtu" ] && echo "MTU=\"$mtu\""
|
|
||||||
} >> /tmp/ifcfg/ifcfg-$netif
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$vlan" ] ; then
|
if [ -n "$vlan" ] ; then
|
||||||
{
|
{
|
||||||
echo "TYPE=Vlan"
|
echo "TYPE=Vlan"
|
||||||
echo "NAME=\"$netif\""
|
echo "DEVICE=\"$netif\""
|
||||||
echo "VLAN=yes"
|
echo "VLAN=yes"
|
||||||
echo "PHYSDEV=\"$phydevice\""
|
echo "PHYSDEV=\"$phydevice\""
|
||||||
} >> /tmp/ifcfg/ifcfg-$netif
|
} >> /tmp/ifcfg/ifcfg-$netif
|
||||||
@@ -192,17 +231,19 @@ for netup in /tmp/net.*.did-setup ; do
|
|||||||
|
|
||||||
for slave in $bondslaves ; do
|
for slave in $bondslaves ; do
|
||||||
# write separate ifcfg file for the raw eth interface
|
# write separate ifcfg file for the raw eth interface
|
||||||
{
|
(
|
||||||
echo "# Generated by dracut initrd"
|
echo "# Generated by dracut initrd"
|
||||||
echo "DEVICE=\"$slave\""
|
echo "NAME=\"$slave\""
|
||||||
echo "TYPE=Ethernet"
|
echo "TYPE=Ethernet"
|
||||||
echo "ONBOOT=yes"
|
echo "ONBOOT=yes"
|
||||||
echo "NETBOOT=yes"
|
echo "NETBOOT=yes"
|
||||||
echo "HWADDR=\"$(cat /sys/class/net/$slave/address)\""
|
|
||||||
echo "SLAVE=yes"
|
echo "SLAVE=yes"
|
||||||
echo "MASTER=\"$netif\""
|
echo "MASTER=\"$netif\""
|
||||||
echo "NAME=\"$slave\""
|
echo "UUID=\"$(cat /proc/sys/kernel/random/uuid)\""
|
||||||
} >> /tmp/ifcfg/ifcfg-$slave
|
unset macaddr
|
||||||
|
[ -e /tmp/net.$slave.override ] && . /tmp/net.$slave.override
|
||||||
|
interface_bind "$slave" "$macaddr"
|
||||||
|
) >> /tmp/ifcfg/ifcfg-$slave
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -212,50 +253,30 @@ for netup in /tmp/net.*.did-setup ; do
|
|||||||
echo "TYPE=Bridge"
|
echo "TYPE=Bridge"
|
||||||
echo "NAME=\"$netif\""
|
echo "NAME=\"$netif\""
|
||||||
} >> /tmp/ifcfg/ifcfg-$netif
|
} >> /tmp/ifcfg/ifcfg-$netif
|
||||||
if [ "$ethname" = "$bondname" ] ; then
|
for slave in $bridgeslaves ; do
|
||||||
{
|
|
||||||
echo "# Generated by dracut initrd"
|
|
||||||
echo "DEVICE=\"$bondname\""
|
|
||||||
echo "ONBOOT=yes"
|
|
||||||
echo "NETBOOT=yes"
|
|
||||||
# This variable is an indicator of a bond interface for initscripts
|
|
||||||
echo "BONDING_OPTS=\"$bondoptions\""
|
|
||||||
echo "BRIDGE=\"$netif\""
|
|
||||||
echo "NAME=\"$bondname\""
|
|
||||||
} >> /tmp/ifcfg/ifcfg-$bondname
|
|
||||||
for slave in $bondslaves ; do
|
|
||||||
# write separate ifcfg file for the raw eth interface
|
|
||||||
{
|
|
||||||
echo "# Generated by dracut initrd"
|
|
||||||
echo "DEVICE=\"$slave\""
|
|
||||||
echo "TYPE=Ethernet"
|
|
||||||
echo "ONBOOT=yes"
|
|
||||||
echo "NETBOOT=yes"
|
|
||||||
echo "HWADDR=\"$(cat /sys/class/net/$slave/address)\""
|
|
||||||
echo "SLAVE=yes"
|
|
||||||
echo "MASTER=\"$bondname\""
|
|
||||||
echo "NAME=\"$slave\""
|
|
||||||
} >> /tmp/ifcfg/ifcfg-$slave
|
|
||||||
done
|
|
||||||
else
|
|
||||||
# write separate ifcfg file for the raw eth interface
|
# write separate ifcfg file for the raw eth interface
|
||||||
{
|
(
|
||||||
echo "# Generated by dracut initrd"
|
echo "# Generated by dracut initrd"
|
||||||
echo "DEVICE=\"$ethname\""
|
echo "NAME=\"$slave\""
|
||||||
echo "TYPE=Ethernet"
|
echo "TYPE=Ethernet"
|
||||||
echo "ONBOOT=yes"
|
echo "ONBOOT=yes"
|
||||||
echo "NETBOOT=yes"
|
echo "NETBOOT=yes"
|
||||||
echo "HWADDR=\"$(cat /sys/class/net/$ethname/address)\""
|
echo "BRIDGE=\"$bridgename\""
|
||||||
echo "BRIDGE=\"$netif\""
|
echo "UUID=\"$(cat /proc/sys/kernel/random/uuid)\""
|
||||||
echo "NAME=\"$ethname\""
|
unset macaddr
|
||||||
} >> /tmp/ifcfg/ifcfg-$ethname
|
[ -e /tmp/net.$slave.override ] && . /tmp/net.$slave.override
|
||||||
fi
|
interface_bind "$slave" "$macaddr"
|
||||||
|
) >> /tmp/ifcfg/ifcfg-$slave
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
i=1
|
i=1
|
||||||
for ns in $(getargs nameserver); do
|
for ns in $(getargs nameserver); do
|
||||||
echo "DNS${i}=\"${ns}\"" >> /tmp/ifcfg/ifcfg-$netif
|
echo "DNS${i}=\"${ns}\"" >> /tmp/ifcfg/ifcfg-$netif
|
||||||
i=$((i+1))
|
i=$((i+1))
|
||||||
done
|
done
|
||||||
|
|
||||||
|
[ -f /tmp/net.route6."$netif" ] && cp /tmp/net.route6."$netif" /tmp/ifcfg/route6-"$netif"
|
||||||
|
[ -f /tmp/net.route."$netif" ] && cp /tmp/net.route."$netif" /tmp/ifcfg/route-"$netif"
|
||||||
done
|
done
|
||||||
|
|
||||||
# Pass network opts
|
# Pass network opts
|
||||||
|
@@ -15,8 +15,9 @@ depends() {
|
|||||||
|
|
||||||
# called by dracut
|
# called by dracut
|
||||||
install() {
|
install() {
|
||||||
local _dir _crt _found _lib
|
local _dir _crt _found _lib _nssckbi _p11roots _p11root _p11item
|
||||||
inst_simple "$moddir/url-lib.sh" "/lib/url-lib.sh"
|
inst_simple "$moddir/url-lib.sh" "/lib/url-lib.sh"
|
||||||
|
inst_multiple -o ctorrent
|
||||||
inst_multiple curl
|
inst_multiple curl
|
||||||
# also install libs for curl https
|
# also install libs for curl https
|
||||||
inst_libdir_file "libnsspem.so*"
|
inst_libdir_file "libnsspem.so*"
|
||||||
@@ -28,16 +29,50 @@ install() {
|
|||||||
[[ -d $_dir ]] || continue
|
[[ -d $_dir ]] || continue
|
||||||
for _lib in $_dir/libcurl.so.*; do
|
for _lib in $_dir/libcurl.so.*; do
|
||||||
[[ -e $_lib ]] || continue
|
[[ -e $_lib ]] || continue
|
||||||
|
[[ $_nssckbi ]] || _nssckbi=$(grep -F --binary-files=text -z libnssckbi $_lib)
|
||||||
_crt=$(grep -F --binary-files=text -z .crt $_lib)
|
_crt=$(grep -F --binary-files=text -z .crt $_lib)
|
||||||
[[ $_crt ]] || continue
|
[[ $_crt ]] || continue
|
||||||
[[ $_crt == /*/* ]] || continue
|
[[ $_crt == /*/* ]] || continue
|
||||||
if ! inst_simple "$_crt"; then
|
if ! inst "$_crt"; then
|
||||||
dwarn "Couldn't install '$_crt' SSL CA cert bundle; HTTPS might not work."
|
dwarn "Couldn't install '$_crt' SSL CA cert bundle; HTTPS might not work."
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
_found=1
|
_found=1
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
[[ $_found ]] || dwarn "Couldn't find SSL CA cert bundle; HTTPS won't work."
|
# If we found no cert bundle files referenced in libcurl but we
|
||||||
|
# *did* find a mention of libnssckbi (checked above), install it.
|
||||||
|
# If its truly NSS libnssckbi, it includes its own trust bundle,
|
||||||
|
# but if it's really p11-kit-trust.so, we need to find the dirs
|
||||||
|
# where it will look for a trust bundle and install them too.
|
||||||
|
if ! [[ $_found ]] && [[ $_nssckbi ]] ; then
|
||||||
|
_found=1
|
||||||
|
inst_libdir_file "libnssckbi.so*" || _found=
|
||||||
|
for _dir in $libdirs; do
|
||||||
|
[[ -e $_dir/libnssckbi.so ]] || continue
|
||||||
|
# this looks for directory-ish strings in the file
|
||||||
|
for _p11roots in $(grep -o --binary-files=text "/[[:alpha:]][[:print:]]*" $_dir/libnssckbi.so) ; do
|
||||||
|
# the string can be a :-separated list of dirs
|
||||||
|
for _p11root in $(echo "$_p11roots" | tr ':' '\n') ; do
|
||||||
|
# check if it's actually a directory (there are
|
||||||
|
# several false positives in the results)
|
||||||
|
[[ -d "$_p11root" ]] || continue
|
||||||
|
# check if it has some specific subdirs that all
|
||||||
|
# p11-kit trust dirs have
|
||||||
|
[[ -d "${_p11root}/anchors" ]] || continue
|
||||||
|
[[ -d "${_p11root}/blacklist" ]] || continue
|
||||||
|
# so now we know it's really a p11-kit trust dir;
|
||||||
|
# install everything in it
|
||||||
|
for _p11item in $(find "$_p11root") ; do
|
||||||
|
if ! inst "$_p11item" ; then
|
||||||
|
dwarn "Couldn't install '$_p11item' from p11-kit trust dir '$_p11root'; HTTPS might not work."
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
|
done
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
[[ $_found ]] || dwarn "Couldn't find SSL CA cert bundle or libnssckbi.so; HTTPS won't work."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -82,13 +82,45 @@ set_http_header() {
|
|||||||
echo "header = \"$1: $2\"" >> $CURL_HOME/.curlrc
|
echo "header = \"$1: $2\"" >> $CURL_HOME/.curlrc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
### TORRENT ##########################################################
|
||||||
|
|
||||||
|
ctorrent_args="-E 0 -e 0"
|
||||||
|
|
||||||
|
ctorrent_fetch_url() {
|
||||||
|
local url="$1" outloc="$2"
|
||||||
|
url=${url#*//}
|
||||||
|
torrent_outloc="$outloc.torrent"
|
||||||
|
echo "$url" > /proc/self/fd/0
|
||||||
|
if [ -n "$outloc" ]; then
|
||||||
|
curl $curl_args --output - -- "$url" > "$torrent_outloc" || return $?
|
||||||
|
else
|
||||||
|
local outdir="$(mkuniqdir /tmp torrent_fetch_url)"
|
||||||
|
( cd "$outdir"; curl $curl_args --remote-name "$url" || return $? )
|
||||||
|
torrent_outloc="$outdir/$(ls -A $outdir)"
|
||||||
|
outloc=${torrent_outloc%.*}
|
||||||
|
fi
|
||||||
|
if ! [ -f "$torrent_outloc" ]; then
|
||||||
|
warn "Downloading '$url' failed!"
|
||||||
|
return 253
|
||||||
|
fi
|
||||||
|
ctorrent $ctorrent_args -s $outloc $torrent_outloc >&2
|
||||||
|
if ! [ -f "$outloc" ]; then
|
||||||
|
warn "Torrent download of '$url' failed!"
|
||||||
|
return 253
|
||||||
|
fi
|
||||||
|
if [ -z "$2" ]; then echo "$outloc" ; fi
|
||||||
|
}
|
||||||
|
|
||||||
|
command -v ctorrent >/dev/null \
|
||||||
|
&& add_url_handler ctorrent_fetch_url torrent
|
||||||
|
|
||||||
### NFS ##############################################################
|
### NFS ##############################################################
|
||||||
|
|
||||||
[ -e /lib/nfs-lib.sh ] && . /lib/nfs-lib.sh
|
[ -e /lib/nfs-lib.sh ] && . /lib/nfs-lib.sh
|
||||||
|
|
||||||
nfs_already_mounted() {
|
nfs_already_mounted() {
|
||||||
local server="$1" path="$2" localdir="" s="" p=""
|
local server="$1" path="$2" localdir="" s="" p=""
|
||||||
cat /proc/mounts | while read src mnt rest; do
|
cat /proc/mounts | while read src mnt rest || [ -n "$src" ]; do
|
||||||
splitsep ":" "$src" s p
|
splitsep ":" "$src" s p
|
||||||
if [ "$server" = "$s" ]; then
|
if [ "$server" = "$s" ]; then
|
||||||
if [ "$path" = "$p" ]; then
|
if [ "$path" = "$p" ]; then
|
||||||
|
@@ -1,6 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/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
|
# called by dracut
|
||||||
check() {
|
check() {
|
||||||
@@ -17,50 +15,31 @@ installkernel() {
|
|||||||
local _modname
|
local _modname
|
||||||
# Include KMS capable drm drivers
|
# Include KMS capable drm drivers
|
||||||
|
|
||||||
drm_module_filter() {
|
if [[ "$(uname -m)" == arm* || "$(uname -m)" == aarch64 ]]; then
|
||||||
local _drm_drivers='drm_crtc_init'
|
# arm/aarch64 specific modules needed by drm
|
||||||
local _ret
|
instmods \
|
||||||
# subfunctions inherit following FDs
|
"=drivers/gpu/drm/i2c" \
|
||||||
local _merge=8 _side2=9
|
"=drivers/gpu/drm/panel" \
|
||||||
function nmf1() {
|
"=drivers/gpu/drm/bridge" \
|
||||||
local _fname _fcont
|
"=drivers/video/backlight" \
|
||||||
while read _fname; do
|
${NULL}
|
||||||
case "$_fname" in
|
fi
|
||||||
*.ko) _fcont="$(< $_fname)" ;;
|
|
||||||
*.ko.gz) _fcont="$(gzip -dc $_fname)" ;;
|
|
||||||
*.ko.xz) _fcont="$(xz -dc $_fname)" ;;
|
|
||||||
esac
|
|
||||||
[[ $_fcont =~ $_drm_drivers
|
|
||||||
&& ! $_fcont =~ iw_handler_get_spy ]] \
|
|
||||||
&& echo "$_fname"
|
|
||||||
done
|
|
||||||
}
|
|
||||||
function rotor() {
|
|
||||||
local _f1 _f2
|
|
||||||
while read _f1; do
|
|
||||||
echo "$_f1"
|
|
||||||
if read _f2; then
|
|
||||||
echo "$_f2" 1>&${_side2}
|
|
||||||
fi
|
|
||||||
done | nmf1 1>&${_merge}
|
|
||||||
}
|
|
||||||
# Use two parallel streams to filter alternating modules.
|
|
||||||
set +x
|
|
||||||
eval "( ( rotor ) ${_side2}>&1 | nmf1 ) ${_merge}>&1"
|
|
||||||
[[ $debug ]] && set -x
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
for _modname in $(find_kernel_modules_by_path drivers/gpu/drm \
|
instmods amdkfd hyperv_fb "=drivers/pwm"
|
||||||
| drm_module_filter) ; do
|
|
||||||
# if the hardware is present, include module even if it is not currently loaded,
|
# if the hardware is present, include module even if it is not currently loaded,
|
||||||
# as we could e.g. be in the installer; nokmsboot boot parameter will disable
|
# as we could e.g. be in the installer; nokmsboot boot parameter will disable
|
||||||
# loading of the driver if needed
|
# loading of the driver if needed
|
||||||
if [[ $hostonly ]] && modinfo -F alias $_modname | sed -e 's,\?,\.,g' -e 's,\*,\.\*,g' \
|
if [[ $hostonly ]]; then
|
||||||
| grep -qxf - /sys/bus/pci/devices/*/modalias 2>/dev/null; then
|
for i in /sys/bus/{pci/devices,soc/devices/soc?}/*/modalias; do
|
||||||
hostonly='' instmods $_modname
|
[[ -e $i ]] || continue
|
||||||
continue
|
if hostonly="" dracut_instmods --silent -s "drm_crtc_init" -S "iw_handler_get_spy" $(<$i); then
|
||||||
fi
|
if strstr "$(modinfo -F filename $(<$i) 2>/dev/null)" radeon.ko; then
|
||||||
instmods $_modname
|
hostonly='' instmods amdkfd
|
||||||
done
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
else
|
||||||
|
dracut_instmods -s "drm_crtc_init" "=drivers/gpu/drm"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user