mirror of
https://mojerepo.cf/NeoBoot/NeoBoot-9.git
synced 2025-12-21 07:19:40 +01:00
fix. 8.23 update
This commit is contained in:
@@ -222,36 +222,6 @@ def NEOBootMainEx(source, target, stopenigma, CopyFiles, CopyKernel, TvList, Ste
|
|||||||
rc = os.system(cmd)
|
rc = os.system(cmd)
|
||||||
os.system('echo "Copied plugins..."')
|
os.system('echo "Copied plugins..."')
|
||||||
|
|
||||||
if os.path.exists('%s/ImageBoot/%s/etc/init.d/udev' % (media, target)):
|
|
||||||
filename = '%s/ImageBoot/%s/etc/init.d/udev' % (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 "mount -a /media/hdd; mount -a /media/usb" >> %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)
|
|
||||||
cmd = 'chmod 0755 %s/ImageBoot/%s/etc/init.d/udev' % (media, target)
|
|
||||||
rc = os.system(cmd)
|
|
||||||
|
|
||||||
# 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 "mount -a /media/hdd; mount -a /media/usb" >> %s/ImageBoot/%s/etc/init.d/mdev' % (media, target)
|
|
||||||
# rc = os.system(cmd)
|
|
||||||
# cmd = 'chmod 0755 %s/ImageBoot/%s/etc/init.d/mdev' % (media, target)
|
|
||||||
# rc = os.system(cmd)
|
|
||||||
|
|
||||||
if TvList == 'True':
|
if TvList == 'True':
|
||||||
if not os.path.exists('%s/ImageBoot/%s/etc/enigma2' % (media, target)):
|
if not os.path.exists('%s/ImageBoot/%s/etc/enigma2' % (media, target)):
|
||||||
cmd = 'mkdir -p %s/ImageBoot/%s/etc/enigma2' % (media, target)
|
cmd = 'mkdir -p %s/ImageBoot/%s/etc/enigma2' % (media, target)
|
||||||
@@ -363,28 +333,6 @@ def NEOBootMainEx(source, target, stopenigma, CopyFiles, CopyKernel, TvList, Ste
|
|||||||
|
|
||||||
# for all image:
|
# for all image:
|
||||||
if not os.path.exists('' + getNeoLocation() + 'ImageBoot/.without_copying'):
|
if not os.path.exists('' + getNeoLocation() + 'ImageBoot/.without_copying'):
|
||||||
if os.path.exists('%s/ImageBoot/%s/etc/init.d' % (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)
|
|
||||||
cmd = 'chmod 755 %s/ImageBoot/%s/etc/init.d/bootmisc.sh' % (media, target)
|
|
||||||
rc = os.system(cmd)
|
|
||||||
|
|
||||||
if not os.path.exists('%s/ImageBoot/%s/etc/enigma2' % (media, target)):
|
if not os.path.exists('%s/ImageBoot/%s/etc/enigma2' % (media, target)):
|
||||||
cmd = 'mkdir -p %s/ImageBoot/%s/etc/enigma2' % (media, target)
|
cmd = 'mkdir -p %s/ImageBoot/%s/etc/enigma2' % (media, target)
|
||||||
rc = os.system(cmd)
|
rc = os.system(cmd)
|
||||||
@@ -405,13 +353,13 @@ def NEOBootMainEx(source, target, stopenigma, CopyFiles, CopyKernel, TvList, Ste
|
|||||||
cmd = 'grep "UUID=" /etc/fstab >> %s/ImageBoot/%s/etc/fstab' % (media, target)
|
cmd = 'grep "UUID=" /etc/fstab >> %s/ImageBoot/%s/etc/fstab' % (media, target)
|
||||||
rc = os.system(cmd)
|
rc = os.system(cmd)
|
||||||
|
|
||||||
|
if getCPUSoC() != '7444s' or getCPUSoC() != '7278' or getCPUSoC() != '7376' or getCPUSoC() != '7252s' or getCPUSoC() != '72604':
|
||||||
namefile = media + '/ImageBoot/' + target + '/etc/fstab'
|
namefile = media + '/ImageBoot/' + target + '/etc/fstab'
|
||||||
namefile2 = namefile + '.tmp'
|
namefile2 = namefile + '.tmp'
|
||||||
if os.path.exists(namefile2):
|
if os.path.exists(namefile2):
|
||||||
out = open(namefile2, 'w')
|
out = open(namefile2, 'w')
|
||||||
f = open(namefile, 'r')
|
f = open(namefile, 'r')
|
||||||
for line in f.readlines():
|
for line in f.readlines():
|
||||||
|
|
||||||
if line.find('/dev/mmcblk0p1') != -1:
|
if line.find('/dev/mmcblk0p1') != -1:
|
||||||
line = '#' + line
|
line = '#' + line
|
||||||
elif line.find('/dev/mmcblk0p2') != -1:
|
elif line.find('/dev/mmcblk0p2') != -1:
|
||||||
@@ -476,7 +424,6 @@ def NEOBootMainEx(source, target, stopenigma, CopyFiles, CopyKernel, TvList, Ste
|
|||||||
out.close()
|
out.close()
|
||||||
os.rename(fname2, fname)
|
os.rename(fname2, fname)
|
||||||
|
|
||||||
|
|
||||||
targetfile = media + '/ImageBoot/' + target + '/etc/vsftpd.conf'
|
targetfile = media + '/ImageBoot/' + target + '/etc/vsftpd.conf'
|
||||||
if os.path.exists(targetfile):
|
if os.path.exists(targetfile):
|
||||||
targetfile2 = targetfile + '.tmp'
|
targetfile2 = targetfile + '.tmp'
|
||||||
@@ -490,7 +437,6 @@ def NEOBootMainEx(source, target, stopenigma, CopyFiles, CopyKernel, TvList, Ste
|
|||||||
out.close()
|
out.close()
|
||||||
os.rename(targetfile2, targetfile)
|
os.rename(targetfile2, targetfile)
|
||||||
|
|
||||||
|
|
||||||
mypath = media + '/ImageBoot/' + target + '/usr/lib/opkg/info/'
|
mypath = media + '/ImageBoot/' + target + '/usr/lib/opkg/info/'
|
||||||
cmd = 'mkdir -p %s/ImageBoot/%s/var/lib/opkg/info > /dev/null 2>&1' % (media, target)
|
cmd = 'mkdir -p %s/ImageBoot/%s/var/lib/opkg/info > /dev/null 2>&1' % (media, target)
|
||||||
rc = os.system(cmd)
|
rc = os.system(cmd)
|
||||||
|
|||||||
Reference in New Issue
Block a user