From 60750d6ce7fa3b1740940ffc9d7fad9b3ee8f96e Mon Sep 17 00:00:00 2001 From: gutosie Date: Wed, 29 Dec 2021 18:47:03 +0200 Subject: [PATCH] Update xtrend_mtd1_run.py --- NeoBoot/tmpfiles/runpy/xtrend_mtd1_run.py | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/NeoBoot/tmpfiles/runpy/xtrend_mtd1_run.py b/NeoBoot/tmpfiles/runpy/xtrend_mtd1_run.py index 61c7f51..300d947 100644 --- a/NeoBoot/tmpfiles/runpy/xtrend_mtd1_run.py +++ b/NeoBoot/tmpfiles/runpy/xtrend_mtd1_run.py @@ -133,22 +133,25 @@ class StartImage(Screen): cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT-REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') cmd1 = 'ln -sfn /sbin/neoinitmips /sbin/init; /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/kernel.sh' - elif not fileExists('%sImageBoot/%s/boot/%s.vmlinux.gz' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())): + elif not fileExists('' + getNeoLocation() + 'ImageBoot/' + getImageNeoBoot() + '/boot/' + getBoxHostName() + '.vmlinux.gz'): cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT > REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') cmd1 = 'ln -sfn /sbin/neoinitmips /sbin/init; reboot -d -f' - elif fileExists('/.multinfo'): - if not fileExists('%sImageBoot/%s/boot/%s.vmlinux.gz' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())): - cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT_REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') - cmd1 = 'flash_eraseall /dev/mtd1; sleep 2; ' + LinkNeoBoot + '/bin/nandwrite -p /dev/mtd1 %sImagesUpload/.kernel/%s.vmlinux.gz; reboot -d -f' % (getNeoLocation(), getBoxHostName()) - - elif fileExists('%sImageBoot/%s/boot/%s.vmlinux.gz' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())): + elif fileExists('/.multinfo'): + if fileExists('' + getNeoLocation() + 'ImageBoot/' + getImageNeoBoot() + '/boot/' + getBoxHostName() + '.vmlinux.gz'): cmd = "echo -e '\n\n%s '" % _('...............REBOOT now...............\nPlease wait, in a moment the decoder will be restarted...') - cmd1 = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/kernel.sh' - + cmd1 = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/kernel.sh' + + elif fileExists('' + getNeoLocation() + 'ImagesUpload/.kernel/' + getBoxHostName() + '.vmlinux.gz'): + cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT_REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') + cmd1 = 'flash_eraseall /dev/mtd1; sleep 2; dd if=' + getNeoLocation() + 'ImageBoot/' + getImageNeoBoot() + '/boot/' + getBoxHostName() + '.vmlinux.gz of=/dev/mtdblock1; sleep5 5; reboot -d -f' + else: + cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT > REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') + cmd1 = 'ln -sfn /sbin/neoinitmips /sbin/init; reboot -d -f' + self.session.open(Console, _('NeoBoot MIPS....'), [cmd, cmd1]) self.close() - + else: os.system('echo "Flash " >> ' + getNeoLocation() + 'ImageBoot/.neonextboot') self.messagebox = self.session.open(MessageBox, _('It looks like it that multiboot does not support this STB.'), MessageBox.TYPE_INFO, 8)