mirror of
https://github.com/gutosie/neoboot.git
synced 2025-11-02 12:25:46 +01:00
Add files via upload
This commit is contained in:
@@ -1,11 +1,12 @@
|
|||||||
#!/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: NEOBOOT VIP MIPS
|
||||||
#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
|
||||||
NEODEVICE=`cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`
|
NEODEVICE=`cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`
|
||||||
IMAGEKATALOG=ImageBoot
|
IMAGEKATALOG=ImageBoot
|
||||||
|
UPLOAD=ImagesUpload
|
||||||
HOSTNAME=`cat /etc/hostname`
|
HOSTNAME=`cat /etc/hostname`
|
||||||
echo "====================================================> "
|
echo "====================================================> "
|
||||||
echo " "
|
echo " "
|
||||||
@@ -44,13 +45,14 @@ else
|
|||||||
mknod /dev/fb0 c 29 0
|
mknod /dev/fb0 c 29 0
|
||||||
mkdir /dev/fb
|
mkdir /dev/fb
|
||||||
ln -s ../fb0 /dev/fb/0
|
ln -s ../fb0 /dev/fb/0
|
||||||
|
echo "====================================================> "
|
||||||
sleep 1
|
sleep 1
|
||||||
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`
|
||||||
fi
|
fi
|
||||||
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 -t proc proc /proc > /dev/null 2>&1
|
/bin/mount -t proc proc /proc > /dev/null 2>&1
|
||||||
/bin/mount -t sysfs sysfs /sys > /dev/null 2>&1
|
/bin/mount -t sysfs sysfs /sys > /dev/null 2>&1
|
||||||
/sbin/depmod -Ae > /dev/null 2>&1
|
/sbin/depmod -Ae > /dev/null 2>&1
|
||||||
@@ -119,7 +121,6 @@ else
|
|||||||
umount $NEODEVICE > /dev/null 2>&1
|
umount $NEODEVICE > /dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
#dodatkowe szukanie neoboota
|
|
||||||
#mount /dev/sdb1 $NEODEVICE > /dev/null 2>&1 # <<< tu mozesz zmienic sdb1 i wpisac Twoje montowanie dysku dla neoboot
|
#mount /dev/sdb1 $NEODEVICE > /dev/null 2>&1 # <<< tu mozesz zmienic sdb1 i wpisac Twoje montowanie dysku dla neoboot
|
||||||
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
|
||||||
@@ -183,7 +184,7 @@ else
|
|||||||
ln -sfn /sbin/init.sysvinit /sbin/init
|
ln -sfn /sbin/init.sysvinit /sbin/init
|
||||||
/usr/bin/showiframe /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/error.mvi > /dev/null 2>&1
|
/usr/bin/showiframe /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/error.mvi > /dev/null 2>&1
|
||||||
echo "Flash " > $NEODEVICE$IMAGEKATALOG/.neonextboot
|
echo "Flash " > $NEODEVICE$IMAGEKATALOG/.neonextboot
|
||||||
echo "Used Kernel: Reinstall kernel !" > /media/neoboot/ImagesUpload/.kernel/used_flash_kernel
|
echo "Used Kernel: Reinstall kernel !" > $NEODEVICE$$UPLOAD/.kernel/used_flash_kernel
|
||||||
echo " Sending all processes the TERM- KILL signal..."
|
echo " Sending all processes the TERM- KILL signal..."
|
||||||
echo -n "<<<END INIT INFO Rebooting...>>>"
|
echo -n "<<<END INIT INFO Rebooting...>>>"
|
||||||
echo " Sending all processes the TERM- KILL signal..." >> $neoLOG
|
echo " Sending all processes the TERM- KILL signal..." >> $neoLOG
|
||||||
@@ -192,21 +193,6 @@ else
|
|||||||
/bin/umount /media/hdd > /dev/null 2>&1
|
/bin/umount /media/hdd > /dev/null 2>&1
|
||||||
reboot -f
|
reboot -f
|
||||||
fi
|
fi
|
||||||
TARGETIMAGE=`cat $NEODEVICE$IMAGEKATALOG/.neonextboot`
|
|
||||||
if [ $TARGETIMAGE = "BlackHoleVU" ] || [ $TARGETIMAGE = "BlackHoleVU+" ] ; then
|
|
||||||
if ! [ -e $NEODEVICE$IMAGEKATALOG/.kernel/used_bh_kernel ]; then
|
|
||||||
rm -f $NEODEVICE$IMAGEKATALOG/.neonextboot
|
|
||||||
echo "Flash " >> $NEODEVICE$IMAGEKATALOG/.neonextboot
|
|
||||||
echo "Halt init image - " $TARGETIMAGE
|
|
||||||
echo "Start image Flash... "
|
|
||||||
/usr/bin/showiframe $NEOBOOT/bh.mvi > /dev/null 2>&1
|
|
||||||
sleep 1
|
|
||||||
exec /sbin/init.sysvinit $*
|
|
||||||
exit 0
|
|
||||||
else
|
|
||||||
break;
|
|
||||||
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`
|
||||||
@@ -268,9 +254,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
|
||||||
@@ -283,11 +266,12 @@ 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 "
|
||||||
|
echo "====================================================> "
|
||||||
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 " [NEOBOOT] Use chroot ... exec /usr/sbin/chroot..."
|
echo " [NEOBOOT] Use chroot ... exec /usr/sbin/chroot..."
|
||||||
|
echo "====================================================> "
|
||||||
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
|
||||||
@@ -316,6 +300,7 @@ else
|
|||||||
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...>>>"
|
||||||
ln -sfn /sbin/init.sysvinit /sbin/init
|
ln -sfn /sbin/init.sysvinit /sbin/init
|
||||||
|
echo "====================================================> "
|
||||||
reboot -d -f
|
reboot -d -f
|
||||||
fi
|
fi
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ NEOBOOT=/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot
|
|||||||
MODPROBE=/sbin/modprobe
|
MODPROBE=/sbin/modprobe
|
||||||
NEODEVICE=`cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`
|
NEODEVICE=`cat /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location`
|
||||||
IMAGEKATALOG=ImageBoot
|
IMAGEKATALOG=ImageBoot
|
||||||
|
UPLOAD=ImagesUpload
|
||||||
HOSTNAME=`cat /etc/hostname`
|
HOSTNAME=`cat /etc/hostname`
|
||||||
echo "====================================================> "
|
echo "====================================================> "
|
||||||
echo " "
|
echo " "
|
||||||
@@ -55,7 +56,6 @@ else
|
|||||||
/sbin/depmod -Ae > /dev/null 2>&1
|
/sbin/depmod -Ae > /dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
sleep 2
|
sleep 2
|
||||||
/usr/bin/showiframe $NEOBOOT/neologo.mvi > /dev/null 2>&1
|
|
||||||
mnttest="nouuid"
|
mnttest="nouuid"
|
||||||
if [ -e $NEOBOOT/bin/install ]; then
|
if [ -e $NEOBOOT/bin/install ]; then
|
||||||
orgimag1=`mount | sed '/sd/!d' | cut -d" " -f1`
|
orgimag1=`mount | sed '/sd/!d' | cut -d" " -f1`
|
||||||
@@ -119,9 +119,8 @@ else
|
|||||||
echo "Init image, base kernel: " `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
|
ln -sfn /sbin/init.sysvinit /sbin/init
|
||||||
/usr/bin/showiframe /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/error.mvi > /dev/null 2>&1
|
|
||||||
echo "Flash " > $NEODEVICE$IMAGEKATALOG/.neonextboot
|
echo "Flash " > $NEODEVICE$IMAGEKATALOG/.neonextboot
|
||||||
echo "Used Kernel: Reinstall kernel !" > /media/neoboot/ImagesUpload/.kernel/used_flash_kernel
|
echo "Used Kernel: Reinstall kernel !" > $NEODEVICE$$UPLOAD/.kernel/used_flash_kernel
|
||||||
echo " Sending all processes the TERM- KILL signal..."
|
echo " Sending all processes the TERM- KILL signal..."
|
||||||
echo -n "<<<END INIT INFO Rebooting...>>>"
|
echo -n "<<<END INIT INFO Rebooting...>>>"
|
||||||
echo " Sending all processes the TERM- KILL signal..." >> $neoLOG
|
echo " Sending all processes the TERM- KILL signal..." >> $neoLOG
|
||||||
@@ -134,16 +133,11 @@ else
|
|||||||
if [ -f $NEODEVICE$IMAGEKATALOG/.neonextboot ]; then
|
if [ -f $NEODEVICE$IMAGEKATALOG/.neonextboot ]; then
|
||||||
TARGET=`cat $NEODEVICE$IMAGEKATALOG/.neonextboot`
|
TARGET=`cat $NEODEVICE$IMAGEKATALOG/.neonextboot`
|
||||||
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
|
||||||
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
|
||||||
if [ $HARDWARETYPE != "armv7l" ]; then
|
|
||||||
/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 "----------------------------------";
|
||||||
@@ -161,14 +155,14 @@ else
|
|||||||
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
|
||||||
/usr/bin/showiframe /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/error.mvi > /dev/null 2>&1
|
|
||||||
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 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 "<<<END INIT INFO Rebooting...>>>"
|
||||||
|
sleep 5
|
||||||
reboot -d -f
|
reboot -d -f
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@@ -178,13 +172,6 @@ else
|
|||||||
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
|
||||||
@@ -231,7 +218,6 @@ 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 "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
|
||||||
|
|||||||
Reference in New Issue
Block a user