From c6bac1d6dc8a55ce767fbe866f93965f61a6e6f6 Mon Sep 17 00:00:00 2001 From: Zaunz Kenny Date: Mon, 23 Nov 2026 11:28:18 +0100 Subject: [PATCH] Split Script in Sub Scripts --- CoreBSD.sh | 69 ++------------------------------------- CoreBSD_GraphicDrivers.sh | 38 +++++++++++++++++++++ CoreBSD_Packages.sh | 40 +++++++++++++++++++++++ 3 files changed, 80 insertions(+), 67 deletions(-) create mode 100644 CoreBSD_GraphicDrivers.sh create mode 100644 CoreBSD_Packages.sh diff --git a/CoreBSD.sh b/CoreBSD.sh index 7ef58d1..c19f09a 100644 --- a/CoreBSD.sh +++ b/CoreBSD.sh @@ -1,72 +1,7 @@ #!/usr/bin/bash -#pkg install bash curl -# curl -s https://file.zaunz.org/files/CoreBSD/CoreBSD.sh | bash # backlight -f backlight0 80 -# Install packages -packages=( - nano - bash - firefox - curl - mate - sddm - wget - python3 - xorg - rust-script - rust - sudo - zip - unzip -) -for pkg in "${packages[@]}"; do - if ! pkg info -e "$pkg"; then - echo "Installing $pkg..." - pkg install -y "$pkg" - fi -done +bash ./CoreBSD_Packages.sh -# For each USER -for homedir in /home/*; do - [ -d "$homedir" ] || continue - user=$(basename "$homedir") - pw groupmod video -m $user - pw groupmod wheel -m $user -done - -if pciconf -vl | grep -q "Kaby Lake-H GT2"; then - echo "Kaby Lake-H GT2 found" - packages=( - gpu-firmware-intel-kmod-kabylake - drm-latest-kmod - ) - for pkg in "${packages[@]}"; do - if ! pkg info -e "$pkg"; then - echo "Installing $pkg..." - pkg install -y "$pkg" - fi - done - sysrc kld_list+=i915kms -fi - -if pciconf -vl | grep -q "Alder Lake-N"; then - echo "Alder Lake-N found" - packages=( - gpu-firmware-intel-kmod-alderlake - drm-latest-kmod - ) - for pkg in "${packages[@]}"; do - if ! pkg info -e "$pkg"; then - echo "Installing $pkg..." - pkg install -y "$pkg" - fi - done - sysrc kld_list+=i915kms -fi - -sysrc sddm_enable="YES" -sysrc lang="de_DE.UTF-8" - -grep -qxF '%wheel ALL=(ALL:ALL) ALL' /usr/local/etc/sudoers || echo '%wheel ALL=(ALL:ALL) ALL' | sudo tee -a /usr/local/etc/sudoers +bash ./CoreBSD_GraphicDrivers.sh diff --git a/CoreBSD_GraphicDrivers.sh b/CoreBSD_GraphicDrivers.sh new file mode 100644 index 0000000..29fa9f7 --- /dev/null +++ b/CoreBSD_GraphicDrivers.sh @@ -0,0 +1,38 @@ +#!/usr/bin/bash + +# For each USER +for homedir in /home/*; do + [ -d "$homedir" ] || continue + user=$(basename "$homedir") + pw groupmod video -m $user +done + +if pciconf -vl | grep -q "Kaby Lake-H GT2"; then + echo "Kaby Lake-H GT2 found" + packages=( + gpu-firmware-intel-kmod-kabylake + drm-latest-kmod + ) + for pkg in "${packages[@]}"; do + if ! pkg info -e "$pkg"; then + echo "Installing $pkg..." + pkg install -y "$pkg" + fi + done + sysrc kld_list+=i915kms +fi + +if pciconf -vl | grep -q "Alder Lake-N"; then + echo "Alder Lake-N found" + packages=( + gpu-firmware-intel-kmod-alderlake + drm-latest-kmod + ) + for pkg in "${packages[@]}"; do + if ! pkg info -e "$pkg"; then + echo "Installing $pkg..." + pkg install -y "$pkg" + fi + done + sysrc kld_list+=i915kms +fi diff --git a/CoreBSD_Packages.sh b/CoreBSD_Packages.sh new file mode 100644 index 0000000..4c8f97e --- /dev/null +++ b/CoreBSD_Packages.sh @@ -0,0 +1,40 @@ +#!/usr/bin/bash + +echo "CoreBSD Packages" + +# Install packages +packages=( + nano + bash + firefox + curl + mate + sddm + wget + python3 + xorg + rust-script + rust + sudo + zip + unzip +) +for pkg in "${packages[@]}"; do + if ! pkg info -e "$pkg"; then + echo "Installing $pkg..." + pkg install -y "$pkg" + fi +done + +# For each USER +for homedir in /home/*; do + [ -d "$homedir" ] || continue + user=$(basename "$homedir") + pw groupmod wheel -m $user +done + +sysrc sddm_enable="YES" + +sysrc lang="de_DE.UTF-8" + +grep -qxF '%wheel ALL=(ALL:ALL) ALL' /usr/local/etc/sudoers || echo '%wheel ALL=(ALL:ALL) ALL' | sudo tee -a /usr/local/etc/sudoers