Pārlūkot izejas kodu

cleanup scripts

Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
Michel-FK 3 gadi atpakaļ
vecāks
revīzija
f9d5f09520

+ 7 - 1
FunKey/board/funkey/rootfs-overlay/usr/local/sbin/brightness

@@ -85,12 +85,18 @@ if [ ${#} -lt 1 -o ${#} -gt 2 ]; then
     usage
 fi
 
-case ${1} in
+case "${1}" in
     up)
+	if [ ${#} -ne 1 ]; then
+	    usage
+	fi
 	increase_brightness
 	;;
 
     down)
+	if [ ${#} -ne 1 ]; then
+	    usage
+	fi
 	decrease_brightness
 	;;
 

+ 0 - 2
FunKey/board/funkey/rootfs-overlay/usr/local/sbin/low_bat_check

@@ -21,8 +21,6 @@ BAT_PRESENT_FILE=/sys/class/power_supply/axp20x-battery/present
 BAT_PERCENT_FILE=/sys/class/power_supply/axp20x-battery/capacity
 BAT_PERCENT_RESCALED_FILE=/tmp/current_battery_percentage
 LOW_BAT_ICON=/sys/class/graphics/fb0/low_battery
-SCHEDULE_SHUTDOWN_CMD=sched_shutdown
-SIGNAL_URS1_TO_EMULATORS_CMD=signal_usr1_to_emulators
 
 # Variables declaration
 low_bat_status=0

+ 7 - 1
FunKey/board/funkey/rootfs-overlay/usr/local/sbin/volume

@@ -93,12 +93,18 @@ if [ ${#} -lt 1 -o ${#} -gt 2 ]; then
     usage
 fi
 
-case ${1} in
+case "${1}" in
     up)
+	if [ ${#} -ne 1 ]; then
+	    usage
+	fi
 	increase_volume
 	;;
 
     down)
+	if [ ${#} -ne 1 ]; then
+	    usage
+	fi
 	decrease_volume
 	;;