This commit is contained in:
gutosie
2019-02-21 21:44:01 +01:00
committed by GitHub
parent 3e22720caa
commit f08163874f

View File

@@ -19,11 +19,15 @@ TARGET=Flash
if [ -f $IMAGEBOOT ]; then if [ -f $IMAGEBOOT ]; then
TARGET=`cat $IMAGEBOOT` TARGET=`cat $IMAGEBOOT`
fi fi
$IMAGE/$TARGET
if [ -e $IMAGE/$TARGET/.control_ok ]; then if [ $TARGET = "Flash" ]; then
echo "No Error - Booting image normal ... "; sleep 2 ln -sfn /sbin/init.sysvinit /sbin/init
else else
if [ -e $IMAGE/$TARGET/.control_ok ]; then
echo "No Error - Booting image normal ... "; sleep 2
else
if [ -e $IMAGE/$TARGET/.control_boot_new_image ]; then if [ -e $IMAGE/$TARGET/.control_boot_new_image ]; then
echo "First start image - Proba uruchomienia nowego image... "; sleep 5; rm -r -f $IMAGE/$TARGET/.control_boot_new_image echo "First start image - Proba uruchomienia nowego image... "; sleep 5; rm -r -f $IMAGE/$TARGET/.control_boot_new_image
else else
@@ -45,7 +49,6 @@ else
dd if=/media/neoboot/ImagesUpload/.kernel/flash-kernel-$VUMODEL.bin of=/dev/mmcblk0p6 dd if=/media/neoboot/ImagesUpload/.kernel/flash-kernel-$VUMODEL.bin of=/dev/mmcblk0p6
fi fi
fi fi
fi
echo "Wrong kernel. Press number 3" > /media/neoboot/ImagesUpload/.kernel/used_flash_kernel echo "Wrong kernel. Press number 3" > /media/neoboot/ImagesUpload/.kernel/used_flash_kernel
ln -sfn /sbin/init.sysvinit /sbin/init ln -sfn /sbin/init.sysvinit /sbin/init
@@ -55,5 +58,6 @@ else
sleep 7; reboot -f sleep 7; reboot -f
fi fi
fi fi
fi
fi fi
return 1 return 1