Files
opencn-rootfs/rootfs/mount.sh
Peter Lichard e15cee6854 Initial commit
2020-06-06 07:39:16 +02:00

23 lines
370 B
Bash
Executable File

#!/bin/bash
DEVLOOP=$(sudo losetup --partscan --find --show rootfs.img)
FS_IMG=rootfs.img
SCRIPT_IMG=./create_img.sh
if [ ! -f $FS_IMG ]; then
echo "Creating image"sh $FS_IMG
bash $SCRIPT_IMG $FS_IMG
if [ $? -ne 0 ]; then
echo "Error while creating image"
exit 1
fi
sleep 1
fi
#sudo losetup -P --find --show flash
mkdir -p fs
sudo mount ${DEVLOOP}p1 fs