feat: cleanup
This commit is contained in:
parent
92f562a03e
commit
649806d52d
11 changed files with 212 additions and 64 deletions
|
|
@ -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"
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
#!/bin/bash
|
||||
#shellcheck disable=SC2154
|
||||
|
||||
[ -s /chroot/flatpak.txt ] \
|
||||
&& xargs flatpak install -y --noninteractive < /chroot/flatpak.txt
|
||||
Loading…
Add table
Add a link
Reference in a new issue