-
Notifications
You must be signed in to change notification settings - Fork 668
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(squash) Move dracut-specific parts into dropins
- Loading branch information
Showing
7 changed files
with
38 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -237,14 +237,27 @@ foreach file : dracut_conf_files | |
) | ||
endforeach | ||
|
||
systemd_files = [ | ||
'nvmefc-boot-connections.service', | ||
'nvmf-autoconnect.service', | ||
'nvmf-connect-nbft.service', | ||
'nvmf-connect.target', | ||
'[email protected]', | ||
] | ||
|
||
want_dracut_module = get_option('dracut-module') | ||
if want_dracut_module | ||
dracut_nbft_files = [ | ||
'module-setup.sh', | ||
systemd_files += [ | ||
'nbft-boot-pre.service', | ||
'nbft-boot-connect.service' | ||
] | ||
|
||
dracut_nbft_files = [ | ||
'module-setup.sh', | ||
'nbft-boot-pre-dracut.conf', | ||
'nbft-boot-connect-dracut.conf' | ||
] | ||
|
||
foreach file : dracut_nbft_files | ||
configure_file( | ||
input: 'nvmf-autoconnect/dracut-95nbft/' + file + '.in', | ||
|
@@ -278,14 +291,6 @@ if want_dracut_module | |
endforeach | ||
endif | ||
|
||
systemd_files = [ | ||
'nvmefc-boot-connections.service', | ||
'nvmf-autoconnect.service', | ||
'nvmf-connect-nbft.service', | ||
'nvmf-connect.target', | ||
'[email protected]', | ||
] | ||
|
||
foreach file : systemd_files | ||
configure_file( | ||
input: 'nvmf-autoconnect/systemd/' + file + '.in', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,10 +41,16 @@ install() { | |
# TODO: /etc/nvme/hostnqn | ||
|
||
inst_multiple "$systemdsystemunitdir"/[email protected] | ||
|
||
inst_simple "$moddir/nbft-boot-pre-dracut.conf" \ | ||
"$systemdsystemunitdir/nbft-boot-pre.service.d/nbft-boot-pre-dracut.conf" | ||
inst_simple "$moddir/nbft-boot-connect-dracut.conf" \ | ||
"$systemdsystemunitdir/nbft-boot-connect.service.d/nbft-boot-connect-dracut.conf" | ||
|
||
for i in \ | ||
nbft-boot-pre.service \ | ||
nbft-boot-connect.service; do | ||
inst_simple "${moddir}/$i" "${systemdsystemunitdir}/$i" | ||
inst_multiple "${systemdsystemunitdir}/$i" | ||
$SYSTEMCTL -q --root "$initdir" enable $i | ||
done | ||
} |
2 changes: 2 additions & 0 deletions
2
nvmf-autoconnect/dracut-95nbft/nbft-boot-connect-dracut.conf.in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[Unit] | ||
Before=dracut-initqueue.service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[Unit] | ||
Before=dracut-cmdline.service | ||
|
||
[Service] | ||
# Tell dracut to start networking | ||
ExecStart=bash -c 'echo rd.neednet=1 > /etc/cmdline.d/95nbft-args.conf' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 3 additions & 6 deletions
9
...ct/dracut-95nbft/nbft-boot-pre.service.in → ...oconnect/systemd/nbft-boot-pre.service.in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,17 @@ | ||
# This unit checks for the ACPI NBFT table presence and tells | ||
# dracut to activate networking. | ||
# This unit checks for the ACPI NBFT table presence and sets up | ||
# defined network interfaces | ||
|
||
[Unit] | ||
DefaultDependencies=no | ||
# Specify 'rd.nvmf.nonbft' to disable NBFT boot | ||
ConditionKernelCommandLine=!rd.nvmf.nonbft | ||
ConditionPathExistsGlob=/sys/firmware/acpi/tables/NBFT* | ||
Before=dracut-cmdline.service | ||
|
||
[Service] | ||
Type=oneshot | ||
RemainAfterExit=yes | ||
ExecStartPre=-/usr/bin/mkdir -p /etc/systemd/network | ||
# generate udev link files | ||
ExecStart=/usr/sbin/nvme nbft gen-udev-link-files /etc/systemd/network/ | ||
# tell dracut to start the network | ||
ExecStart=bash -c 'echo rd.neednet=1 > /etc/cmdline.d/95nbft-args.conf' | ||
|
||
[Install] | ||
WantedBy=sysinit.target |