Changing the trigger to none turns off the LED but keeps brightness,
which causes the LED to be turned on after suspend. Could be fixed in
the kernel but easier to work around here.
RDEPENDS = "bash sed gawk grep zenity"
RDEPENDS = "bash sed gawk grep zenity"
SRC_URI = " \
file://op_bright.sh \
SRC_URI = " \
file://op_bright.sh \
sed -i "s/.*pandora::sd1.*/pandora::sd1 mmc0/g" /etc/default/leds
else
echo none > /sys/class/leds/pandora\:\:sd1/trigger
sed -i "s/.*pandora::sd1.*/pandora::sd1 mmc0/g" /etc/default/leds
else
echo none > /sys/class/leds/pandora\:\:sd1/trigger
+ echo 0 > /sys/class/leds/pandora\:\:sd1/brightness
sed -i "s/.*pandora::sd1.*/pandora::sd1 none/g" /etc/default/leds
fi
;;
sed -i "s/.*pandora::sd1.*/pandora::sd1 none/g" /etc/default/leds
fi
;;
sed -i "s/.*pandora::sd2.*/pandora::sd2 mmc1/g" /etc/default/leds
else
echo none > /sys/class/leds/pandora\:\:sd2/trigger
sed -i "s/.*pandora::sd2.*/pandora::sd2 mmc1/g" /etc/default/leds
else
echo none > /sys/class/leds/pandora\:\:sd2/trigger
+ echo 0 > /sys/class/leds/pandora\:\:sd2/brightness
sed -i "s/.*pandora::sd2.*/pandora::sd2 none/g" /etc/default/leds
fi
;;
sed -i "s/.*pandora::sd2.*/pandora::sd2 none/g" /etc/default/leds
fi
;;
fi
else
echo none > /sys/class/leds/pandora\:\:bluetooth/trigger
fi
else
echo none > /sys/class/leds/pandora\:\:bluetooth/trigger
+ echo 0 > /sys/class/leds/pandora\:\:bluetooth/brightness
sed -i "s/.*pandora::bluetooth.*/pandora::bluetooth none/g" /etc/default/leds
fi
;;
sed -i "s/.*pandora::bluetooth.*/pandora::bluetooth none/g" /etc/default/leds
fi
;;
zenity --info --title="WiFi LED Set" --text "The WiFi LED has been enabled.\nPlease note: You need to disable and re-enable WiFi before it switches on again." --timeout 6
else
echo none > /sys/class/leds/pandora\:\:wifi/trigger
zenity --info --title="WiFi LED Set" --text "The WiFi LED has been enabled.\nPlease note: You need to disable and re-enable WiFi before it switches on again." --timeout 6
else
echo none > /sys/class/leds/pandora\:\:wifi/trigger
+ echo 0 > /sys/class/leds/pandora\:\:wifi/brightness
sed -i "s/.*pandora::wifi.*/pandora::wifi none/g" /etc/default/leds
fi
;;
sed -i "s/.*pandora::wifi.*/pandora::wifi none/g" /etc/default/leds
fi
;;
DESCRIPTION = "Installs /etc/op-version file."
LICENSE = "Public Domain"
DESCRIPTION = "Installs /etc/op-version file."
LICENSE = "Public Domain"
do_install() {
OLD_PWD=$PWD
do_install() {
OLD_PWD=$PWD