From 16b1d64cd719b2152d1ec25710ac9dccd0df592d Mon Sep 17 00:00:00 2001 From: gutosie Date: Sat, 11 Jan 2020 19:27:16 +0200 Subject: [PATCH] 8.08 big update --- NeoBoot/extract.py | 38 +++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/NeoBoot/extract.py b/NeoBoot/extract.py index faaa06c..e725e20 100644 --- a/NeoBoot/extract.py +++ b/NeoBoot/extract.py @@ -246,10 +246,8 @@ def NEOBootMainEx(source, target, stopenigma, CopyFiles, CopyKernel, TvList, Mon rc = os.system(cmd) cmd = 'cp -r /etc/fstab %s/ImageBoot/%s/etc/fstab' % (media, target) rc = os.system(cmd) - cmd = 'cp -r /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/S50fat.sh %s/ImageBoot/%s/etc/rcS.d' % (media, target) - rc = os.system(cmd) - -########################################################### +# cmd = 'cp -r /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/S50fat.sh %s/ImageBoot/%s/etc/rcS.d' % (media, target) +# rc = os.system(cmd) if os.path.exists('%s/ImageBoot/%s/etc/init.d/udev' % (media, target)): filename = '%s/ImageBoot/%s/etc/init.d/udev' % (media, target) @@ -266,7 +264,7 @@ def NEOBootMainEx(source, target, stopenigma, CopyFiles, CopyKernel, TvList, Mon out.close() os.rename(filename2, filename) - cmd = 'echo "/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/neom" >> %s/ImageBoot/%s/etc/init.d/udev' % (media, target) + cmd = 'echo "mount -a" >> %s/ImageBoot/%s/etc/init.d/udev' % (media, target) rc = os.system(cmd) cmd = 'echo "exit 0" >> %s/ImageBoot/%s/etc/init.d/udev' % (media, target) rc = os.system(cmd) @@ -274,7 +272,7 @@ def NEOBootMainEx(source, target, stopenigma, CopyFiles, CopyKernel, TvList, Mon if os.path.exists('%s/ImageBoot/%s/etc/init.d/mdev'% (media, target)): cmd = 'echo " " >> %s/ImageBoot/%s/etc/init.d/mdev' % (media, target) rc = os.system(cmd) - cmd = 'echo "/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/neom" >> %s/ImageBoot/%s/etc/init.d/mdev' % (media, target) + cmd = 'echo "mount -a" >> %s/ImageBoot/%s/etc/init.d/mdev' % (media, target) rc = os.system(cmd) if LanWlan == 'True': @@ -401,15 +399,29 @@ def NEOBootMainEx(source, target, stopenigma, CopyFiles, CopyKernel, TvList, Mon elif not os.path.exists('/usr/lib/enigma2/python/Plugins/Extensions/MediaPortal'): os.system('echo "MediaPortal not found."') - if not os.path.exists('' + getNeoLocation() + 'ImageBoot/.without_copying'): - #if os.path.exists('' + getNeoLocation() + 'ImageBoot'): +# for all image: + if not os.path.exists('' + getNeoLocation() + 'ImageBoot/.without_copying'): + if os.path.exists('%s/ImageBoot/%s/etc/init.d/udev' % (media, target)): + filename = '%s/ImageBoot/%s/etc/init.d/bootmisc.sh' % (media, target) + if os.path.exists(filename): + filename2 = filename + '.tmp' + out = open(filename2, 'w') + f = open(filename, 'r') + for line in f.readlines(): + if line.find('exit 0') != -1: + line = '\n' + out.write(line) + + f.close() + out.close() + os.rename(filename2, filename) + + cmd = 'echo "/etc/init.d/networking stop; /etc/init.d/networking start;" >> %s/ImageBoot/%s/etc/init.d/bootmisc.sh' % (media, target) + rc = os.system(cmd) + cmd = 'echo "exit 0" >> %s/ImageBoot/%s/etc/init.d/bootmisc.sh' % (media, target) + rc = os.system(cmd) - -# if getFSTAB2() == 'OKinstall': - - # os.system(' echo ' + fstablines + ' >> %s/ImageBoot/%s/etc/fstab' % (media, target)) - namefile = media + '/ImageBoot/' + target + '/etc/fstab' namefile2 = namefile + '.tmp' if os.path.exists(namefile2):