Skip to content

Commit

Permalink
Raspberry Pi Zero specific changes and bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
trbtm committed Aug 12, 2022
1 parent fa8477b commit c9ea74c
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ source $BASEDIR/scripts/user_yes_no.sh
source $BASEDIR/scripts/write_boot_config.sh
source $BASEDIR/scripts/systemd_services.sh

computer_type=$(tr -d '\0' < /sys/firmware/devicetree/base/model)

restart=false
needs_service=false

Expand All @@ -30,7 +32,10 @@ disable_power_led()
restart=true
}

user_yes_no "Do you want to disable the Power LED?" disable_power_led
# Raspberry Pi Zero does not have a Power LED
if [[ $computer_type != *"Zero"* ]]; then
user_yes_no "Do you want to disable the Power LED?" disable_power_led
fi

#
# Activity LED
Expand All @@ -41,7 +46,12 @@ disable_activity_led()
write_config_json disable_activity_led true

write_boot_config "" true dtparam act_led_trigger none
write_boot_config "" true dtparam act_led_activelow off
# Config is different for Raspberry Pi Zero
if [[ $computer_type == *"Zero"* ]]; then
write_boot_config "" true dtparam act_led_activelow on
else
write_boot_config "" true dtparam act_led_activelow off
fi
restart=true
}

Expand Down

0 comments on commit c9ea74c

Please sign in to comment.