This commit is contained in:
gutosie
2020-04-14 15:02:19 +02:00
committed by GitHub
parent ba7374561a
commit df5322d180

View File

@@ -43,66 +43,47 @@ else
/sbin/depmod -Ae > /dev/null 2>&1
fi
echo "NeoBoot is starting mdev and mout HDD USB ..."
echo "/sbin/mdev" > /proc/sys/kernel/hotplug
/etc/init.d/mdev > /dev/null 2>&1
HOSTNAME=`cat /etc/hostname`
if [ $HOSTNAME = "vuultimo4k" ] || [ $HOSTNAME = "vusolo4k" ] || [ $HOSTNAME = "vuuno4kse" ] || [ $HOSTNAME = "vuuno4k" ]; then
break;
else
echo "NeoBoot is starting mdev fom FLASH..."
echo "/sbin/mdev" > /proc/sys/kernel/hotplug
/etc/init.d/mdev > /dev/null 2>&1
fi
sleep 5
if [ ! -e `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location` ]; then
mkdir `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location` > /dev/null 2>&1
fi
mnttest="nouuid"
mnttest="nolocation"
if [ -e /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/bin/install ]; then
orgimag1=`mount | sed '/sd/!d' | cut -d" " -f1`
hdd=`/bin/mount | sed '/\/sd/!d' | grep 'hdd' | cut -d' ' -f1`
usb=`/bin/mount | sed '/\/sd/!d' | grep 'usb' | cut -d' ' -f1`
usb1=`/bin/mount | sed '/\/sd/!d' | grep 'usb1' | cut -d' ' -f1`
card=`/bin/mount | sed '/\/sd/!d' | grep 'card' | cut -d' ' -f1`
cf=`/bin/mount | sed '/\/sd/!d' | grep 'cf' | cut -d' ' -f1`
selectinstall=`cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/bin/install` > /dev/null 2>&1
for item in $orgimag1; do
selectmnt=`/bin/mount | sed '/\/sd/!d' | grep '$selectinstall' | cut -d' ' -f1`
mntselect=`blkid | sed "$selectinstall/!d" | cut -d":" -f1`
if [ $selectinstall == $hdd ]; then
echo "selectinstall=" $selectinstall
mnttest="label"
mount $selectmnt `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location` > /dev/null 2>&1
elif [ $selectinstall == $usb ]; then
echo "selectinstall=" $selectinstall
mnttest="label"
mount $selectmnt `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location` > /dev/null 2>&1
elif [ $selectinstall == $usb1 ]; then
echo "selectinstall=" $selectinstall
mnttest="label"
mount $selectmnt `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location` > /dev/null 2>&1
elif [ $selectinstall == $card]; then
echo "selectinstall=" $selectinstall
mnttest="label"
mount $selectmnt `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location` > /dev/null 2>&1
elif [ $selectinstall == $cf ]; then
echo "selectinstall=" $selectinstall
mnttest="label"
mount $selectmnt `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location` > /dev/null 2>&1
elif [ $mntselect == $item ]; then
echo "mntselect=" $mntselect
mnttest="uuid"
mount $mntselect `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location` > /dev/null 2>&1
echo " 1-2 NeoBoot has been installed on: " $mntselect
break;
fi
orgimag1=`mount | sed '/sd/!d' | cut -d" " -f1`
selectinstall=`cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/bin/install`
for item in $orgimag1; do
selectmnt=`blkid | find "$selectinstall" | cut -d" " -f1`
if [ $selectmnt = $selectinstall ]; then
echo "selectmnt="$selectmnt
mnttest="location"
mount $selectmnt `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location` > /dev/null 2>&1
echo "Neoboot location detected. "
fi
if [ ! -e `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`ImageBoot ]; then
echo "NeoBoot hasn't been installed on: " $selectinstall
umount `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location` > /dev/null 2>&1
umount -l $NEODEVICE > /dev/null 2>&1
else
echo "NeoBoot has been installed on: " $selectinstall
sleep 10
echo "NEOBOOT has been installed on: " $selectmnt
break;
fi
done
fi
if [ $mnttest == "nouuid" ] ; then
if [ $mnttest = "location" ] ; then
break;
else
echo "NeoBoot mount by Device"
DEVICES1=`find /dev/sd??`
for DEVICE in $DEVICES1;
@@ -112,23 +93,24 @@ else
mount $DEVICE `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location` > /dev/null 2>&1
fi
if [ ! -e `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`ImageBoot ]; then
echo " 4 NeoBoot hasn't been installed on: " $DEVICE
echo "NeoBoot hasn't been installed on: " $DEVICE
umount `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location` > /dev/null 2>&1
else
echo "2 NeoBoot has been installed on: " $DEVICE
echo "NeoBoot has been installed on: " $DEVICE
break;
fi
done
fi
if [ ! -e $NEODEVICE$IMAGEKATALOG/.neonextboot ]; then
if [ -e /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/mountpoint.sh ]; then
/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/neo.sh
echo "_______________________NeoBoot mount by MOUNTPOINT_______________________"
fi
elif [ $mnttest == "label" ]; then
echo "_______________________ NeoBoot mount by LABEL_______________________"
elif [ $mnttest == "uuid" ]; then
echo "_______________________ NeoBoot mount by UUID_______________________ "
echo "_______________________ NeoBoot mount by DEVICE_______________________"
elif [ $mnttest == "location" ]; then
echo "_______________________ NeoBoot mount by LOCATION_______________________ "
fi
neoLOG=$NEODEVICE$IMAGEKATALOG/NeoInit.log
@@ -214,8 +196,8 @@ else
/sbin/insmod $LIBDIR/kernel/fs/autofs4/autofs4.ko > /dev/null 2>&1
fi
fi
HARDWARETYPE=`uname -m`
HARDWARETYPE=`uname -m`
if [ $TARGET = "Flash" ]; then
echo "NEOBOOT is booting image from " $TARGET
/bin/umount /media/usb > /dev/null 2>&1
@@ -237,8 +219,7 @@ else
echo " First start image - The first attempt to launch a new image..." >> $neoLOG
echo "First start image - The first attempt to launch a new image... "
rm -f `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/$TARGET/.control_boot_new_image > /dev/null 2>&1
else
HOSTNAME=`cat /etc/hostname`
else
if [ ! -f `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/$TARGET/.control_ok ] ; then
if [ $HOSTNAME = "vuultimo4k" ] || [ $HOSTNAME = "vusolo4k" ] || [ $HOSTNAME = "vuuno4kse" ] || [ $HOSTNAME = "vuuno4k" ]; then
dd if=`cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$UPLOAD/.kernel/flash-kernel-$HOSTNAME.bin of=/dev/mmcblk0p1
@@ -266,7 +247,6 @@ else
fi
if [ $HARDWARETYPE != "armv7l" ]; then
echo "NeoBOOT - HARDWARETYPE "
if [ -f $NEODEVICE$IMAGEKATALOG/$TARGET/usr/share/bootlogo.mvi ]; then
/usr/bin/showiframe $NEODEVICE$IMAGEKATALOG/$TARGET/usr/share/bootlogo.mvi
else
@@ -281,18 +261,21 @@ else
/bin/mount -o bind /sys $NEODEVICE$IMAGEKATALOG/$TARGET/sys
rm $NEODEVICE$IMAGEKATALOG/$TARGET$NEODEVICE > /dev/null 2>&1
mkdir $NEODEVICE$IMAGEKATALOG/$TARGET$NEODEVICE > /dev/null 2>&1
mkdir $NEODEVICE$IMAGEKATALOG/$TARGET$NEODEVICE > /dev/null 2>&1
orgimag=`mount | sed '/sd/!d' | cut -d" " -f1`
rm -f $NEODEVICE$IMAGEKATALOG/$TARGET/usr/bin/enigma2_pre_start.sh
for item in $orgimag; do
rm -f $NEODEVICE$IMAGEKATALOG/$TARGET/usr/bin/enigma2_pre_start.sh
for item in $orgimag; do
ohdd=`echo $item | cut -d"/" -f3`
nhdd=`mount | sed "/\$ohdd/!d" | sed q | cut -d" " -f3`
echo " COPIED mountpoint.sh - enigma2_pre_start.sh " >> $neoLOG
cp -f /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/mountpoint.sh $NEODEVICE$IMAGEKATALOG/$TARGET/usr/bin/enigma2_pre_start.sh
echo ok
done
nhdd=`mount | sed "/\$ohdd/!d" | grep '' | cut -d' ' -f3`
echo "Copied mount to run image." $nhdd >> $neoLOG
echo $nhdd
echo "mkdir "$nhdd >> $NEODEVICE$IMAGEKATALOG/$TARGET/usr/bin/enigma2_pre_start.sh
echo "mount "$item $nhdd >> $NEODEVICE$IMAGEKATALOG/$TARGET/usr/bin/enigma2_pre_start.sh
done
if [ ! -e $NEODEVICE$IMAGEKATALOG/$TARGET/usr/bin/enigma2_pre_start.sh ]; then
cp -f /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/mountpoint.sh $NEODEVICE$IMAGEKATALOG/$TARGET/usr/bin/enigma2_pre_start.sh #nie powinno sie zdarzyc
fi
chmod 755 `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/$TARGET/usr/bin/enigma2_pre_start.sh
echo "NeoBOOT created the file enigma2_pre_start.sh "