-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathled_builtin_trigger.sh
75 lines (73 loc) · 2.26 KB
/
led_builtin_trigger.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
function led_trigger() {
echo "${GREEN}INFO: Settingup onBOARD LED Trigger to: ${RED}RED: ${BLUE}CPU0 ${GREEN}GREEN: ${CYAN}heartbeat!"
case $BOARD in
bananapim2ultra)
echo "${GREEN}INFO: ${CYAN}Copying LED-Trigger from overlay to /etc/init.d !"
cp -r $led_trigger_file $initd_led_trigger_service
grant_permissions;
echo "Enable init.d Service!"
sleep 1
manage_service "set_led_trigger.sh" "defaults"
;;
bananapim2berry)
echo "${GREEN}INFO: ${CYAN}Copying LED-Trigger from overlay to /etc/init.d !"
cp -r $led_trigger_file $initd_led_trigger_service
grant_permissions;
echo "Enable init.d Service!"
sleep 1
manage_service "set_led_trigger.sh" "defaults"
;;
bananapi)
led_trigger_file="/tmp/overlay/scripts/bpi-m2u-m2b/set_led_trigger.sh"
;;
bananapicm4io)
led_trigger_file="/tmp/overlay/scripts/bpi-m2u-m2b/set_led_trigger.sh"
;;
bananapim1plus)
led_trigger_file="/tmp/overlay/scripts/bpi-m2u-m2b/set_led_trigger.sh"
;;
bananapim2)
led_trigger_file="/tmp/overlay/scripts/bpi-m2u-m2b/set_led_trigger.sh"
;;
bananapim2plus)
led_trigger_file="/tmp/overlay/scripts/bpi-m2u-m2b/set_led_trigger.sh"
;;
bananapim2pro)
led_trigger_file="/tmp/overlay/scripts/bpi-m2u-m2b/set_led_trigger.sh"
;;
bananapim2s)
led_trigger_file="/tmp/overlay/scripts/bpi-m2u-m2b/set_led_trigger.sh"
;;
bananapim2zero)
led_trigger_file="/tmp/overlay/scripts/bpi-m2u-m2b/set_led_trigger.sh"
;;
bananapim3)
led_trigger_file="/tmp/overlay/scripts/bpi-m2u-m2b/set_led_trigger.sh"
;;
bananapim4zero)
led_trigger_file="/tmp/overlay/scripts/bpi-m2u-m2b/set_led_trigger.sh"
;;
bananapim5)
led_trigger_file="/tmp/overlay/scripts/bpi-m2u-m2b/set_led_trigger.sh"
;;
bananapim7)
led_trigger_file="/tmp/overlay/scripts/bpi-m2u-m2b/set_led_trigger.sh"
;;
bananapim64)
led_trigger_file="/tmp/overlay/scripts/bpi-m2u-m2b/set_led_trigger.sh"
;;
bananapipro)
led_trigger_file="/tmp/overlay/scripts/bpi-m2u-m2b/set_led_trigger.sh"
;;
bananapir2)
led_trigger_file="/tmp/overlay/scripts/bpi-m2u-m2b/set_led_trigger.sh"
;;
bananapir2pro)
led_trigger_file="/tmp/overlay/scripts/bpi-m2u-m2b/set_led_trigger.sh"
;;
*)
echo "Configuring: $BOARD "
echo "Board not supported"
;;
esac
}