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
#!/bin/bash
#
# Start linux launcher...
#

# Load default env variables from profiles(e.g. /etc/profile.d/weston.sh)
#. /etc/profile

Load_app="/mnt/vendor/ctrl/loadapp.sh"
BACKLIGHTCTR="/mnt/vendor/bin/brightCtrl.bin"
CEXPERT="/mnt/vendor/bin/cexpert"

VENDOR_DEV="/dev/mmcblk0p6"
if [ ! -f "/etc/vendor_resize.cfg" ]; then
	/usr/sbin/resize2fs $VENDOR_DEV
#	touch /etc/vendor_resize.cfg
fi

case "$1" in
  start)
		printf "Starting deeplay_launcher: \n"

		/usr/bin/mount -t ext4 -o rw,noatime,nodiratime $VENDOR_DEV /mnt/vendor

#--------------------------------------
		if [ -e $BACKLIGHTCTR ];then
			$BACKLIGHTCTR &
		fi

		if [ -e $CEXPERT ];then
			$CEXPERT &
		fi
#--------------------------------------
		{
			if [ -e $Load_app ];then
				$Load_app
			fi
		}&
		;;
  stop|restart)
		killall retroarch
		killall rtk_hciattach
		killall loadapp.sh
#		killall -s SIGINT dmenu.bin
		killall -s SIGUSR1 dmenu.bin
		killall -s SIGINT charg.dge
		killall -s SIGINT ndsCtrl.dge
		printf "stop deeplay_launcher"
		sync
        ;;
  *)
        echo "Usage: $0 {start|stop}"
        exit 1
        ;;
esac

exit 0