-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move dracut specifics to dracut mount unit
Dracut depends on BOOTFS environment variable to be set after pool import. This dracut specific systemd ExecStartPost command should not be called for any non-dracut systems, so let's move it to a static systemd unit that gets pulled in by the generated mount unit. Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
- Loading branch information
Showing
8 changed files
with
28 additions
and
4 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
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
SUBDIRS = 02zfsexpandknowledge 90zfs | ||
SUBDIRS = 02zfsexpandknowledge 90zfs systemd | ||
|
||
EXTRA_DIST = README.dracut.markdown |
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 @@ | ||
zfs-dracut-bootfs.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,13 @@ | ||
systemdunit_DATA = \ | ||
zfs-dracut-bootfs.service | ||
|
||
EXTRA_DIST = \ | ||
$(top_srcdir)/contrib/dracut/systemd/zfs-dracut-bootfs.service.in | ||
|
||
$(systemdunit_DATA):%:%.in | ||
-$(SED) -e 's,@bindir\@,$(bindir),g' \ | ||
-e 's,@sbindir\@,$(sbindir),g' \ | ||
$< >'$@' | ||
|
||
distclean-local:: | ||
-$(RM) $(systemdunit_DATA) |
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,10 @@ | ||
[Unit] | ||
Description=Set BOOTFS environment for dracut | ||
Documentation=man:zfs(8) | ||
DefaultDependencies=no | ||
After=zfs-import.target | ||
Requires=zfs-import.target | ||
|
||
[Service] | ||
Type=oneshot | ||
ExecStart=/bin/sh -c "/bin/systemctl set-environment BOOTFS=$(@sbindir@/zpool list -H -o bootfs | grep -v '^-$')" |
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