mirror of
https://github.com/gutosie/neoboot.git
synced 2025-11-03 04:35:47 +01:00
Add files via upload
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#DESCRIPTION = This script mod. by gutosie
|
#DESCRIPTION = This script mod. by gutosie
|
||||||
#NeoBoot INIT Version: 9.12 vip
|
#NeoBoot INIT Version: VIP MIPSEL stb vuplus
|
||||||
#Scrypt Unix Shell - init for neoboot
|
#Scrypt Unix Shell - init for neoboot
|
||||||
NEOBOOT=/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot
|
NEOBOOT=/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot
|
||||||
MODPROBE=/sbin/modprobe
|
MODPROBE=/sbin/modprobe
|
||||||
@@ -8,26 +8,24 @@ NEODEVICE=`cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`
|
|||||||
IMAGEKATALOG=ImageBoot
|
IMAGEKATALOG=ImageBoot
|
||||||
UPLOAD=ImagesUpload
|
UPLOAD=ImagesUpload
|
||||||
HOSTNAME=`cat /etc/hostname`
|
HOSTNAME=`cat /etc/hostname`
|
||||||
echo "====================================================> "
|
neoLOG=$NEODEVICE$IMAGEKATALOG/initneo.log
|
||||||
echo " "
|
|
||||||
echo " -=*[ NEOBOOT - BOOT UP ]*=- "
|
|
||||||
echo " NEO BOOT INIT Version: gutosie "
|
|
||||||
echo " q(-_-)p "
|
|
||||||
echo " "
|
|
||||||
echo "====================================================> "
|
|
||||||
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;
|
||||||
else
|
elif [ -e `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/.neonextboot ] ; then
|
||||||
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 - boot Flash"
|
||||||
exit 0
|
break;
|
||||||
else
|
|
||||||
break;
|
|
||||||
fi
|
fi
|
||||||
fi
|
else
|
||||||
|
echo "====================================================> "
|
||||||
|
echo " -=*[ NEOBOOT - BOOT UP ]*=- "
|
||||||
|
echo " NEO BOOT INIT Version: gutosie "
|
||||||
|
echo " q(-_-)p "
|
||||||
|
echo "====================================================> "
|
||||||
|
echo " "
|
||||||
mknod /dev/sda b 8 0
|
mknod /dev/sda b 8 0
|
||||||
mknod /dev/sda1 b 8 1
|
mknod /dev/sda1 b 8 1
|
||||||
mknod /dev/sda2 b 8 2
|
mknod /dev/sda2 b 8 2
|
||||||
@@ -51,119 +49,148 @@ else
|
|||||||
LIBDIR=/lib/modules/`ls /lib/modules | tail -n 1`
|
LIBDIR=/lib/modules/`ls /lib/modules | tail -n 1`
|
||||||
fi
|
fi
|
||||||
if [ `mount | grep /proc | wc -l` -lt 1 ]; then
|
if [ `mount | grep /proc | wc -l` -lt 1 ]; then
|
||||||
/bin/mount -t proc proc /proc > /dev/null 2>&1
|
/bin/mount -a
|
||||||
/bin/mount -t sysfs sysfs /sys > /dev/null 2>&1
|
/bin/mount -t proc proc /proc > /dev/null 2>&1
|
||||||
/sbin/depmod -Ae > /dev/null 2>&1
|
/bin/mount -t sysfs sysfs /sys > /dev/null 2>&1
|
||||||
|
/sbin/depmod -Ae > /dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
sleep 2
|
sleep 2
|
||||||
mnttest="nouuid"
|
echo " "
|
||||||
if [ -e $NEOBOOT/bin/install ]; then
|
echo "Search NEOBOOT... "
|
||||||
orgimag1=`mount | sed '/sd/!d' | cut -d" " -f1`
|
if [ ! -e `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location` ]; then
|
||||||
selectinstall=`cat $NEOBOOT/bin/install`
|
mkdir `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location` > /dev/null 2>&1
|
||||||
for item in $orgimag1; do
|
echo "_______________________NeoBoot created location media_______________________"
|
||||||
selectmnt=`blkid | sed '/$selectinstall/!d' | cut -d":" -f1`
|
|
||||||
if [ $selectmnt == $item ]; then
|
|
||||||
echo "selectmnt=" $selectmnt
|
|
||||||
mnttest="uuid"
|
|
||||||
mount $selectmnt $NEODEVICE > /dev/null 2>&1
|
|
||||||
fi
|
|
||||||
if [ ! -e $NEODEVICE$IMAGEKATALOG ]; then
|
|
||||||
echo "NEOBOOT hasn't been installed on: " $selectmnt
|
|
||||||
umount $NEODEVICE > /dev/null 2>&1
|
|
||||||
else
|
|
||||||
echo "NEOBOOT has been installed on: " $selectmnt
|
|
||||||
break;
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
fi
|
||||||
if [ ! -e $NEODEVICE ]; then
|
|
||||||
mkdir $NEODEVICE > /dev/null 2>&1
|
if [ -e /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/neo.sh ]; then
|
||||||
fi
|
/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/neo.sh > /dev/null 2>&1
|
||||||
if [ $mnttest == "nouuid" ] ; then
|
echo " "
|
||||||
|
echo "_______________________NeoBoot mounted according to file neo.sh _______________________"
|
||||||
|
fi
|
||||||
|
if [ -e $NEODEVICE$IMAGEKATALOG/.neonextboot ]; then
|
||||||
|
break;
|
||||||
|
else
|
||||||
|
mnttest="nolocation"
|
||||||
|
if [ -e /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/bin/install ]; then
|
||||||
|
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
|
||||||
|
echo "_______________________ NeoBoot not mounted by LOCATION_______________________ "
|
||||||
|
else
|
||||||
|
echo "NEOBOOT has been installed on: " $selectmnt
|
||||||
|
echo "_______________________ NeoBoot mount by LOCATION_______________________ "
|
||||||
|
break;
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $mnttest == "location" ] ; then
|
||||||
|
break;
|
||||||
|
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
|
||||||
if [ -e $NEODEVICE ]; then
|
if [ -e `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location` ]; then
|
||||||
echo "neoboot checking installation on: " $DEVICE
|
echo "neoboot checking installation on: " $DEVICE
|
||||||
mount $DEVICE $NEODEVICE > /dev/null 2>&1
|
mount $DEVICE `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location` > /dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
if [ ! -e $NEODEVICE$IMAGEKATALOG ]; then
|
if [ ! -e `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`ImageBoot ]; then
|
||||||
echo "NeoBoot hasn't been installed on: " $DEVICE
|
echo "NeoBoot hasn't been installed on: " $DEVICE
|
||||||
umount $NEODEVICE > /dev/null 2>&1
|
umount `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location` > /dev/null 2>&1
|
||||||
else
|
else
|
||||||
echo "NEOBOOTt has been installed on: " $DEVICE
|
echo "NeoBoot has been installed on: " $DEVICE
|
||||||
break;
|
echo "_______________________ NeoBoot mount by DEVICE_______________________"
|
||||||
fi
|
break;
|
||||||
done
|
fi
|
||||||
elif [ $mnttest == "uuid" ]; then
|
done
|
||||||
echo "NEOBOOT mount by UUID"
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ ! -e $NEODEVICE$IMAGEKATALOG/.neonextboot ]; then
|
||||||
|
if [ -e /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/neo.sh ]; then
|
||||||
|
/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/neo.sh
|
||||||
|
echo "_______________________Location neoboot mounted according to file neo.sh _______________________"
|
||||||
|
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 > /dev/null 2>&1
|
/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/mountpoint.sh > /dev/null 2>&1
|
||||||
echo "_______________________NeoBoot mount by MOUNTPOINT_______________________"
|
echo "_______________________NeoBoot location mounted according to file mountpoint.sh_______________________"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
neoLOG=$NEODEVICE$IMAGEKATALOG/initneo.log
|
|
||||||
if [ -f $neoLOG ]; then
|
if [ -f $neoLOG ]; then
|
||||||
rm -f $neoLOG
|
rm -f $neoLOG
|
||||||
touch $neoLOG
|
touch $neoLOG
|
||||||
|
echo " >>> START NEXT LOG... >>> " >> $neoLOG
|
||||||
|
echo "..............-=*[ NEOBOOT - BOOT UP ]*=-.............." >> $neoLOG
|
||||||
|
echo " ____q(-_-)p____START NEXT Image...____q(-_-)p____ " >> $neoLOG
|
||||||
|
echo "......................................................." >> $neoLOG
|
||||||
|
echo "Tuner name: " `cat /etc/hostname` >> $neoLOG
|
||||||
|
echo "Boot image: " `cat $NEODEVICE$IMAGEKATALOG/.neonextboot` >> $neoLOG
|
||||||
|
echo "Init image, base kernel: " `cat $NEODEVICE$IMAGEKATALOG/.neonextboot` >> $neoLOG
|
||||||
fi
|
fi
|
||||||
echo " >>> START NEXT LOG... >>> " >> $neoLOG
|
|
||||||
echo "..............-=*[ NEOBOOT - BOOT UP ]*=-.............." >> $neoLOG
|
|
||||||
echo " ____q(-_-)p____START NEXT Image...____q(-_-)p____ " >> $neoLOG
|
|
||||||
echo "......................................................." >> $neoLOG
|
|
||||||
echo "Tuner name: " `cat /etc/hostname` >> $neoLOG
|
|
||||||
echo "Boot image: " `cat $NEODEVICE$IMAGEKATALOG/.neonextboot` >> $neoLOG
|
|
||||||
echo "Init image, base kernel: " `cat $NEODEVICE$IMAGEKATALOG/.neonextboot` >> $neoLOG
|
|
||||||
if [ ! -e $NEODEVICE$IMAGEKATALOG/.neonextboot ]; then
|
if [ ! -e $NEODEVICE$IMAGEKATALOG/.neonextboot ]; then
|
||||||
ln -sfn /sbin/init.sysvinit /sbin/init
|
echo -n "---- no startup software found in media ---- "
|
||||||
echo "Flash " > $NEODEVICE$IMAGEKATALOG/.neonextboot
|
echo "====================================================> "
|
||||||
echo "Used Kernel: Reinstall kernel !" > $NEODEVICE$$UPLOAD/.kernel/used_flash_kernel
|
|
||||||
echo " Sending all processes the TERM- KILL signal..."
|
|
||||||
echo -n "<<<END INIT INFO Rebooting...>>>"
|
|
||||||
echo " Sending all processes the TERM- KILL signal..." >> $neoLOG
|
|
||||||
echo "Error mounting, Return to image Flash..."; echo "Error mounting, Return to image Flash..." >> $neoLOG
|
|
||||||
/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
|
||||||
reboot -f
|
ln -sfn /sbin/init.sysvinit /sbin/init
|
||||||
|
reboot -f
|
||||||
fi
|
fi
|
||||||
TARGET=Flash
|
TARGET=Flash
|
||||||
if [ -f $NEODEVICE$IMAGEKATALOG/.neonextboot ]; then
|
if [ -f $NEODEVICE$IMAGEKATALOG/.neonextboot ]; then
|
||||||
TARGET=`cat $NEODEVICE$IMAGEKATALOG/.neonextboot`
|
TARGET=`cat $NEODEVICE$IMAGEKATALOG/.neonextboot`
|
||||||
fi
|
fi
|
||||||
if [ $TARGET = "Flash" ]; then
|
if [ $TARGET = "Flash" ]; then
|
||||||
|
echo " "
|
||||||
echo "NEOBOOT is booting image from " $TARGET
|
echo "NEOBOOT is booting image from " $TARGET
|
||||||
echo " BOOT UP IMAGE FROM FLASH " >> $neoLOG
|
echo " BOOT UP IMAGE FROM FLASH " >> $neoLOG
|
||||||
/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 "----------------------------------"
|
echo "----------------------------------"
|
||||||
echo " BOOT UP IMAGE FROM FLASH "
|
echo " BOOT UP IMAGE FROM FLASH "
|
||||||
echo "----------------------------------";
|
echo "----------------------------------"
|
||||||
|
echo " "
|
||||||
ln -sfn /sbin/init.sysvinit /sbin/init
|
ln -sfn /sbin/init.sysvinit /sbin/init
|
||||||
else
|
else
|
||||||
######### test boot new imaga>>>>
|
# test boot new imaga
|
||||||
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
|
||||||
|
echo " "
|
||||||
echo "No Error - Booting image normal..."
|
echo "No Error - Booting image normal..."
|
||||||
echo "No Error - Booting image normal... " >> $neoLOG
|
echo "No Error - Booting image normal... " >> $neoLOG
|
||||||
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 " "
|
||||||
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
|
||||||
echo " Wrong kernel. FATAL ERROR - Back to image Flash..." >> $neoLOG
|
echo " "
|
||||||
echo "Wrong kernel. Press number 3" > `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$UPLOAD/.kernel/used_flash_kernel
|
echo "Wrong kernel. Press number 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
|
||||||
/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 "====================================================> "
|
||||||
sleep 5
|
sleep 5
|
||||||
reboot -d -f
|
reboot -f
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@@ -178,9 +205,6 @@ else
|
|||||||
/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
|
|
||||||
break;
|
|
||||||
else
|
|
||||||
orgimag=`mount | sed '/sd/!d' | cut -d" " -f1`
|
orgimag=`mount | sed '/sd/!d' | cut -d" " -f1`
|
||||||
rm -f $NEODEVICE$IMAGEKATALOG/$TARGET/usr/bin/enigma2_pre_start.sh
|
rm -f $NEODEVICE$IMAGEKATALOG/$TARGET/usr/bin/enigma2_pre_start.sh
|
||||||
for item in $orgimag; do
|
for item in $orgimag; do
|
||||||
@@ -196,24 +220,31 @@ else
|
|||||||
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
|
echo " "
|
||||||
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
|
||||||
if [ -f `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/$TARGET/sbin/init ]; then
|
if [ -f `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/$TARGET/sbin/init ]; then
|
||||||
|
echo " "
|
||||||
echo "----------------------------------------"
|
echo "----------------------------------------"
|
||||||
echo " -=*[ BOOT UP IMAGE FROM DISK ]*=- "
|
echo " -=*[ BOOT UP IMAGE FROM DISK ]*=- "
|
||||||
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 "====================================================> "
|
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
|
||||||
echo " start file - init.sysvinit" >> $neoLOG
|
echo "----------------------------------------"
|
||||||
exec /usr/sbin/chroot `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/$TARGET /sbin/init
|
echo " -=*[ BOOT UP IMAGE FROM DISK ]*=- "
|
||||||
|
echo "----------------------------------------"
|
||||||
|
echo "Boot from " `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location` >> $neoLOG
|
||||||
|
echo "start file - init.sysvinit >" $TARGET >> $neoLOG
|
||||||
echo "====================================================> "
|
echo "====================================================> "
|
||||||
|
exec /usr/sbin/chroot `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$IMAGEKATALOG/$TARGET /sbin/init
|
||||||
else
|
else
|
||||||
|
echo " "
|
||||||
echo " NEOBOOT - ERROR !!! "
|
echo " NEOBOOT - ERROR !!! "
|
||||||
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. "
|
||||||
@@ -222,8 +253,7 @@ else
|
|||||||
echo "Used Kernel: Reinstall kernel !" > `cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`$UPLOAD/.kernel/used_flash_kernel
|
echo "Used Kernel: 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...\nEND INIT INFO Rebooting..." >> $neoLOG
|
||||||
echo -n "<<<END INIT INFO Rebooting...>>>"
|
|
||||||
ln -sfn /sbin/init.sysvinit /sbin/init
|
ln -sfn /sbin/init.sysvinit /sbin/init
|
||||||
reboot -d -f
|
reboot -d -f
|
||||||
fi
|
fi
|
||||||
@@ -233,7 +263,8 @@ else
|
|||||||
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"
|
||||||
|
ln -sfn /sbin/init.sysvinit /sbin/init
|
||||||
exec /sbin/init.sysvinit $1
|
exec /sbin/init.sysvinit $1
|
||||||
fi
|
fi
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
Reference in New Issue
Block a user