Repository URL to install this package:
|
Version:
14.3.0 ▾
|
#!/bin/bash
CHROOT=$(mount | grep proc | grep calamares | awk '{print $3}' | sed -e "s#/proc##g")
# Install luks utilities if needed.
# Also, set secure permissions for the initramfs if we're configuring
# full-disk-encryption. The initramfs is re-generated later in the
# installation process so we only set the permissions snippet without
# regenerating the initramfs right now:
chroot $CHROOT apt update
if [ "$(mount | grep $CHROOT" " | cut -c -16)" = "/dev/mapper/luks" ]; then
echo "UMASK=0077" > $CHROOT/etc/initramfs-tools/conf.d/initramfs-permissions
chroot $CHROOT apt -y install cryptsetup-initramfs cryptsetup keyutils unl0kr
fi
echo "Running bootloader-config..."
if [ -d /sys/firmware/efi/efivars ]; then
echo " * Installing grub-efi (uefi)..."
DEBIAN_FRONTEND=noninteractive chroot $CHROOT apt -y install grub-efi-amd64
else
echo " * install grub... (bios)"
DEBIAN_FRONTEND=noninteractive chroot $CHROOT apt -y install grub-pc
fi
# Re-enable os-prober:
sed -i "s/#GRUB_DISABLE_OS_PROBER=false/# OS_PROBER re-enabled by Debian Calamares installation:\nGRUB_DISABLE_OS_PROBER=false/g" $CHROOT/etc/default/grub
chroot $CHROOT /usr/sbin/update-grub
# Install Juno Drivers (Clevo Laptops)
baseboard="$(dmidecode -s baseboard-manufacturer | awk '{print $1}' | awk '{ print tolower($0) }')"
product_model="$(sed -e 's/^\s*//g' -e 's/\s*$//g' "/sys/devices/virtual/dmi/id/product_name" | tr ' ,/-' '_')"
case "$baseboard" in
clevo|notebook)
echo "Clevo $product_model detected";
chroot $CHROOT apt install juno-drivers -y;
chroot $CHROOT apt install juno-fan-indicator -y;
chroot $CHROOT apt install clevo-keyboard-controller -y;
chroot $CHROOT dpkg --configure -a;
chroot $CHROOT apt autoremove -y && apt autoclean
;;
bmorn|tongfang|aistone)
echo "$product_model detected"
chroot $CHROOT apt install juno-drivers -y;
chroot $CHROOT dpkg --configure -a;
chroot $CHROOT apt autoremove -y && apt autoclean
;;
esac
# Juno Tab drivers
touchscreen="$(dmesg | grep -ioh "touchscreen\|goodix" | head -1 | awk '{ print tolower($0) }')"
case "$touchscreen" in
touchscreen|goodix)
echo "Juno Tab detected";
chroot $CHROOT apt install juno-tablet -y;
chroot $CHROOT dpkg --configure -a;
chroot $CHROOT apt autoremove -y && apt autoclean
;;
esac
# RGB Per Key Keyboard
ite="$(lsusb | grep -ioh '829x\|8291\|8297' | head -1)"
case "$ite" in
829x|8291|8295|8297)
echo "ITE Keyboard Detected";
chroot $CHROOT apt install clevo-keyboard-ite -y;
chroot $CHROOT dpkg --configure -a;
chroot $CHROOT apt autoremove -y && apt autoclean
;;
esac
# yt6801 ethernet driver
yt6801="$(lshw | grep -ioh 'yt6801' | head -1)"
case "$yt6801" in
yt6801|YT6801)
echo "YT6801 Detected";
chroot $CHROOT apt install yt6801 -y;
chroot $CHROOT dpkg --configure -a;
chroot $CHROOT apt autoremove -y && apt autoclean
;;
esac