This commit is contained in:
Your Name 2023-05-09 14:55:46 -06:00
parent 71ab829ea5
commit 78e2b353d7

View File

@ -208,7 +208,6 @@ make-image() {
locale locale
custom_service_files custom_service_files
cp -f debian.sh $TARGET/usr/bin/ cp -f debian.sh $TARGET/usr/bin/
cp -f debian.tar $TARGET/etc/default/
echo 'bash /usr/bin/debian.sh kernel-packages' >>$TARGET/setup.sh echo 'bash /usr/bin/debian.sh kernel-packages' >>$TARGET/setup.sh
echo "bash /usr/bin/debian.sh bootloader $1 $ROOT_NAME $ROOT_MAPPER_NAME" >>$TARGET/setup.sh echo "bash /usr/bin/debian.sh bootloader $1 $ROOT_NAME $ROOT_MAPPER_NAME" >>$TARGET/setup.sh
echo 'bash /usr/bin/debian.sh grub-snapshots' >>$TARGET/setup.sh echo 'bash /usr/bin/debian.sh grub-snapshots' >>$TARGET/setup.sh
@ -239,7 +238,6 @@ install() {
cp -f /etc/resolv.conf $TARGET/etc/ cp -f /etc/resolv.conf $TARGET/etc/
echo "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" >$TARGET/setup.sh echo "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" >$TARGET/setup.sh
configure-repository configure-repository
cp -f debian.tar $TARGET/etc/default/
locale locale
auto_login auto_login
custom_service_files custom_service_files
@ -294,22 +292,6 @@ kernel-packages() {
/usr/bin/apt install --reinstall -y linux-image-amd64 grub-efi efibootmgr plymouth plymouth-themes btrfs-progs cryptsetup-initramfs linux-image-amd64 linux-headers-amd64 firmware-iwlwifi firmware-linux firmware-linux-nonfree /usr/bin/apt install --reinstall -y linux-image-amd64 grub-efi efibootmgr plymouth plymouth-themes btrfs-progs cryptsetup-initramfs linux-image-amd64 linux-headers-amd64 firmware-iwlwifi firmware-linux firmware-linux-nonfree
} }
secure-boot() {
if [ -z "$1" ]; then
clear
echo
echo "Error: No Disk specified!"
echo
else
clear
echo
echo "Disabling Automatic Password Decryption for Hard Disk....."
echo
AUTO_DECRYPT='False'
bootloader "$1" "$ROOT_NAME" "$ROOT_MAPPER_NAME"
fi
}
bootloader() { bootloader() {
if [ -z "$1" ]; then if [ -z "$1" ]; then
echo echo
@ -318,10 +300,7 @@ bootloader() {
else else
ROOT_MAPPER_NAME="$3" ROOT_MAPPER_NAME="$3"
ROOT_NAME="$2" ROOT_NAME="$2"
rm -rf /boot/grub/themes plymouth-set-default-theme -r
mkdir -p /boot/grub/themes
tar xf /etc/default/debian.tar -C /boot/grub/themes/
plymouth-set-default-theme -R spacefun
echo "$ROOT_MAPPER_NAME UUID=$(/sbin/blkid | grep $BTRFS | cut -d '"' -f2) none luks" >/etc/crypttab echo "$ROOT_MAPPER_NAME UUID=$(/sbin/blkid | grep $BTRFS | cut -d '"' -f2) none luks" >/etc/crypttab
if [ "$AUTO_DECRYPT" == "True" ]; then if [ "$AUTO_DECRYPT" == "True" ]; then
decryptBoot "${BTRFS}" decryptBoot "${BTRFS}"
@ -582,9 +561,11 @@ menu() {
set-devices set-devices
read -p 'Unlock Disk without password at boot time? ' -e -i "y" root_name read -p 'Unlock Disk without password at boot time? ' -e -i "y" root_name
if [[ $pass_change = *n* ]]; then if [[ $pass_change = *n* ]]; then
AUTO_DECRYPT="False"
bootloader "$HARD_DISK" "$ROOT_NAME" "$ROOT_MAPPER_NAME" bootloader "$HARD_DISK" "$ROOT_NAME" "$ROOT_MAPPER_NAME"
else else
secure-boot "$HARD_DISK" AUTO_DECRYPT="True"
bootloader "$HARD_DISK" "$ROOT_NAME" "$ROOT_MAPPER_NAME"
fi fi
elif [[ $choice = 6 ]]; then elif [[ $choice = 6 ]]; then
clear clear