mirror of
https://github.com/brain-hackers/brain-config.git
synced 2024-12-22 20:20:06 +09:00
Make sense of LED value consistent between do_ and get_
This commit is contained in:
parent
13d220fa1e
commit
05561e206b
@ -1119,18 +1119,16 @@ do_pi4video() {
|
||||
|
||||
get_leds () {
|
||||
if grep -q "\\[actpwr\\]" /sys/class/leds/led0/trigger ; then
|
||||
echo 1
|
||||
else
|
||||
echo 0
|
||||
else
|
||||
echo 1
|
||||
fi
|
||||
}
|
||||
|
||||
do_leds() {
|
||||
DEFAULT=--defaultno
|
||||
CURRENT=0
|
||||
if [ $(get_leds) -eq 1 ]; then
|
||||
if [ $(get_leds) -eq 0 ]; then
|
||||
DEFAULT=
|
||||
CURRENT=1
|
||||
fi
|
||||
if [ "$INTERACTIVE" = True ]; then
|
||||
whiptail --yesno "Would you like the power LED to flash during disk activity?" $DEFAULT 20 60 2
|
||||
|
Loading…
Reference in New Issue
Block a user