feat: full rewrite in modules
This commit is contained in:
parent
33725b0188
commit
5cc6a0dd08
31 changed files with 283 additions and 215 deletions
20
modules/10-chroot/10-bootloader.sh
Normal file
20
modules/10-chroot/10-bootloader.sh
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
#shellcheck disable=SC2154
|
||||
|
||||
bootctl install
|
||||
|
||||
root="$(findmnt -nr -o source /)"
|
||||
|
||||
cryptdev="$(cryptsetup status "$root" | awk '/device/ {print $2}')"
|
||||
[ -n "$cryptdev" ] && {
|
||||
uuid="$(blkid | grep "$cryptdev" | awk '{print $2}')"
|
||||
options="cryptdevice=$uuid:$(basename "$root") "
|
||||
}
|
||||
|
||||
options="${options}root=$root"
|
||||
|
||||
for f in /boot/loader/entries/*.conf; do
|
||||
cat << EOF >> "$f"
|
||||
options $options rw
|
||||
EOF
|
||||
done
|
||||
Loading…
Add table
Add a link
Reference in a new issue