3 if [ "$TMPFS" == "" ]; then
15 # ------------------------- check microSD -------------------------------------------------------------
18 echo "SD card not mounted" | myLog
19 playRoboMessage "External partition has not been mounted. Trying to fix this issue."
21 if [ ! -e "/dev/mmcblk0p1" ]; then
23 echo morse > /sys/class/leds/omega2p\:amber\:system/trigger
24 echo "No micro SD detected, please check SD card integrity or reboot device." > /sys/class/leds/omega2p\:amber\:system/message
27 playRoboMessage "No micro SD detected, please check SD card integrity or reboot device."
28 echo "No micro SD detected, please check SD card integrity or reboot device." | tee /dev/console
37 playRoboMessage "Issue has not been fixed."
40 playRoboMessage "Please restart device using the buttom switcher."
44 playRoboMessage "Issue has been successfully fixed."
47 playRoboMessage "In the case of relapse of errors, please change micro SD. You can find details in service manual, on Electronic Tour Guide creator website."
51 # ------------------------- create TMPFS --------------------------------------------------------------
57 touch $TMPFS/$volume $TMPFS/$state $TMPFS/$prevLayer $DEVNULL
59 if [ ! -s "$TMPFS/$currentLang" ]; then
61 LANGUAGE_DEF_NUM=$(ls -c1 $CONTENT | grep -n "$LANGUAGE_DEF_NAME" | awk -F':' '{print $1; exit}')
63 if [ "$LANGUAGE_DEF_NUM" != "" ]; then
64 echo $LANGUAGE_DEF_NAME > "$TMPFS/$currentLang"
65 echo $LANGUAGE_DEF_NUM > "$TMPFS/$currentLangNum"
67 ls -c1 $CONTENT | head -1 > "$TMPFS/$currentLang"
68 echo 1 > "$TMPFS/$currentLangNum"
71 # echo $(ls -c1 $CONTENT | head -$LANGUAGE_DEF | tail -1 ) > "$TMPFS/$currentLang"
72 # echo $LANGUAGE_DEF > "$TMPFS/$currentLangNum"
77 echo $VOLDEF > $TMPFS/$volume
79 # ------------------------- create FIFOs --------------------------------------------------------------
82 mkfifo $TMPFS/$message
84 # ------------------------- copy MAP and create narrative structure filesystem ------------------------
88 narrativeStructureReset # creating files for each location in /tmp/...