Skip to content

Commit

Permalink
Merge pull request #3337 from mberndt123/mberndt123/initrd-without-pl…
Browse files Browse the repository at this point in the history
…ymouth

dracut: remove dependency on plymouth
  • Loading branch information
mulkieran authored Jun 26, 2023
2 parents df3c733 + 27dc9f4 commit 43b0f42
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
10 changes: 2 additions & 8 deletions dracut/90stratis/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ check() {
xfs_growfs \
xfs_db \
udevadm \
plymouth \
/usr/sbin/plymouthd \
/usr/sbin/thin_metadata_size \
/usr/lib/udev/stratis-str-cmp \
/usr/lib/udev/stratis-base32-decode ||
Expand All @@ -23,7 +21,7 @@ check() {

# called by dracut
depends() {
echo dm
echo dm systemd-ask-password
return 0
}

Expand All @@ -44,16 +42,12 @@ install() {
xfs_growfs \
xfs_db \
udevadm \
plymouth \
/usr/sbin/plymouthd \
/usr/sbin/thin_metadata_size \
/usr/lib/udev/stratis-base32-decode \
/usr/lib/udev/stratis-str-cmp

# Dracut dependencies
inst_multiple $systemdutildir/system-generators/stratis-setup-generator \
$systemdutildir/system/plymouth-start.service \
plymouth
inst_multiple $systemdutildir/system-generators/stratis-setup-generator

inst_rules "$moddir/61-stratisd.rules"
inst_simple "$moddir/stratisd-min.service" $systemdutildir/system/stratisd-min.service
Expand Down
11 changes: 7 additions & 4 deletions dracut/90stratis/stratis-rootfs-setup
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,13 @@ done

if $(stratis-min pool is-stopped "$STRATIS_ROOTFS_UUID"); then
if $(stratis-min pool is-encrypted "$STRATIS_ROOTFS_UUID"); then
if ! plymouth ask-for-password \
--command="stratis-min pool start --prompt --unlock-method=keyring $STRATIS_ROOTFS_UUID" \
--prompt="Enter password for Stratis pool with UUID $STRATIS_ROOTFS_UUID containing root filesystem" \
--number-of-tries=3; then
ATTEMPTS_REMAINING=3
if
! while [ $((ATTEMPTS_REMAINING--)) -gt 0 ]; do
systemd-ask-password --id="stratis:$STRATIS_ROOTFS_UUID" "Enter password for Stratis pool with UUID $STRATIS_ROOTFS_UUID containing root filesystem" |
stratis-min pool start --prompt --unlock-method=keyring "$STRATIS_ROOTFS_UUID" && break
done
then
echo Failed to start pool with UUID $STRATIS_ROOTFS_UUID using a passphrase >&2
exit 1
fi
Expand Down

0 comments on commit 43b0f42

Please sign in to comment.