Broadcom, Utils & Headless Fixes

- Removed dead Broadcom hardware IDs (4357/4358/4360/4727) from `_is_broadcom_b43`, retaining only valid ID 4352 to eliminate false positives in the case statement.
- Added a guard in `_handle_wireless` Level 3 to verify `linux-headers` availability via `apt-cache policy`. Skips DKMS compilation if headers are missing, preventing transaction failures during installation.
- Implemented Broadcom combo card detection (WiFi + Bluetooth) by scanning `PCI_BT_DEVS`. Automatically writes `/etc/modprobe.d/broadcom-combo.conf` with `softdep wl post: btusb` and warns users about potential reboot requirements.
- Enhanced Level 2 (`firmware-b43-installer`) with post-installation validation for `/lib/firmware/b43`. Provides clear recovery instructions via `sudo dpkg-reconfigure firmware-b43-installer` if the directory is empty or missing after installation.
- Created a new helper `_msg_red()` in `utils.sh` to handle critical error messages with colored Whiptail output, replacing standard alerts for migration warnings and failures.
- Updated `repos/migrate.sh` to use `_msg_red()` for branch migration warnings and failure states, ensuring visibility of critical issues while keeping completion messages informative.
- Verified headless mode guards across 16 separate extras files (`office.sh`, `fetch.sh`, `cursors.sh`, etc.), preventing unnecessary package installations on servers without display environments.
- Completed syntax verification (`bash -n`) across all core and extra modules, ensuring no errors in the updated logic for firmware, gaming, swap, or repository management scripts.
- update readme.md
This commit is contained in:
stornic56
2026-07-10 19:50:36 -05:00
committed by GitHub
parent a91b0caa25
commit 2ebb33460c
21 changed files with 535 additions and 344 deletions
+30 -18
View File
@@ -550,6 +550,10 @@ _msg() {
whiptail --title "$1" --msgbox "$2" "${3:-10}" "${4:-65}" || true
}
_msg_red() {
whiptail --colors --title "\Z1$1\Zn" --msgbox "\Z1$2\Zn" "${3:-12}" "${4:-70}" || true
}
_menu() {
local title="$1" text="$2" h="$3" w="$4" lh="$5"; shift 5
whiptail --title "$title" --menu "$text" "$h" "$w" "$lh" "$@" 3>&1 1>&2 2>&3 || true
@@ -582,9 +586,8 @@ _validate_sudoers() {
}
_pause() {
echo ""
echo "Press [ENTER] to continue..."
read -r
local msg="${1:-Presiona OK para continuar.}"
whiptail --title "Continuar" --msgbox "$msg" 8 50 3>&1 1>&2 2>&3 || true
}
# Blocks 2-4: clear → run → pause
@@ -712,22 +715,31 @@ _check_network() {
# ----------------------------------
# LightDM configuration
# ----------------------------------
_configure_lightdm() {
_configure_lightdm() {
command -v lightdm &>/dev/null || return 0
if ! is_installed lightdm-gtk-greeter-settings; then
echo -e "${YELLOW}Installing lightdm-gtk-greeter-settings...${NC}"
sudo DEBIAN_FRONTEND=noninteractive apt install -y lightdm-gtk-greeter-settings
if _confirm "LightDM" "Configure LightDM to show the user list on the login screen?\n\nThis disables greeter-hide-users."; then
if ! is_installed lightdm-gtk-greeter-settings; then
echo -e "${YELLOW}Installing lightdm-gtk-greeter-settings...${NC}"
sudo DEBIAN_FRONTEND=noninteractive apt install -y lightdm-gtk-greeter-settings
fi
local conf_dir="/etc/lightdm/lightdm.conf.d"
local conf_file="${conf_dir}/99-show-users.conf"
if [ -f "$conf_file" ] && grep -q '^greeter-hide-users=false' "$conf_file"; then
return
fi
sudo mkdir -p "$conf_dir"
printf '[Seat:*]\ngreeter-hide-users=false\n' | sudo tee "$conf_file" > /dev/null
echo -e "${GREEN}LightDM configured to show user list.${NC}"
fi
local conf_dir="/etc/lightdm/lightdm.conf.d"
local conf_file="${conf_dir}/99-show-users.conf"
if [ -f "$conf_file" ] && grep -q '^greeter-hide-users=false' "$conf_file"; then
return
fi
sudo mkdir -p "$conf_dir"
printf '[Seat:*]\ngreeter-hide-users=false\n' | sudo tee "$conf_file" > /dev/null
echo -e "${GREEN}LightDM configured to show user list.${NC}"
}
# ── Lazy system state refresh ──
refresh_system_state() {
detect_debian_version
detect_gpu
detect_cpu_ram
}