-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #60 from random-archer/dev-plymouth
plymouth support
- Loading branch information
Showing
18 changed files
with
364 additions
and
134 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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env bash | ||
|
||
# | ||
# Developer support: allow local install | ||
# | ||
|
||
set -e | ||
|
||
this_repo=$(dirname "$0") | ||
|
||
# manual package build and install steps: | ||
cd "$this_repo" | ||
rm -r -f pkg/ *.pkg.tar.xz | ||
makepkg -e | ||
sudo pacman -U *.pkg.tar.xz --noconfirm |
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 |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# This file is part of https://github.com/random-archer/mkinitcpio-systemd-tool | ||
|
||
# Provides crypto+plymouth support in initramfs | ||
# https://wiki.archlinux.org/index.php/plymouth | ||
# https://github.com/freedesktop/plymouth/blob/master/docs/development.txt | ||
|
||
# note: | ||
# experimental, see | ||
# * https://github.com/random-archer/mkinitcpio-systemd-tool/issues/59 | ||
|
||
# note: | ||
# this is a twin unit for initrd-plymouth.service | ||
# enable only initrd-plymouth.path, initrd-plymouth.service is activated on demand | ||
|
||
# note: | ||
# requries sd-plymouth in /etc/mkinitcpio.conf::HOOKS | ||
# HOOKS=(base ... systemd sd-plymouth systemd-tool) | ||
|
||
# note: | ||
# mutually exclusive with initrd-cryptestup.path | ||
# when both initrd-cryptestup.path and initrd-plymouth.path are | ||
# enabled via `systemctl enable`, kernel command line controls selection: | ||
# `plymouth.enable=0` : will result in activation of initrd-cryptestup.path | ||
# `plymouth.enable=1` : will result in activation of initrd-plymouth.path | ||
|
||
# service dependencies: | ||
# https://aur.archlinux.org/packages/plymouth/ | ||
|
||
[Unit] | ||
Description=Initrd Plymouth Path | ||
Documentation=https://github.com/random-archer/mkinitcpio-systemd-tool/blob/master/README.md | ||
ConditionPathExists=/etc/crypttab | ||
ConditionPathExists=/etc/fstab | ||
ConditionPathExists=/etc/initrd-release | ||
DefaultDependencies=no | ||
Conflicts=shutdown.target | ||
After=plymouth-start.service | ||
Before=basic.target shutdown.target | ||
Before=paths.target shutdown.target cryptsetup.target | ||
# respect plymouth kernel command line contract | ||
ConditionKernelCommandLine=!plymouth.enable=0 | ||
# note: plymouthd server intercepts /dev/console tty device | ||
ConditionPathExists=/run/plymouth/pid | ||
|
||
[Path] | ||
# bind to the twin unit | ||
Unit=initrd-plymouth.service | ||
# create monitored folder when missing | ||
MakeDirectory=yes | ||
# activate twin unit when cryptsetup request files are present | ||
DirectoryNotEmpty=/run/systemd/ask-password | ||
|
||
[Install] | ||
WantedBy=sysinit.target | ||
|
||
[X-SystemdTool] | ||
|
||
# inherit cryptsetup resources | ||
InitrdUnit=initrd-cryptsetup.path |
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,58 @@ | ||
# This file is part of https://github.com/random-archer/mkinitcpio-systemd-tool | ||
|
||
# Provides crypto+plymouth support in initramfs | ||
# https://wiki.archlinux.org/index.php/plymouth | ||
# https://github.com/freedesktop/plymouth/blob/master/docs/development.txt | ||
|
||
# note: | ||
# this is a twin unit for initrd-plymouth.service | ||
# enable only initrd-plymouth.path, initrd-plymouth.service is activated on demand | ||
|
||
# note: | ||
# * switch between plymouthd server text-vs-gui mode by pressing "ESC" key on /dev/console | ||
|
||
# service dependencies: | ||
# https://aur.archlinux.org/packages/plymouth/ | ||
|
||
[Unit] | ||
Description=Initrd Plymouth Service | ||
Documentation=https://github.com/random-archer/mkinitcpio-systemd-tool/blob/master/README.md | ||
ConditionPathExists=/etc/crypttab | ||
ConditionPathExists=/etc/fstab | ||
ConditionPathExists=/etc/initrd-release | ||
DefaultDependencies=no | ||
After=plymouth-start.service | ||
After=initrd-shell.service | ||
After=cryptsetup-pre.target | ||
Before=cryptsetup.target | ||
Requires=initrd-shell.service | ||
# respect plymouth kernel command line contract | ||
ConditionKernelCommandLine=!plymouth.enable=0 | ||
|
||
[Service] | ||
# invoke shell as service with "plymouth" mode | ||
ExecStart=/usr/lib/mkinitcpio-systemd-tool/initrd-shell.sh script_entry=service service_name=crypto_plymouth | ||
Restart=on-failure | ||
RestartSec=1s | ||
# successful crypto unlock is reported as 100 | ||
RestartPreventExitStatus=100 | ||
StandardInput=tty | ||
StandardOutput=inherit | ||
StandardError=inherit | ||
TTYPath=/dev/console | ||
|
||
[Install] | ||
# not used: activated on demand | ||
|
||
[X-SystemdTool] | ||
|
||
# disable default password agents | ||
InitrdPath=/usr/lib/systemd/system/systemd-ask-password-plymouth.path replace=yes create=yes | ||
InitrdPath=/usr/lib/systemd/system/systemd-ask-password-plymouth.service replace=yes create=yes | ||
|
||
# plymouth client app | ||
InitrdBinary=/usr/bin/plymouth | ||
|
||
# TODO | ||
# remove dependency on sd-plymouth, provision these resources: | ||
# https://aur.archlinux.org/cgit/aur.git/tree/sd-plymouth.initcpio_install?h=plymouth |
Oops, something went wrong.