Add files via upload

This commit is contained in:
gutosie
2021-03-05 17:54:11 +02:00
committed by GitHub
parent 8eed2a419a
commit 0c0ea9a513

View File

@@ -1,35 +1,27 @@
#!/bin/sh #!/bin/sh
#script mod by gutosie #DESCRIPTION = This script mod. by gutosie
#neo init arm #NeoBoot INIT Version: ARM without boot manager
#Scrypt Unix Shell - init for neoboot
echo "====================================================> "
echo " "
echo " -=*[ NEOBOOT - BOOT UP ]*=- "
echo " NEO BOOT INIT Version: gutosie "
echo " q(-_-)p "
echo " "
echo "====================================================> "
NEODEVICE=`cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location` NEODEVICE=`cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`
IMAGEKATALOG=ImageBoot IMAGEKATALOG=ImageBoot
HOSTNAME=`cat /etc/hostname` HOSTNAME=`cat /etc/hostname`
if [ -e /tmp/.init_reboot ]; then if [ -e /tmp/.init_reboot ]; then
rm /tmp/.init_reboot > /dev/null 2>&1 rm /tmp/.init_reboot > /dev/null 2>&1
break; break;
elif [ -e `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/.neonextboot ] ; then
else
if [ -e `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/.neonextboot ] ; then
CELBOOT=`cat $NEODEVICE$IMAGEKATALOG/.neonextboot` CELBOOT=`cat $NEODEVICE$IMAGEKATALOG/.neonextboot`
if [ $CELBOOT = "Flash" ]; then if [ $CELBOOT = "Flash" ]; then
exec /sbin/init.sysvinit $1 #echo "Escape from initneoboot - init boot flash"
exit 0
else
break; break;
fi fi
fi else
echo "====================================================> "
echo " "
echo " -=*[ NEOBOOT - BOOT UP ]*=- "
echo " NEO BOOT INIT Version: gutosie "
echo " q(-_-)p "
echo " "
echo "====================================================> "
LIBDIR=/lib/modules/`uname -r` LIBDIR=/lib/modules/`uname -r`
if [ ! -d $LIBDIR ]; then if [ ! -d $LIBDIR ]; then
LIBDIR=/lib/modules/`ls /lib/modules | tail -n 1` LIBDIR=/lib/modules/`ls /lib/modules | tail -n 1`
@@ -37,7 +29,7 @@ else
if [ $HOSTNAME = "vuultimo4k" ] || [ $HOSTNAME = "vusolo4k" ] || [ $HOSTNAME = "vuuno4kse" ] || [ $HOSTNAME = "vuuno4k" ]; then if [ $HOSTNAME = "vuultimo4k" ] || [ $HOSTNAME = "vusolo4k" ] || [ $HOSTNAME = "vuuno4kse" ] || [ $HOSTNAME = "vuuno4k" ]; then
break; break;
else else
echo "Mount local filesystems ..." echo "_______________________Mount local filesystems_______________________"
if [ `mount | grep /proc | wc -l` -lt 1 ]; then if [ `mount | grep /proc | wc -l` -lt 1 ]; then
/bin/mount -a /bin/mount -a
/bin/mount -n -t proc proc /proc > /dev/null 2>&1 /bin/mount -n -t proc proc /proc > /dev/null 2>&1
@@ -45,24 +37,20 @@ else
/sbin/depmod -Ae > /dev/null 2>&1 /sbin/depmod -Ae > /dev/null 2>&1
fi fi
fi fi
if [ $HOSTNAME = "vuultimo4k" ] || [ $HOSTNAME = "vusolo4k" ] || [ $HOSTNAME = "vuuno4kse" ] || [ $HOSTNAME = "vuuno4k" ]; then if [ $HOSTNAME = "vuultimo4k" ] || [ $HOSTNAME = "vusolo4k" ] || [ $HOSTNAME = "vuuno4kse" ] || [ $HOSTNAME = "vuuno4k" ]; then
break; break;
else else
echo "NeoBoot is starting mdev fom FLASH..." echo "_______________________NeoBoot is starting mdev fom FLASH..._______________________"
echo "/sbin/mdev" > /proc/sys/kernel/hotplug echo "/sbin/mdev" > /proc/sys/kernel/hotplug
/etc/init.d/mdev > /dev/null 2>&1 /etc/init.d/mdev > /dev/null 2>&1
fi fi
sleep 2
sleep 5
if [ ! -e `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location` ]; then 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 mkdir `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location` > /dev/null 2>&1
echo "_______________________NeoBoot created location media_______________________" echo "_______________________NeoBoot created location media_______________________"
fi fi
if [ $HOSTNAME = "vuultimo4k" ] || [ $HOSTNAME = "vusolo4k" ] || [ $HOSTNAME = "vuuno4kse" ] || [ $HOSTNAME = "vuuno4k" ]; then if [ $HOSTNAME = "vuultimo4k" ] || [ $HOSTNAME = "vusolo4k" ] || [ $HOSTNAME = "vuuno4kse" ] || [ $HOSTNAME = "vuuno4k" ]; then
if [ -e /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/mountpoint.sh ]; then if [ -e /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/neo.sh ]; then
/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/neo.sh > /dev/null 2>&1 /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/neo.sh > /dev/null 2>&1
echo "_______________________NeoBoot mount by MOUNTPOINT_______________________" echo "_______________________NeoBoot mount by MOUNTPOINT_______________________"
fi fi
@@ -79,7 +67,6 @@ else
mount $selectmnt `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location` > /dev/null 2>&1 mount $selectmnt `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location` > /dev/null 2>&1
echo "Neoboot location detected." echo "Neoboot location detected."
fi fi
if [ ! -e `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`ImageBoot ]; then if [ ! -e `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`ImageBoot ]; then
echo "NeoBoot hasn't been installed on: " $selectinstall echo "NeoBoot hasn't been installed on: " $selectinstall
umount `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location` > /dev/null 2>&1 umount `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location` > /dev/null 2>&1
@@ -90,11 +77,10 @@ else
fi fi
done done
fi fi
if [ $mnttest = "location" ] ; then if [ $mnttest = "location" ] ; then
break; break;
else else
echo "NeoBoot mount by Device" echo "_______________________ NeoBoot mount by Device_______________________ "
DEVICES1=`find /dev/sd??` DEVICES1=`find /dev/sd??`
for DEVICE in $DEVICES1; for DEVICE in $DEVICES1;
do do
@@ -113,20 +99,16 @@ else
done done
fi fi
fi fi
if [ ! -e $NEODEVICE$IMAGEKATALOG/.neonextboot ]; then if [ ! -e $NEODEVICE$IMAGEKATALOG/.neonextboot ]; then
if [ -e /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/mountpoint.sh ]; then if [ -e /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/mountpoint.sh ]; then
/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/neo.sh /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/mountpoint.sh
echo "_______________________NeoBoot mount by MOUNTPOINT_______________________" echo "_______________________NeoBoot mount by MOUNTPOINT_______________________"
fi fi
fi fi
neoLOG=$NEODEVICE$IMAGEKATALOG/initneo.log neoLOG=$NEODEVICE$IMAGEKATALOG/initneo.log
if [ -f $neoLOG ]; then if [ -f $neoLOG ]; then
rm -f $neoLOG rm -f $neoLOG
touch $neoLOG touch $neoLOG
fi
echo " >>> START NEXT LOG... >>> " >> $neoLOG echo " >>> START NEXT LOG... >>> " >> $neoLOG
echo "..............-=*[ NEOBOOT - BOOT UP ]*=-.............." >> $neoLOG echo "..............-=*[ NEOBOOT - BOOT UP ]*=-.............." >> $neoLOG
echo " ____q(-_-)p____START NEXT Image...____q(-_-)p____ " >> $neoLOG echo " ____q(-_-)p____START NEXT Image...____q(-_-)p____ " >> $neoLOG
@@ -134,30 +116,25 @@ else
echo "Tuner name: " `cat /etc/hostname` >> $neoLOG echo "Tuner name: " `cat /etc/hostname` >> $neoLOG
echo "Boot image: " `cat $NEODEVICE$IMAGEKATALOG/.neonextboot` >> $neoLOG echo "Boot image: " `cat $NEODEVICE$IMAGEKATALOG/.neonextboot` >> $neoLOG
echo "Init image, base kernel: " `cat $NEODEVICE$IMAGEKATALOG/.neonextboot` >> $neoLOG echo "Init image, base kernel: " `cat $NEODEVICE$IMAGEKATALOG/.neonextboot` >> $neoLOG
fi
UPLOAD=ImagesUpload UPLOAD=ImagesUpload
if [ ! -e $NEODEVICE$IMAGEKATALOG ]; then if [ ! -e $NEODEVICE$IMAGEKATALOG ]; then
echo -n "---- no startup software found in media ---- "
ln -sfn /sbin/init.sysvinit /sbin/init ln -sfn /sbin/init.sysvinit /sbin/init
echo "Flash " > $NEODEVICE$IMAGEKATALOG/.neonextboot
echo "Reinstall kernel -Press number 3" > $NEODEVICE$UPLOAD/.kernel/used_flash_kernel
echo " Sending all processes the TERM- KILL signal..." echo " Sending all processes the TERM- KILL signal..."
/bin/umount /media/usb > /dev/null 2>&1 /bin/umount /media/usb > /dev/null 2>&1
sleep 1
/bin/umount /media/hdd > /dev/null 2>&1 /bin/umount /media/hdd > /dev/null 2>&1
echo -n "<<<END INIT INFO Rebooting...>>>" echo "====================================================> "
echo " Sending all processes the TERM- KILL signal..." >> $neoLOG reboot -f
echo "Error mounting, Return to image Flash..."; echo "Error mounting, Return to image Flash..." >> $neoLOG
reboot -d -f
fi fi
TARGET=Flash TARGET=Flash
if [ -f `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/.neonextboot ]; then if [ -f `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/.neonextboot ]; then
TARGET=`cat $NEODEVICE$IMAGEKATALOG/.neonextboot` TARGET=`cat $NEODEVICE$IMAGEKATALOG/.neonextboot`
fi fi
if [ ! -f `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/$TARGET/boot/zImage.$HOSTNAME ]; then if [ ! -f `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/$TARGET/boot/zImage.$HOSTNAME ]; then
echo "Image launched on a base kernel flash. " >> $neoLOG echo "Image launched on a base kernel flash. " >> $neoLOG
echo "Image launched on a base kernel flash. " > `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/$TARGET/kernel_flash echo "Image launched on a base kernel flash. " > `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/$TARGET/kernel_flash
echo "NeoBoot is starting mdev fom FLASH..." echo "NeoBoot is starting mdev fom FLASH..."
echo "/sbin/mdev" > /proc/sys/kernel/hotplug echo "/sbin/mdev" > /proc/sys/kernel/hotplug
/etc/init.d/mdev > /dev/null 2>&1 /etc/init.d/mdev > /dev/null 2>&1
@@ -166,19 +143,15 @@ else
echo "Load video and frame buffer modules ..." echo "Load video and frame buffer modules ..."
#modprobe dvb #modprobe dvb
echo "NeoBoot is loading modules" echo "NeoBoot is loading modules"
sleep 2
for mod in dvb; do for mod in dvb; do
$MODPROBE $mod $MODPROBE $mod
done done
# Hack for loading modules which are not loaded on diffrent kernel images # Hack for loading modules which are not loaded on diffrent kernel images
/etc/init.d/modutils.sh /etc/init.d/modutils.sh
#
echo -n "Set BOOTLOGO ..." echo -n "Set BOOTLOGO ..."
cat /etc/videomode > /proc/stb/video/videomode cat /etc/videomode > /proc/stb/video/videomode
#we must wait until udev has created the video device #we must wait until udev has created the video device
( (
if [ -d /proc/stb ]; then if [ -d /proc/stb ]; then
@@ -199,23 +172,19 @@ else
if [ -f $LIBDIR/kernel/fs/autofs4/autofs4.ko ]; then if [ -f $LIBDIR/kernel/fs/autofs4/autofs4.ko ]; then
/sbin/insmod $LIBDIR/kernel/fs/autofs4/autofs4.ko > /dev/null 2>&1 /sbin/insmod $LIBDIR/kernel/fs/autofs4/autofs4.ko > /dev/null 2>&1
fi fi
/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/bin/fbclear > /dev/null 2>&1
/usr/lib/enigma2/python/Plugins/Extensions/NFR4XBoot/bin/fbclear > /dev/null 2>&1
fi fi
#TARGET=Flash
HARDWARETYPE=`uname -m`
if [ $TARGET = "Flash" ]; then if [ $TARGET = "Flash" ]; then
echo "NEOBOOT is booting image from " $TARGET echo "NEOBOOT is booting image from " $TARGET
/bin/umount /media/usb > /dev/null 2>&1 /bin/umount /media/usb > /dev/null 2>&1
sleep 1
/bin/umount /media/hdd > /dev/null 2>&1 /bin/umount /media/hdd > /dev/null 2>&1
if [ $HARDWARETYPE != "armv7l" ]; then echo "====================================================> "
/usr/bin/showiframe /usr/share/bootlogo.mvi > /dev/null 2>&1
fi
echo "----------------------------------" echo "----------------------------------"
echo " BOOT UP IMAGE FROM FLASH " echo " BOOT UP IMAGE FROM FLASH "
echo "----------------------------------"; echo "----------------------------------"
echo " BOOT UP IMAGE FROM FLASH " >> $neoLOG echo " BOOT UP IMAGE FROM FLASH " >> $neoLOG
echo "====================================================> "
ln -sfn /sbin/init.sysvinit /sbin/init ln -sfn /sbin/init.sysvinit /sbin/init
else else
if [ -f `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/$TARGET/.control_ok ]; then if [ -f `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/$TARGET/.control_ok ]; then
@@ -224,53 +193,41 @@ else
else else
if [ -f `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/$TARGET/.control_boot_new_image ]; then if [ -f `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/$TARGET/.control_boot_new_image ]; then
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..." >> $neoLOG
echo "First start image - The first attempt to launch a new image... " echo " First start image - The first attempt to launch a new image... "
echo "====================================================> " echo "====================================================> "
rm -f `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/$TARGET/.control_boot_new_image > /dev/null 2>&1 rm -f `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/$TARGET/.control_boot_new_image > /dev/null 2>&1
else else
if [ ! -f `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/$TARGET/.control_ok ] ; then 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 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 dd if=`cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$UPLOAD/.kernel/flash-kernel-$HOSTNAME.bin of=/dev/mmcblk0p1
elif [ $HOSTNAME = "vuzero4k" ] ; then
dd if=`cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$UPLOAD/.kernel/flash-kernel-$HOSTNAME.bin of=/dev/mmcblk0p4
elif [ $HOSTNAME = "vuduo4k" ] ; then
dd if=`cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$UPLOAD/.kernel/flash-kernel-$HOSTNAME.bin of=/dev/mmcblk0p6
fi fi
echo " Wrong kernel. FATAL ERROR - Back to image Flash..." >> $neoLOG echo "Wrong kernel. FATAL ERROR - Back to image Flash..." >> $neoLOG
echo "Wrong kernel. Press number 3" > `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$UPLOAD/.kernel/used_flash_kernel echo "Wrong kernel-press 3" > `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$UPLOAD/.kernel/used_flash_kernel
ln -sfn /sbin/init.sysvinit /sbin/init ln -sfn /sbin/init.sysvinit /sbin/init
echo "Flash " > `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/.neonextboot echo "Flash " > `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/.neonextboot
/bin/umount /media/usb > /dev/null 2>&1 /bin/umount /media/usb > /dev/null 2>&1
sleep 1
/bin/umount /media/hdd > /dev/null 2>&1 /bin/umount /media/hdd > /dev/null 2>&1
echo -n "<<<END INIT INFO Rebooting...>>>" echo -n "---- control_ok not found ----"
echo "control_ok not found back to image flash..." >> $neoLOG
echo -n " END INIT INFO Rebooting..."
echo "====================================================> "
sleep 5
reboot -d -f reboot -d -f
fi fi
fi fi
fi fi
echo "NeoBoot is booting" $TARGET " from " `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location` echo "NeoBoot is booting" $TARGET " from " `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`
if [ -d $NEODEVICE$IMAGEKATALOG/$TARGET ]; then if [ -d $NEODEVICE$IMAGEKATALOG/$TARGET ]; then
if [ -f $NEODEVICE$IMAGEKATALOG/$TARGET/etc/init.d/udev ]; then if [ -f $NEODEVICE$IMAGEKATALOG/$TARGET/etc/init.d/udev ]; then
sed -ie "s#\$4#\$3#g" $NEODEVICE$IMAGEKATALOG/$TARGET/etc/init.d/udev sed -ie "s#\$4#\$3#g" $NEODEVICE$IMAGEKATALOG/$TARGET/etc/init.d/udev
fi fi
if [ $HARDWARETYPE != "armv7l" ]; then
if [ -f $NEODEVICE$IMAGEKATALOG/$TARGET/usr/share/bootlogo.mvi ]; then
/usr/bin/showiframe $NEODEVICE$IMAGEKATALOG/$TARGET/usr/share/bootlogo.mvi
else
/usr/bin/showiframe $NEODEVICE$IMAGEKATALOG/$TARGET/usr/share/bootlogo.mvi
fi
fi
sleep 1 sleep 1
/bin/mount -o bind /dev $NEODEVICE$IMAGEKATALOG/$TARGET/dev /bin/mount -o bind /dev $NEODEVICE$IMAGEKATALOG/$TARGET/dev
/bin/mount -o bind /proc $NEODEVICE$IMAGEKATALOG/$TARGET/proc /bin/mount -o bind /proc $NEODEVICE$IMAGEKATALOG/$TARGET/proc
/bin/mount -o bind /sys $NEODEVICE$IMAGEKATALOG/$TARGET/sys /bin/mount -o bind /sys $NEODEVICE$IMAGEKATALOG/$TARGET/sys
rm $NEODEVICE$IMAGEKATALOG/$TARGET$NEODEVICE > /dev/null 2>&1 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
if [ $HOSTNAME = "vuultimo4k" ] || [ $HOSTNAME = "vusolo4k" ] || [ $HOSTNAME = "vuuno4kse" ] || [ $HOSTNAME = "vuuno4k" ]; then if [ $HOSTNAME = "vuultimo4k" ] || [ $HOSTNAME = "vusolo4k" ] || [ $HOSTNAME = "vuuno4kse" ] || [ $HOSTNAME = "vuuno4k" ]; then
break; break;
else else
@@ -286,12 +243,10 @@ else
done done
chmod 755 `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/$TARGET/usr/bin/enigma2_pre_start.sh 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 " echo "NeoBOOT created the file enigma2_pre_start.sh "
if [ ! -e $NEODEVICE$IMAGEKATALOG/$TARGET/usr/bin/enigma2_pre_start.sh ]; then 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 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 fi
fi fi
echo " [NEOBOOT] Use chroot ... exec /usr/sbin/chroot..." echo " [NEOBOOT] Use chroot ... exec /usr/sbin/chroot..."
cp -f -r /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/mountpoint.sh $NEODEVICE$IMAGEKATALOG/$TARGET/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/mountpoint.sh cp -f -r /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/mountpoint.sh $NEODEVICE$IMAGEKATALOG/$TARGET/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/mountpoint.sh
#/bin/mount /dev/sda1 `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$TARGET/media/hdd #/bin/mount /dev/sda1 `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$TARGET/media/hdd
@@ -301,7 +256,7 @@ else
echo "----------------------------------------" echo "----------------------------------------"
echo " -=*[ BOOT UP IMAGE FROM DISK ]*=- " >> $neoLOG echo " -=*[ BOOT UP IMAGE FROM DISK ]*=- " >> $neoLOG
echo "Boot from " `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location` >> $neoLOG echo "Boot from " `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location` >> $neoLOG
echo "start file - init >" $TARGET >> $neoLOG echo "Start file - init >" $TARGET >> $neoLOG
echo "====================================================> " echo "====================================================> "
exec /usr/sbin/chroot `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/$TARGET /sbin/init.sysvinit exec /usr/sbin/chroot `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/$TARGET /sbin/init.sysvinit
elif [ -f `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/$TARGET/sbin/init.sysvinit ]; then elif [ -f `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/$TARGET/sbin/init.sysvinit ]; then
@@ -313,29 +268,25 @@ else
echo "Not found correctly unpacked image "$TARGET" z partycji " $DEVICE echo "Not found correctly unpacked image "$TARGET" z partycji " $DEVICE
echo "Check the correctness of unpacked catalogs in the selected one image. " echo "Check the correctness of unpacked catalogs in the selected one image. "
echo " Back to image Flash... " echo " Back to image Flash... "
/usr/bin/showiframe /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/error.mvi > /dev/null 2>&1
echo "Flash " > `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/.neonextboot echo "Flash " > `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/.neonextboot
echo "Used Kernel: Reinstall kernel !" > `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$UPLOAD/.kernel/used_flash_kernel echo "Reinstall kernel!" > `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$UPLOAD/.kernel/used_flash_kernel
/bin/umount /media/usb > /dev/null 2>&1 /bin/umount /media/usb > /dev/null 2>&1
/bin/umount /media/hdd > /dev/null 2>&1 /bin/umount /media/hdd > /dev/null 2>&1
echo -n " FATAL ERROR - Back to image Flash...\n<<<END INIT INFO Rebooting...>>>" >> $neoLOG echo -n " FATAL ERROR - Back to image Flash...\n<<<END INIT INFO Rebooting...>>>" >> $neoLOG
echo -n "<<<END INIT INFO Rebooting...>>>" echo -n " END INIT INFO Rebooting... "
echo "====================================================> "
ln -sfn /sbin/init.sysvinit /sbin/init ln -sfn /sbin/init.sysvinit /sbin/init
reboot -d -f reboot -d -f
fi fi
exit 0 exit 0
fi fi
fi fi
fi fi
# boot Flash # boot Flash
if [ -f /sbin/init.sysvinit ]; then if [ -f /sbin/init.sysvinit ]; then
echo "Running /sbin/init.sysvinit - boot Flash" #echo "Running /sbin/init.sysvinit - boot Flash"
exec /sbin/init.sysvinit $1 exec /sbin/init.sysvinit $1
fi fi
exit 0 exit 0
;; ;;
esac esac