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 () {
|
get_leds () {
|
||||||
if grep -q "\\[actpwr\\]" /sys/class/leds/led0/trigger ; then
|
if grep -q "\\[actpwr\\]" /sys/class/leds/led0/trigger ; then
|
||||||
echo 1
|
|
||||||
else
|
|
||||||
echo 0
|
echo 0
|
||||||
|
else
|
||||||
|
echo 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
do_leds() {
|
do_leds() {
|
||||||
DEFAULT=--defaultno
|
DEFAULT=--defaultno
|
||||||
CURRENT=0
|
if [ $(get_leds) -eq 0 ]; then
|
||||||
if [ $(get_leds) -eq 1 ]; then
|
|
||||||
DEFAULT=
|
DEFAULT=
|
||||||
CURRENT=1
|
|
||||||
fi
|
fi
|
||||||
if [ "$INTERACTIVE" = True ]; then
|
if [ "$INTERACTIVE" = True ]; then
|
||||||
whiptail --yesno "Would you like the power LED to flash during disk activity?" $DEFAULT 20 60 2
|
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