forked from RP1/RaveOS-arch
added auto kernel headers install by AlexC
This commit is contained in:
parent
7b76876d4b
commit
f57e9eea8e
3 changed files with 171 additions and 3 deletions
|
@ -29,9 +29,65 @@ Locale=$(locale | grep "hu_HU" -c)
|
|||
|
||||
sudo sed -i 's/OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug lto !autodeps)/OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug !lto !autodeps)/' /etc/makepkg.conf
|
||||
|
||||
#!/bin/bash
|
||||
# Arch Linux linux-headers check and install script
|
||||
# AlexC (c) 2025
|
||||
|
||||
# Get the current kernel version
|
||||
kernel_version=$(uname -r)
|
||||
|
||||
# Check if the kernel version string is empty
|
||||
if [ -z "$kernel_version" ]; then
|
||||
echo "Kernel version is empty. Installing default headers..."
|
||||
kernel_version="linux" # Default to the generic Arch kernel headers
|
||||
else
|
||||
echo "Current kernel version: $kernel_version"
|
||||
fi
|
||||
|
||||
# Check if kernel is hardened, lts, or zen and set the corresponding header package
|
||||
if [[ "$kernel_version" == *"hardened"* ]]; then
|
||||
kernel_header_package="linux-hardened-headers"
|
||||
echo "Detected Hardened kernel."
|
||||
elif [[ "$kernel_version" == *"lts"* ]]; then
|
||||
kernel_header_package="linux-lts-headers"
|
||||
echo "Detected LTS kernel."
|
||||
elif [[ "$kernel_version" == *"zen"* ]]; then
|
||||
kernel_header_package="linux-zen-headers"
|
||||
echo "Detected Zen kernel."
|
||||
else
|
||||
kernel_header_package="linux-headers" # Default generic headers for Arch
|
||||
echo "Detected standard kernel."
|
||||
fi
|
||||
|
||||
# Check the distribution
|
||||
if [ -f /etc/os-release ]; then
|
||||
. /etc/os-release
|
||||
distro=$ID
|
||||
else
|
||||
echo "Cannot determine distribution."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Install the headers based on the detected kernel
|
||||
if [[ "$distro" == "arch" ]]; then
|
||||
echo "Setting up headers for Arch Linux..."
|
||||
|
||||
# Update the package database
|
||||
sudo pacman -Sy
|
||||
|
||||
# Install the corresponding headers
|
||||
sudo pacman -S --noconfirm "$kernel_header_package"
|
||||
|
||||
echo "Headers installed for kernel version $kernel_version."
|
||||
|
||||
else
|
||||
echo "Unsupported distribution: $distro"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Installing packages
|
||||
|
||||
sudo pacman -S tilix gnome-session gdm gnome-disk-utility gnome-system-monitor eog network-manager-applet networkmanager flatpak base-devel bash-completion gedit gnome-calculator baobab ffmpeg git gnome-control-center gparted gnome-tweaks gnome-browser-connector xdg-desktop-portal xdg-desktop-portal-gnome xdg-desktop-portal-gtk xdg-desktop-portal-wlr ttf-ubuntu-font-family gnome-settings-daemon unzip wget glib2 glib2-devel spice-vdagent hblock nano qt5-wayland meson rsync zenity mesa-utils gvfs gvfs-mtp gvfs-smb android-tools wmctrl zsh python-setuptools bluez bluez-tools linux-zen-headers ufw gufw --noconfirm
|
||||
sudo pacman -S tilix gnome-session gdm gnome-disk-utility gnome-system-monitor eog network-manager-applet networkmanager flatpak base-devel bash-completion gedit gnome-calculator baobab ffmpeg git gnome-control-center gparted gnome-tweaks gnome-browser-connector xdg-desktop-portal xdg-desktop-portal-gnome xdg-desktop-portal-gtk xdg-desktop-portal-wlr ttf-ubuntu-font-family gnome-settings-daemon unzip wget glib2 glib2-devel spice-vdagent hblock nano qt5-wayland meson rsync zenity mesa-utils gvfs gvfs-mtp gvfs-smb android-tools wmctrl zsh python-setuptools bluez bluez-tools ufw gufw --noconfirm
|
||||
sudo systemctl enable gdm.service
|
||||
sudo systemctl enable NetworkManager.service
|
||||
sudo systemctl enable bluetooth
|
||||
|
|
|
@ -31,9 +31,65 @@ Locale=$(echo $LANG)
|
|||
sudo sed -i 's/OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug lto !autodeps)/OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug !lto !autodeps)/' /etc/makepkg.conf
|
||||
echo 'MAKEFLAGS="-j8"' | sudo tee -a /etc/makepkg.conf > /dev/null
|
||||
|
||||
#!/bin/bash
|
||||
# Arch Linux linux-headers check and install script
|
||||
# AlexC (c) 2025
|
||||
|
||||
# Get the current kernel version
|
||||
kernel_version=$(uname -r)
|
||||
|
||||
# Check if the kernel version string is empty
|
||||
if [ -z "$kernel_version" ]; then
|
||||
echo "Kernel version is empty. Installing default headers..."
|
||||
kernel_version="linux" # Default to the generic Arch kernel headers
|
||||
else
|
||||
echo "Current kernel version: $kernel_version"
|
||||
fi
|
||||
|
||||
# Check if kernel is hardened, lts, or zen and set the corresponding header package
|
||||
if [[ "$kernel_version" == *"hardened"* ]]; then
|
||||
kernel_header_package="linux-hardened-headers"
|
||||
echo "Detected Hardened kernel."
|
||||
elif [[ "$kernel_version" == *"lts"* ]]; then
|
||||
kernel_header_package="linux-lts-headers"
|
||||
echo "Detected LTS kernel."
|
||||
elif [[ "$kernel_version" == *"zen"* ]]; then
|
||||
kernel_header_package="linux-zen-headers"
|
||||
echo "Detected Zen kernel."
|
||||
else
|
||||
kernel_header_package="linux-headers" # Default generic headers for Arch
|
||||
echo "Detected standard kernel."
|
||||
fi
|
||||
|
||||
# Check the distribution
|
||||
if [ -f /etc/os-release ]; then
|
||||
. /etc/os-release
|
||||
distro=$ID
|
||||
else
|
||||
echo "Cannot determine distribution."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Install the headers based on the detected kernel
|
||||
if [[ "$distro" == "arch" ]]; then
|
||||
echo "Setting up headers for Arch Linux..."
|
||||
|
||||
# Update the package database
|
||||
sudo pacman -Sy
|
||||
|
||||
# Install the corresponding headers
|
||||
sudo pacman -S --noconfirm "$kernel_header_package"
|
||||
|
||||
echo "Headers installed for kernel version $kernel_version."
|
||||
|
||||
else
|
||||
echo "Unsupported distribution: $distro"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Installing packages
|
||||
|
||||
sudo pacman -S tilix gnome-session gdm gnome-disk-utility gnome-system-monitor eog network-manager-applet networkmanager flatpak base-devel bash-completion gedit gnome-calculator baobab ffmpeg git gnome-control-center gparted gnome-tweaks gnome-browser-connector xdg-desktop-portal xdg-desktop-portal-gnome xdg-desktop-portal-gtk xdg-desktop-portal-wlr ttf-ubuntu-font-family gnome-settings-daemon unzip wget glib2 glib2-devel spice-vdagent hblock nano qt5-wayland meson rsync zenity mesa-utils gvfs gvfs-mtp gvfs-smb android-tools wmctrl zsh python-setuptools bluez linux-zen-headers ufw gufw --noconfirm
|
||||
sudo pacman -S tilix gnome-session gdm gnome-disk-utility gnome-system-monitor eog network-manager-applet networkmanager flatpak base-devel bash-completion gedit gnome-calculator baobab ffmpeg git gnome-control-center gparted gnome-tweaks gnome-browser-connector xdg-desktop-portal xdg-desktop-portal-gnome xdg-desktop-portal-gtk xdg-desktop-portal-wlr ttf-ubuntu-font-family gnome-settings-daemon unzip wget glib2 glib2-devel spice-vdagent hblock nano qt5-wayland meson rsync zenity mesa-utils gvfs gvfs-mtp gvfs-smb android-tools wmctrl zsh python-setuptools bluez ufw gufw --noconfirm
|
||||
sudo systemctl enable bluetooth
|
||||
sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target geoclue.service
|
||||
flatpak remote-add --if-not-exists --user flathub https://dl.flathub.org/repo/flathub.flatpakrepo
|
||||
|
|
|
@ -20,6 +20,62 @@ CPU=$(lscpu | grep "AMD" -c)
|
|||
nVidia=$(lspci -P | grep "NVIDIA" -c)
|
||||
Locale=$(locale | grep "hu_HU" -c)
|
||||
|
||||
#!/bin/bash
|
||||
# Arch Linux linux-headers check and install script
|
||||
# AlexC (c) 2025
|
||||
|
||||
# Get the current kernel version
|
||||
kernel_version=$(uname -r)
|
||||
|
||||
# Check if the kernel version string is empty
|
||||
if [ -z "$kernel_version" ]; then
|
||||
echo "Kernel version is empty. Installing default headers..."
|
||||
kernel_version="linux" # Default to the generic Arch kernel headers
|
||||
else
|
||||
echo "Current kernel version: $kernel_version"
|
||||
fi
|
||||
|
||||
# Check if kernel is hardened, lts, or zen and set the corresponding header package
|
||||
if [[ "$kernel_version" == *"hardened"* ]]; then
|
||||
kernel_header_package="linux-hardened-headers"
|
||||
echo "Detected Hardened kernel."
|
||||
elif [[ "$kernel_version" == *"lts"* ]]; then
|
||||
kernel_header_package="linux-lts-headers"
|
||||
echo "Detected LTS kernel."
|
||||
elif [[ "$kernel_version" == *"zen"* ]]; then
|
||||
kernel_header_package="linux-zen-headers"
|
||||
echo "Detected Zen kernel."
|
||||
else
|
||||
kernel_header_package="linux-headers" # Default generic headers for Arch
|
||||
echo "Detected standard kernel."
|
||||
fi
|
||||
|
||||
# Check the distribution
|
||||
if [ -f /etc/os-release ]; then
|
||||
. /etc/os-release
|
||||
distro=$ID
|
||||
else
|
||||
echo "Cannot determine distribution."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Install the headers based on the detected kernel
|
||||
if [[ "$distro" == "arch" ]]; then
|
||||
echo "Setting up headers for Arch Linux..."
|
||||
|
||||
# Update the package database
|
||||
sudo pacman -Sy
|
||||
|
||||
# Install the corresponding headers
|
||||
sudo pacman -S --noconfirm "$kernel_header_package"
|
||||
|
||||
echo "Headers installed for kernel version $kernel_version."
|
||||
|
||||
else
|
||||
echo "Unsupported distribution: $distro"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Deleting password for the script to run uninterrapted
|
||||
|
||||
echo "$USER ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/99-$USER
|
||||
|
@ -31,7 +87,7 @@ Locale=$(locale | grep "hu_HU" -c)
|
|||
|
||||
# Installing packages
|
||||
|
||||
sudo pacman -S sddm plasma-desktop plasma-wayland-protocols plasma-systemmonitor dolphin konsole gnome-disk-utility ark kscreen kmix inkscape network-manager-applet networkmanager flatpak base-devel bash-completion kate kcalc baobab ffmpeg git gparted xdg-desktop-portal xdg-desktop-portal-gtk plasma-browser-integration xdg-desktop-portal-wlr ttf-ubuntu-font-family unzip wget glib2 glib2-devel spice-vdagent hblock nano qt5-wayland meson rsync zenity mesa-utils gvfs gvfs-mtp gvfs-smb android-tools wmctrl zsh python-setuptools bluez linux-zen-headers qt5-graphicaleffects qt5-quickcontrols2 ufw gufw spectacle bluez-qt bluez-qt5 bluez-libs bluez-tools --noconfirm
|
||||
sudo pacman -S sddm plasma-desktop plasma-wayland-protocols plasma-systemmonitor dolphin konsole gnome-disk-utility ark kscreen kmix inkscape network-manager-applet networkmanager flatpak base-devel bash-completion kate kcalc baobab ffmpeg git gparted xdg-desktop-portal xdg-desktop-portal-gtk plasma-browser-integration xdg-desktop-portal-wlr ttf-ubuntu-font-family unzip wget glib2 glib2-devel spice-vdagent hblock nano qt5-wayland meson rsync zenity mesa-utils gvfs gvfs-mtp gvfs-smb android-tools wmctrl zsh python-setuptools bluez qt5-graphicaleffects qt5-quickcontrols2 ufw gufw spectacle bluez-qt bluez-qt5 bluez-libs bluez-tools --noconfirm
|
||||
sudo systemctl enable NetworkManager.service
|
||||
sudo systemctl enable sddm.service
|
||||
sudo systemctl enable bluetooth
|
||||
|
|
Loading…
Reference in a new issue