diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index f6a87d27..bfc631c1 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1,4 @@ -* @castrojo +* @NiHaiden +* @RealVishy +* @nicknamenamenick +* @ledif diff --git a/system_files/shared/usr/lib/systemd/system/aurora-groups.service b/system_files/shared/usr/lib/systemd/system/aurora-groups.service index dc027a98..2135e533 100644 --- a/system_files/shared/usr/lib/systemd/system/aurora-groups.service +++ b/system_files/shared/usr/lib/systemd/system/aurora-groups.service @@ -1,10 +1,12 @@ [Unit] Description=Add plugdev groups + [Service] Type=oneshot -ExecStart=/usr/libexec/aurora-groups +ExecStart=/usr/libexec/aurora-groups.sh Restart=on-failure RestartSec=30 StartLimitInterval=0 + [Install] WantedBy=default.target \ No newline at end of file diff --git a/system_files/shared/usr/libexec/aurora-groups.sh b/system_files/shared/usr/libexec/aurora-groups.sh old mode 100644 new mode 100755 index 5ab2c389..7cf18bd7 --- a/system_files/shared/usr/libexec/aurora-groups.sh +++ b/system_files/shared/usr/libexec/aurora-groups.sh @@ -1,13 +1,16 @@ #!/usr/bin/env bash + # SCRIPT VERSION GROUP_SETUP_VER=1 GROUP_SETUP_VER_FILE="/etc/ublue/aurora-groups" GROUP_SETUP_VER_RAN=$(cat "$GROUP_SETUP_VER_FILE") + # Run script if updated if [[ -f $GROUP_SETUP_VER_FILE && "$GROUP_SETUP_VER" = "$GROUP_SETUP_VER_RAN" ]]; then echo "Group setup has already run. Exiting..." exit 0 fi + # Function to append a group entry to /etc/group append_group() { local group_name="$1" @@ -16,13 +19,16 @@ append_group() { grep "^$group_name:" /usr/lib/group | tee -a /etc/group > /dev/null fi } + # Setup Groups append_group plugdev + wheelarray=($(getent group wheel | cut -d ":" -f 4 | tr ',' '\n')) -for user in $wheelarray +for user in "${wheelarray[@]}" do usermod -aG plugdev $user done + # Prevent future executions echo "Writing state file" echo "$GROUP_SETUP_VER" > "$GROUP_SETUP_VER_FILE" \ No newline at end of file diff --git a/system_files/shared/usr/libexec/ublue-system-setup b/system_files/shared/usr/libexec/ublue-system-setup index 9bee40a2..38eeacd3 100755 --- a/system_files/shared/usr/libexec/ublue-system-setup +++ b/system_files/shared/usr/libexec/ublue-system-setup @@ -9,7 +9,7 @@ VEN_ID="$(cat /sys/devices/virtual/dmi/id/chassis_vendor)" CPU_VENDOR=$(grep "vendor_id" "/proc/cpuinfo" | uniq | awk -F": " '{ print $2 }') # SCRIPT VERSION -HWS_VER=3 +HWS_VER=4 HWS_VER_FILE="/etc/ublue/hws_version" [[ -f "$HWS_VER_FILE" ]] && HWS_VER_RAN=$(cat $HWS_VER_FILE) @@ -63,9 +63,11 @@ else echo "No karg changes needed" fi +SYS_ID="$(cat /sys/devices/virtual/dmi/id/product_name)" + # FRAMEWORK 13 AMD FIXES if [[ ":Framework:" =~ ":$VEN_ID:" ]]; then - if [[ $SYS_ID == "Laptop ("* ]]; then + if [[ $SYS_ID == "Laptop 13 ("* ]]; then if [[ "AuthenticAMD" == "$CPU_VENDOR" ]]; then if [[ ! -f /etc/modprobe.d/alsa.conf ]]; then echo 'Fixing 3.5mm jack'