linkpi_firmware_history/rootfs/link/shell/init/filesystem.sh

28 lines
688 B
Bash

mkdir /tmp/snap
mkdir /tmp/hls
mkdir /tmp/log
if [ ! -d /root/usb ]; then
mkdir /root/usb
fi
/link/shell/mountUsb.sh
if [ -b /dev/mmcblk0p5 ]; then
/bin/mount -o remount,rw,sync,barrier=0 /dev/mmcblk0p5 /
fi
if [ -b /dev/mmcblk0p6 ]; then
/bin/mount -o rw,sync,barrier=0 /dev/mmcblk0p6 /root/usb
mnt=`df -h | grep /dev/mmcblk0p6 | wc -l`
if [ "$mnt" == "1" ] && [ ! -d /root/usb/lost+found ];then
umount -f /root/usb/
mnt=`df -h | grep /dev/mmcblk0p6 | wc -l`
if [ "$mnt" == "0" ];then
echo -e "\ny" | mkfs.ext4 -T largefile /dev/mmcblk0p6
if [ ! -b /dev/sda1 ];then
/bin/mount -o rw,sync,barrier=0 /dev/mmcblk0p6 /root/usb
fi
fi
fi
fi