#!/bin/sh
#!OEM - this needs to be the 1st or 2nd line to flag this as an OEM configuration.
#ver:cortexa7hf-vfp-neon-poky-linux-gnueabi
###############################################################################
#
# Configuration file for setting up the unit.
# Copyright (c) 2016
# License- GPL
# Author-  Josh Kurland
# Company- Adtec Digital, Inc.
# Date-    2016-09-29
#
# This file normally just mounts all of the directories required to give the 
# product it's "personality".
#
#  local readonly RFS_PATH="/opt/pkg/gnu/cortexa7hf-vfp-neon-poky-linux-gnueabi"
#    "${RFS_PATH}/bin        /bin          none  bind,rw  umount"
#    "${RFS_PATH}/lib        /lib          none  bind,rw  umount"
#    "${RFS_PATH}/sbin       /sbin         none  bind,rw  umount"
#    "${RFS_PATH}/usr        /usr          none  bind,rw  umount"
#    "usr/local/lib/modules  /lib/modules  none  bind,rw  umount"
##############################################################################

do_configuration_usrmounts ()
{
  for MOUNT in \
    "boot                   /boot         none  bind,ro  umount" \
    "media                  /media        none  bind,ro  umount" \
    "srv                    /srv          none  bind,ro  umount" \
    "tmpfs                  /tmp          tmpfs size=48m umount" \
    "usr/local              /usr/local    none  bind,ro  umount" \
    "usr/local/lib/modules  /lib/modules  none  bind,ro  umount"
#    "usr/local/lib/firmware /lib/firmware none  bind,ro  umount"
  do
    do_mount "${MOUNT}"
  done
}
SERIALNUMKV=`grep serialnum= /rootfs/boot/env.txt`
MTFRDATEKV=`grep mtfrdate= /rootfs/boot/env.txt`
do_configuration_usrmounts
