Commit c3f1e194 authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

moved mountpoints to /tmp

parent 1160b049
...@@ -59,7 +59,7 @@ function init(){ ...@@ -59,7 +59,7 @@ function init(){
ct2 = $("<div style='padding-top:20px;'>"); ct2 = $("<div style='padding-top:20px;'>");
tmpstr = "Absolute path: <input id='abspath' style='text' value='/mnt/sda1' class='ap' />"; tmpstr = "Absolute path: <input id='abspath' style='text' value='/tmp/mnt/sda1' class='ap' />";
ct2.html(tmpstr); ct2.html(tmpstr);
$("#controls").append(ct2); $("#controls").append(ct2);
...@@ -212,14 +212,14 @@ function get_files(){ ...@@ -212,14 +212,14 @@ function get_files(){
function init_path(){ function init_path(){
$.ajax({ $.ajax({
url:"camogm.php?cmd=list&path=/mnt", url:"camogm.php?cmd=list&path=/tmp/mnt",
complete: function(data){ complete: function(data){
var xml = data.responseXML; var xml = data.responseXML;
var dirs = $(xml).find("d"); var dirs = $(xml).find("d");
var res = false; var res = false;
for(var i=0;i<dirs.length;i++){ for(var i=0;i<dirs.length;i++){
var tmp = $(dirs[i]).text(); var tmp = $(dirs[i]).text();
if (tmp=="/mnt/sda1") { if (tmp=="/tmp/mnt/sda1") {
$("#abspath").val(tmp); $("#abspath").val(tmp);
res = true; res = true;
} }
......
...@@ -136,7 +136,7 @@ if ($cmd=="find_sdram_phase"){ ...@@ -136,7 +136,7 @@ if ($cmd=="find_sdram_phase"){
} }
function get_sensor_type(){ function get_sensor_type(){
$lastline = exec("cat /mnt/mmc/init_elphel393.sh | grep \"SENSOR_TYPE=\""); $lastline = exec("cat /etc/init_elphel393.sh | grep \"SENSOR_TYPE=\"");
$res = explode("=",$lastline); $res = explode("=",$lastline);
$res[1] = intval($res[1]); $res[1] = intval($res[1]);
if (($res[1]!=5)&&($res[1]!=14)) $res[1]=0; if (($res[1]!=5)&&($res[1]!=14)) $res[1]=0;
......
...@@ -5,7 +5,7 @@ DAEMON=/usr/sbin/init_elphel393 ...@@ -5,7 +5,7 @@ DAEMON=/usr/sbin/init_elphel393
NAME=init_elphel393 NAME=init_elphel393
DESC="extra init scripts" DESC="extra init scripts"
MNTPOINT=/mnt/mmc MNTPOINT=/tmp/mnt/mmc
MMCDEV=/dev/mmcblk0p1 MMCDEV=/dev/mmcblk0p1
SOME_SCRIPT=init_elphel393.sh SOME_SCRIPT=init_elphel393.sh
...@@ -19,12 +19,13 @@ case "$1" in ...@@ -19,12 +19,13 @@ case "$1" in
#mount here #mount here
echo " Mounting Memory Card to $MNTPOINT" echo " Mounting Memory Card to $MNTPOINT"
if [ ! -d $MNTPOINT ]; then if [ ! -d $MNTPOINT ]; then
mkdir $MNTPOINT mkdir -p $MNTPOINT
fi fi
mount $MMCDEV $MNTPOINT mount $MMCDEV $MNTPOINT
if [ -f $MNTPOINT/$SOME_SCRIPT ]; then
echo " Launching $SOME_SCRIPT" if [ -f /etc/$SOME_SCRIPT ]; then
$MNTPOINT/$SOME_SCRIPT echo " Launching /etc/$SOME_SCRIPT"
/etc/$SOME_SCRIPT
else else
echo " $SOME_SCRIPT not found. Nothing to launch." echo " $SOME_SCRIPT not found. Nothing to launch."
fi fi
......
...@@ -49,6 +49,9 @@ do_install_append() { ...@@ -49,6 +49,9 @@ do_install_append() {
install -d ${D}${sysconfdir}/init.d install -d ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/init_elphel393 ${D}${sysconfdir}/init.d install -m 0755 ${WORKDIR}/init_elphel393 ${D}${sysconfdir}/init.d
#install init script to /etc
install -m 0755 ${WORKDIR}/init_elphel393.sh ${D}${sysconfdir}/
for RLOC in ${PRODUCTION_ROOT_LOCATION}; do for RLOC in ${PRODUCTION_ROOT_LOCATION}; do
if [ ! -d ${DEPLOY_DIR_IMAGE}/${RLOC} ]; then if [ ! -d ${DEPLOY_DIR_IMAGE}/${RLOC} ]; then
mkdir -p ${DEPLOY_DIR_IMAGE}/${RLOC} mkdir -p ${DEPLOY_DIR_IMAGE}/${RLOC}
......
...@@ -13,14 +13,14 @@ ENV{ID_FS_LABEL}=="", ENV{ID_FS_USAGE}=="", GOTO="quit_automount" ...@@ -13,14 +13,14 @@ ENV{ID_FS_LABEL}=="", ENV{ID_FS_USAGE}=="", GOTO="quit_automount"
ENV{ID_FS_LABEL}=="", ENV{ID_FS_USAGE}=="filesystem", ENV{dir_name}="%k" ENV{ID_FS_LABEL}=="", ENV{ID_FS_USAGE}=="filesystem", ENV{dir_name}="%k"
# Mount device to /media if it is not SSD # Mount device to /media if it is not SSD
ACTION=="add", ENV{ID_ATA_SATA}!="1", RUN+="/bin/mkdir -p /media/%E{dir_name}", RUN+="/bin/mount /dev/%k /media/%E{dir_name}" ACTION=="add", ENV{ID_ATA_SATA}!="1", RUN+="/bin/mkdir -p /tmp/media/%E{dir_name}", RUN+="/bin/mount /dev/%k /tmp/media/%E{dir_name}"
# Mound device to /mnt if it is SSD # Mound device to /mnt if it is SSD
ACTION=="add", ENV{ID_ATA_SATA}=="1", RUN+="/bin/mkdir -p /mnt/%E{dir_name}", RUN+="/bin/mount /dev/%k /mnt/%E{dir_name}" ACTION=="add", ENV{ID_ATA_SATA}=="1", RUN+="/bin/mkdir -p /tmp/mnt/%E{dir_name}", RUN+="/bin/mount /dev/%k /tmp/mnt/%E{dir_name}"
# Delete directory after removal # Delete directory after removal
ACTION=="remove", ENV{ID_ATA_SATA}!="1", ENV{dir_name}!="", RUN+="/bin/rmdir /media/%E{dir_name}" ACTION=="remove", ENV{ID_ATA_SATA}!="1", ENV{dir_name}!="", RUN+="/bin/rmdir /tmp/media/%E{dir_name}"
ACTION=="remove", ENV{ID_ATA_SATA}=="1", ENV{dir_name}!="", RUN+="/bin/rmdir /mnt/%E{dir_name}" ACTION=="remove", ENV{ID_ATA_SATA}=="1", ENV{dir_name}!="", RUN+="/bin/rmdir /tmp/mnt/%E{dir_name}"
# Exit point # Exit point
LABEL="quit_automount" LABEL="quit_automount"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment