set power button functionalitty to ignore state
This commit is contained in:
@@ -1,16 +1,12 @@
|
||||
#!/bin/bash
|
||||
# Detect system distro and architecture
|
||||
|
||||
detect_system() {
|
||||
# Detect architecture
|
||||
ARCH=$(uname -m)
|
||||
|
||||
# Detect distribution
|
||||
if [ -f /etc/os-release ]; then
|
||||
. /etc/os-release
|
||||
DISTRO_NAME=${ID,,} # Convert to lowercase
|
||||
|
||||
# Check if it's an Arch-based distro
|
||||
for arch_distro in "${ARCH_DISTROS[@]}"; do
|
||||
if [[ "$DISTRO_NAME" == *"$arch_distro"* ]]; then
|
||||
DISTRO="arch"
|
||||
@@ -18,7 +14,6 @@ detect_system() {
|
||||
fi
|
||||
done
|
||||
|
||||
# Check if it's a Debian-based distro
|
||||
for deb_distro in "${DEB_DISTROS[@]}"; do
|
||||
if [[ "$DISTRO_NAME" == *"$deb_distro"* ]]; then
|
||||
DISTRO="debian"
|
||||
@@ -26,7 +21,6 @@ detect_system() {
|
||||
fi
|
||||
done
|
||||
|
||||
# Check if it's an RPM-based distro
|
||||
for rpm_distro in "${RPM_DISTROS[@]}"; do
|
||||
if [[ "$DISTRO_NAME" == *"$rpm_distro"* ]]; then
|
||||
DISTRO="redhat"
|
||||
@@ -34,7 +28,6 @@ detect_system() {
|
||||
fi
|
||||
done
|
||||
|
||||
# If we can't determine the distro family, just use the ID
|
||||
DISTRO="$DISTRO_NAME"
|
||||
elif [ -f /etc/arch-release ]; then
|
||||
DISTRO="arch"
|
||||
|
Reference in New Issue
Block a user