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"

View file

@ -4,5 +4,7 @@
shell="$(sed -n "/$shell/{p;q}" /etc/shells)"
useradd -mG wheel,video "$username" -s "${shell:-/bin/bash}"
[ -n "$rootpasswd" ] && echo "root:$rootpasswd" | chpasswd
if [ -n "$rootpasswd" ]; then
echo "root:$rootpasswd" | chpasswd
fi
echo "$username:$userpasswd" | chpasswd

View file

@ -1,5 +0,0 @@
#!/bin/bash
#shellcheck disable=SC2154
[ -s /chroot/flatpak.txt ] \
&& xargs flatpak install -y --noninteractive < /chroot/flatpak.txt