File tree Expand file tree Collapse file tree 5 files changed +37
-14
lines changed Expand file tree Collapse file tree 5 files changed +37
-14
lines changed Original file line number Diff line number Diff line change 22
33# TODO
44# currently systemd requires use of "root=" kenel argument for /sysroot mount
5- # https ://github. com/systemd/systemd/blob/master/src/fstab-generator/fstab-generator.c
5+ # http ://unix.stackexchange. com/questions/289672/kernel-init-without-root-parameter
66
77# fstab: mappings for direct partitions
88
1111
1212# how fstab is used by systemd
1313# https://www.freedesktop.org/software/systemd/man/systemd-fstab-generator.html
14+ # https://github.com/systemd/systemd/blob/master/src/fstab-generator/fstab-generator.c
1415
1516# provide here root partition description (instead of kernel command line)
1617
17- # <file system> <dir> <type> <option <dump> <pass>
18- # /dev/mapper/swap none swap defaults 0 0
19- # /dev/mapper/root /sysroot ext4 defaults,ro 0 1
18+ # <file system> <dir> <type> <option> <dump> <pass>
19+ # /dev/mapper/swap none swap defaults 0 0
20+ # /dev/mapper/root /sysroot ext4 defaults,ro 0 1
Original file line number Diff line number Diff line change 1+ # This file is part of https://github.com/random-archer/mkinitcpio-systemd-tool
2+
3+ [Unit]
4+ Description=Initrd Cryptsetup Path
5+ Documentation=https://github.com/random-archer/mkinitcpio-systemd-tool/blob/master/README.md
6+ ConditionPathExists=/etc/crypttab
7+ ConditionPathExists=/etc/initrd-release
8+ #ConditionPathExists=!/run/plymouth/pid
9+ DefaultDependencies=no
10+ Conflicts=shutdown.target
11+ After=plymouth-start.service
12+ Before=paths.target shutdown.target
13+
14+ [Path]
15+ MakeDirectory=yes
16+ DirectoryNotEmpty=/run/systemd/ask-password
17+
18+ [Install]
19+ WantedBy=sysinit.target
20+
21+ [X-SystemdTool]
22+
23+ # enable service
24+ InitrdService=enable
25+
26+ # disable default password agents
27+ InitrdPath=/usr/lib/systemd/system/systemd-ask-password-console.path replace=yes create=yes
28+ InitrdPath=/usr/lib/systemd/system/systemd-ask-password-wall.path replace=yes create=yes
Original file line number Diff line number Diff line change @@ -28,14 +28,8 @@ StandardOutput=inherit
2828StandardError =inherit
2929TTYPath =/dev/console
3030
31- [Install]
32- WantedBy =sysinit.target
33-
3431[X-SystemdTool]
3532
36- # enable service
37- InitrdService =enable
38-
3933# provision disk tables in initramfs
4034InitrdPath =/etc/crypttab source =/etc/mkinitcpio.d/crypttab replace =yes
4135InitrdPath =/etc/fstab source =/etc/mkinitcpio.d/fstab replace =yes
Original file line number Diff line number Diff line change @@ -33,9 +33,9 @@ InitrdBinary=/usr/bin/journalctl
3333InitrdLink =/root/.profile /etc/systemd/system/initrd-shell.sh
3434
3535# configure user settings
36- InitrdPath =/etc/group
37- InitrdPath =/etc/passwd
38- InitrdPath =/etc/shadow
36+ InitrdPath =/etc/group replace =yes
37+ InitrdPath =/etc/passwd replace =yes
38+ InitrdPath =/etc/shadow replace =yes
3939InitrdBuild =/etc/systemd/system/initrd-build.sh command =do_root_shell
4040InitrdBuild =/etc/systemd/system/initrd-build.sh command =do_secret_clean
4141
Original file line number Diff line number Diff line change @@ -262,6 +262,7 @@ service_default() {
262262# cryptsetup service implementation
263263service_cryptsetup () {
264264 log_info " cryptsetup service"
265+ [[ $watch_folder ]] || log_error " missing $watch_folder "
265266 if has_crypt_jobs ; then
266267 run_crypt_jobs
267268 else
@@ -379,7 +380,6 @@ setup_interrupts() {
379380# respond depending on script invocation type [script_entry=xxx]
380381process_invocation () {
381382 log_info " init"
382- mkdir -p " $watch_folder " || log_error " can not make $watch_folder "
383383 case " $script_entry " in
384384 # development
385385 exit) do_exit ;;
You can’t perform that action at this time.
0 commit comments