feat: cleanup

This commit is contained in:
ange 2025-06-21 06:30:06 +00:00
parent 92f562a03e
commit 649806d52d
Signed by: ange
GPG key ID: 9E0C4157BB7BEB1D
11 changed files with 212 additions and 64 deletions

View file

@ -5,10 +5,10 @@ root="$(findmnt -n -osource /)"
boot="$(lsblk -ls -oname /dev/disk/by-partlabel/boot | tail -n1)"
cryptdev="$(cryptsetup status "$root" | awk '/device/ {print $2}')"
[ -n "$cryptdev" ] && {
if [ -n "$cryptdev" ]; then
uuid="$(blkid | grep "$cryptdev" | awk '{print $2}')"
options="cryptdevice=$uuid:${root##*/} "
}
fi
options="${options}root=$root rw"