From fd795a592796ba30480debdee2e87acecc0f72a0 Mon Sep 17 00:00:00 2001 From: gutosie Date: Wed, 19 Jan 2022 23:43:43 +0200 Subject: [PATCH] Add files via upload --- NeoBoot/tmpfiles/runpy/duo4k_run.py | 21 +++++++++------------ NeoBoot/tmpfiles/runpy/duo4kse_run.py | 16 +++++++--------- NeoBoot/tmpfiles/runpy/vu4k_run.py | 16 ++++++---------- NeoBoot/tmpfiles/runpy/vu_mtd1_run.py | 15 ++++++--------- NeoBoot/tmpfiles/runpy/vu_mtd2_run.py | 19 ++++++++----------- NeoBoot/tmpfiles/runpy/zero4k_run.py | 19 ++++++++----------- 6 files changed, 44 insertions(+), 62 deletions(-) diff --git a/NeoBoot/tmpfiles/runpy/duo4k_run.py b/NeoBoot/tmpfiles/runpy/duo4k_run.py index f944703..dd0fdf2 100644 --- a/NeoBoot/tmpfiles/runpy/duo4k_run.py +++ b/NeoBoot/tmpfiles/runpy/duo4k_run.py @@ -129,27 +129,24 @@ class StartImage(Screen): cmd1 = 'cd /media/InternalFlash; ln -sf "init.sysvinit" "/media/InternalFlash/sbin/init"; ' + LinkNeoBoot + '/files/kernel.sh ' elif not fileExists('/.multinfo'): - cmd = 'ln -sf "init.sysvinit" "/sbin/init' - rc = os.system(cmd) - self.session.open(TryQuitMainloop, 2) - + cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') + cmd1 = 'sleep 5; ln -sf "init.sysvinit" "/sbin/init"; reboot -dfhi' + elif getImageNeoBoot() != 'Flash': if not fileExists('/.multinfo'): if not fileExists('%sImageBoot/%s/boot/zImage.%s' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())): - cmd = 'ln -sfn /sbin/neoinitarm /sbin/init' - rc = os.system(cmd) - self.session.open(TryQuitMainloop, 2) + cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') + cmd1 = 'sleep 5; ln -sfn /sbin/neoinitarm /sbin/init; reboot -d -f' elif fileExists('%sImageBoot/%s/boot/zImage.%s' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())): cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') cmd1 = 'ln -sfn /sbin/neoinitarmvu /sbin/init; ' + LinkNeoBoot + '/files/kernel.sh ' elif fileExists('/.multinfo'): - if not fileExists('%sImageBoot/%s/boot/zImage.%s' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())): - cmd = 'dd if=' + getNeoLocation() + 'ImagesUpload/.kernel/flash-kernel-' + getBoxHostName() + '.bin of=/dev/mmcblk0p6; cd /media/InternalFlash; ln -sf "neoinitarm" "/media/InternalFlash/sbin/init"' - rc = os.system(cmd) - self.session.open(TryQuitMainloop, 2) - + if not fileExists('%sImageBoot/%s/boot/zImage.%s' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())): + cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') + cmd1 = 'dd if=' + getNeoLocation() + 'ImagesUpload/.kernel/flash-kernel-' + getBoxHostName() + '.bin of=/dev/mmcblk0p6; cd /media/InternalFlash; ln -sf "neoinitarm" "/media/InternalFlash/sbin/init" ; sleep 2; reboot -dfhi ' + elif fileExists('%sImageBoot/%s/boot/zImage.%s' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())): cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') cmd1 = 'cd /media/InternalFlash; ln -sf "neoinitarmvu" "/media/InternalFlash/sbin/init"; ' + LinkNeoBoot + '/files/kernel.sh ' diff --git a/NeoBoot/tmpfiles/runpy/duo4kse_run.py b/NeoBoot/tmpfiles/runpy/duo4kse_run.py index 6b9f508..daefdc9 100644 --- a/NeoBoot/tmpfiles/runpy/duo4kse_run.py +++ b/NeoBoot/tmpfiles/runpy/duo4kse_run.py @@ -129,16 +129,14 @@ class StartImage(Screen): cmd1 = 'cd /media/InternalFlash; ln -sf "init.sysvinit" "/media/InternalFlash/sbin/init"; ' + LinkNeoBoot + '/files/kernel.sh ' elif not fileExists('/.multinfo'): - cmd = 'ln -sf "init.sysvinit" "/sbin/init"' - rc = os.system(cmd) - self.session.open(TryQuitMainloop, 2) + cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') + cmd1 = 'sleep 5; ln -sf "init.sysvinit" "/sbin/init"; reboot -d -f' elif getImageNeoBoot() != 'Flash': if not fileExists('/.multinfo'): if not fileExists('%sImageBoot/%s/boot/zImage.%s' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())): - cmd = 'ln -sfn /sbin/neoinitarm /sbin/init' - rc = os.system(cmd) - self.session.open(TryQuitMainloop, 2) + cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') + cmd1 = 'sleep 5; ln -sfn /sbin/neoinitarm /sbin/init; reboot -d -f' elif fileExists('%sImageBoot/%s/boot/zImage.%s' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())): cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') @@ -146,9 +144,9 @@ class StartImage(Screen): elif fileExists('/.multinfo'): if not fileExists('%sImageBoot/%s/boot/zImage.%s' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())): - cmd = 'dd if=' + getNeoLocation() + 'ImagesUpload/.kernel/flash-kernel-' + getBoxHostName() + '.bin of=/dev/mmcblk0p6; cd /media/InternalFlash; ln -sf "neoinitarm" "/media/InternalFlash/sbin/init"' - rc = os.system(cmd) - self.session.open(TryQuitMainloop, 2) + cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') + cmd1 = 'dd if=' + getNeoLocation() + 'ImagesUpload/.kernel/flash-kernel-' + getBoxHostName() + '.bin of=/dev/mmcblk0p6; cd /media/InternalFlash; ln -sf "neoinitarm" "/media/InternalFlash/sbin/init" ; sleep 2; reboot -dfhi ' + elif fileExists('%sImageBoot/%s/boot/zImage.%s' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())): cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') cmd1 = 'cd /media/InternalFlash; ln -sf "neoinitarmvu" "/media/InternalFlash/sbin/init"; ' + LinkNeoBoot + '/files/kernel.sh ' diff --git a/NeoBoot/tmpfiles/runpy/vu4k_run.py b/NeoBoot/tmpfiles/runpy/vu4k_run.py index 6e91165..4e5f584 100644 --- a/NeoBoot/tmpfiles/runpy/vu4k_run.py +++ b/NeoBoot/tmpfiles/runpy/vu4k_run.py @@ -128,16 +128,14 @@ class StartImage(Screen): cmd1 = 'cd /media/InternalFlash; ln -sf "init.sysvinit" "/media/InternalFlash/sbin/init"; ' + LinkNeoBoot + '/files/kernel.sh ' elif not fileExists("/.multinfo"): - cmd = 'ln -sf "init.sysvinit" "/sbin/init' - rc = os.system(cmd) - self.session.open(TryQuitMainloop, 2) + cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') + cmd1 = 'sleep 5; ln -sf "init.sysvinit" "/sbin/init"; reboot -d -f' elif getImageNeoBoot() != "Flash": if not fileExists("/.multinfo"): if not fileExists('%sImageBoot/%s/boot/zImage.%s' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())): - cmd = 'ln -sfn /sbin/neoinitarm /sbin/init' - rc = os.system(cmd) - self.session.open(TryQuitMainloop, 2) + cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') + cmd1 = 'sleep 5; ln -sfn /sbin/neoinitarm /sbin/init; reboot -d -f' elif fileExists('%sImageBoot/%s/boot/zImage.%s' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())): cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') @@ -145,10 +143,8 @@ class StartImage(Screen): elif fileExists("/.multinfo"): if not fileExists('%sImageBoot/%s/boot/zImage.%s' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())): - cmd = 'dd if=' + getNeoLocation() + 'ImagesUpload/.kernel/flash-kernel-' + getBoxHostName() + '.bin of=/dev/mmcblk0p1; cd /media/InternalFlash; ln -sf "neoinitarm" "/media/InternalFlash/sbin/init"' - rc = os.system(cmd) - self.session.open(TryQuitMainloop, 2) - + cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') + cmd1 = 'dd if=' + getNeoLocation() + 'ImagesUpload/.kernel/flash-kernel-' + getBoxHostName() + '.bin of=/dev/mmcblk0p1; cd /media/InternalFlash; ln -sf "neoinitarm" "/media/InternalFlash/sbin/init" ; sleep 2; reboot -dfhi ' elif fileExists('%sImageBoot/%s/boot/zImage.%s' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())): cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') cmd1 = 'cd /media/InternalFlash; ln -sf "neoinitarmvu" "/media/InternalFlash/sbin/init"; ' + LinkNeoBoot + '/files/kernel.sh ' diff --git a/NeoBoot/tmpfiles/runpy/vu_mtd1_run.py b/NeoBoot/tmpfiles/runpy/vu_mtd1_run.py index 223aba7..435db5b 100644 --- a/NeoBoot/tmpfiles/runpy/vu_mtd1_run.py +++ b/NeoBoot/tmpfiles/runpy/vu_mtd1_run.py @@ -125,9 +125,8 @@ class StartImage(Screen): cmd = "echo -e '\n\n%s '" % _('...............NeoBoot REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') cmd1 = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/kernel.sh' elif not fileExists('/.multinfo'): - cmd = 'ln -sfn /sbin/init.sysvinit /sbin/init' - rc = os.system(cmd) - self.session.open(TryQuitMainloop, 2) + cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT >> Reboot...............\nPlease wait, in a moment the decoder will be restarted...') + cmd1 = 'ln -sfn /sbin/init.sysvinit /sbin/init; reboot -d -f' elif getImageNeoBoot() != 'Flash': if not fileExists('/.multinfo'): @@ -137,15 +136,13 @@ class StartImage(Screen): cmd1 = 'ln -sfn /sbin/neoinitmipsvu /sbin/init; /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/kernel.sh' elif not fileExists('%sImageBoot/%s/boot/%s.vmlinux.gz' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())): - cmd = 'ln -sfn /sbin/neoinitmipsvu /sbin/init' - rc = os.system(cmd) - self.session.open(TryQuitMainloop, 2) + cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT > REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') + cmd1 = 'ln -sfn /sbin/neoinitmipsvu /sbin/init; reboot -d -f' elif fileExists('/.multinfo'): if not fileExists('%sImageBoot/%s/boot/%s.vmlinux.gz' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())): - cmd = 'flash_eraseall /dev/mtd1; sleep 2; ' + LinkNeoBoot + '/bin/nandwrite -p /dev/mtd1 %sImagesUpload/.kernel/%s.vmlinux.gz' % (getNeoLocation(), getBoxHostName()) - rc = os.system(cmd) - self.session.open(TryQuitMainloop, 2) + 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())): cmd = "echo -e '\n\n%s '" % _('...............REBOOT now...............\nPlease wait, in a moment the decoder will be restarted...') diff --git a/NeoBoot/tmpfiles/runpy/vu_mtd2_run.py b/NeoBoot/tmpfiles/runpy/vu_mtd2_run.py index 90d0b8c..43bcea4 100644 --- a/NeoBoot/tmpfiles/runpy/vu_mtd2_run.py +++ b/NeoBoot/tmpfiles/runpy/vu_mtd2_run.py @@ -125,9 +125,8 @@ class StartImage(Screen): cmd = "echo -e '\n\n%s '" % _('...............NeoBoot REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') cmd1 = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/kernel.sh' elif not fileExists('/.multinfo'): - cmd = 'ln -sfn /sbin/init.sysvinit /sbin/init' - rc = os.system(cmd) - self.session.open(TryQuitMainloop, 2) + cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT >> Reboot...............\nPlease wait, in a moment the decoder will be restarted...') + cmd1 = 'ln -sfn /sbin/init.sysvinit /sbin/init; reboot -d -f' elif getImageNeoBoot() != 'Flash': if not fileExists('/.multinfo'): @@ -137,16 +136,14 @@ class StartImage(Screen): cmd1 = 'ln -sfn /sbin/neoinitmipsvu /sbin/init; /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/kernel.sh' elif not fileExists('%sImageBoot/%s/boot/%s.vmlinux.gz' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())): - cmd = 'ln -sfn /sbin/neoinitmipsvu /sbin/init' - rc = os.system(cmd) - self.session.open(TryQuitMainloop, 2) - + cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT > REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') + cmd1 = 'ln -sfn /sbin/neoinitmipsvu /sbin/init; reboot -d -f' + elif fileExists('/.multinfo'): if not fileExists('%sImageBoot/%s/boot/%s.vmlinux.gz' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())): - cmd = 'flash_eraseall /dev/mtd2; sleep 2; ' + LinkNeoBoot + '/bin/nandwrite -p /dev/mtd2 %sImagesUpload/.kernel/%s.vmlinux.gz' % (getNeoLocation(), getBoxHostName()) - rc = os.system(cmd) - self.session.open(TryQuitMainloop, 2) - + cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT_REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') + cmd1 = 'flash_eraseall /dev/mtd2; sleep 2; ' + LinkNeoBoot + '/bin/nandwrite -p /dev/mtd2 %sImagesUpload/.kernel/%s.vmlinux.gz; reboot -d -f' % (getNeoLocation(), getBoxHostName()) + elif fileExists('%sImageBoot/%s/boot/%s.vmlinux.gz' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())): 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' diff --git a/NeoBoot/tmpfiles/runpy/zero4k_run.py b/NeoBoot/tmpfiles/runpy/zero4k_run.py index 3b99dce..8b0698a 100644 --- a/NeoBoot/tmpfiles/runpy/zero4k_run.py +++ b/NeoBoot/tmpfiles/runpy/zero4k_run.py @@ -127,27 +127,24 @@ class StartImage(Screen): cmd1 = 'cd /media/InternalFlash; ln -sf "init.sysvinit" "/media/InternalFlash/sbin/init"; /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/kernel.sh ' elif not fileExists('/.multinfo'): - cmd = 'ln -sf "init.sysvinit" "/sbin/init"' - rc = os.system(cmd) - self.session.open(TryQuitMainloop, 2) + cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') + cmd1 = 'sleep 5; ln -sf "init.sysvinit" "/sbin/init"; reboot -d -f' elif getImageNeoBoot() != 'Flash': if not fileExists('/.multinfo'): if not fileExists('%sImageBoot/%s/boot/zImage.%s' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())): - cmd = 'ln -sfn /sbin/neoinitarm /sbin/init' - rc = os.system(cmd) - self.session.open(TryQuitMainloop, 2) - + cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') + cmd1 = 'sleep 5; ln -sfn /sbin/neoinitarm /sbin/init; reboot -d -f' + elif fileExists('%sImageBoot/%s/boot/zImage.%s' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())): cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') cmd1 = 'ln -sfn /sbin/neoinitarmvu /sbin/init; /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/kernel.sh ' elif fileExists('/.multinfo'): if not fileExists('%sImageBoot/%s/boot/zImage.%s' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())): - cmd = 'dd if=' + getNeoLocation() + 'ImagesUpload/.kernel/flash-kernel-' + getBoxHostName() + '.bin of=/dev/mmcblk0p1; cd /media/InternalFlash; ln -sf "neoinitarm" "/media/InternalFlash/sbin/init"' - rc = os.system(cmd) - self.session.open(TryQuitMainloop, 2) - + cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') + cmd1 = 'dd if=' + getNeoLocation() + 'ImagesUpload/.kernel/flash-kernel-' + getBoxHostName() + '.bin of=/dev/mmcblk0p1; cd /media/InternalFlash; ln -sf "neoinitarm" "/media/InternalFlash/sbin/init" ; sleep 2; reboot -dfhi ' + elif fileExists('%sImageBoot/%s/boot/zImage.%s' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())): cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') cmd1 = 'cd /media/InternalFlash; ln -sf "neoinitarmvu" "/media/InternalFlash/sbin/init"; /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/kernel.sh '