8.15 fix mount

English and Polish translation added
This commit is contained in:
gutosie
2020-01-18 20:29:00 +02:00
committed by GitHub
parent b419acea57
commit 3d11036f5c

View File

@@ -3,17 +3,16 @@
# ver. gutosie # ver. gutosie
import time, sys, os, struct, shutil import time, sys, os, struct, shutil
def getFSTAB2(): def LanguageUsed():
install='UNKNOWN' language = ''
if os.path.exists('/etc/fstab'): lang = open('/etc/enigma2/settings', 'r')
with open('/etc/fstab', 'r') as f: usedlang = 'config.osd.language=pl_PL'
lines = f.read() bak = lang.read().find(usedlang)
f.close() if bak != -1:
if lines.find('UUID') != -1: language = 'Yes'
install='OKinstall' else:
elif not lines.find('UUID') != -1: language = 'No'
install='NOinstall' return language
return install
def getBoxHostName(): def getBoxHostName():
if os.path.exists('/etc/hostname'): if os.path.exists('/etc/hostname'):
@@ -238,6 +237,9 @@ def NEOBootMainEx(source, target, stopenigma, CopyFiles, CopyKernel, TvList, Mon
cmd = 'grep "config.timezone" /etc/enigma2/settings >> %s/ImageBoot/%s/etc/enigma2/settings' % (media, target) cmd = 'grep "config.timezone" /etc/enigma2/settings >> %s/ImageBoot/%s/etc/enigma2/settings' % (media, target)
rc = os.system(cmd) 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 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)
@@ -267,8 +269,6 @@ def NEOBootMainEx(source, target, stopenigma, CopyFiles, CopyKernel, TvList, Mon
rc = os.system(cmd) rc = os.system(cmd)
cmd = 'cp -r /etc/fstab %s/ImageBoot/%s/etc/fstab' % (media, target) cmd = 'cp -r /etc/fstab %s/ImageBoot/%s/etc/fstab' % (media, target)
rc = os.system(cmd) 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)): if os.path.exists('%s/ImageBoot/%s/etc/init.d/udev' % (media, target)):
filename = '%s/ImageBoot/%s/etc/init.d/udev' % (media, target) filename = '%s/ImageBoot/%s/etc/init.d/udev' % (media, target)
@@ -632,11 +632,11 @@ def NEOBootMainEx(source, target, stopenigma, CopyFiles, CopyKernel, TvList, Mon
os.system('rm -r ' + getNeoLocation() + '/ImageBoot/%s' % target ) os.system('rm -r ' + getNeoLocation() + '/ImageBoot/%s' % target )
if os.path.exists('' + getNeoLocation() + 'ubi'): if os.path.exists('' + getNeoLocation() + 'ubi'):
os.system('rm -rf ' + getNeoLocation() + 'ubi') os.system('rm -r ' + getNeoLocation() + 'ubi')
if os.path.exists('' + getNeoLocation() + 'image_cache/'): if os.path.exists('' + getNeoLocation() + 'image_cache/'):
os.system('rm ' + getNeoLocation() + 'image_cache') os.system('rm -r' + getNeoLocation() + 'image_cache')
if os.path.exists('' + getNeoLocation() + 'ImageBoot/.without_copying'): if os.path.exists('' + getNeoLocation() + 'ImageBoot/.without_copying'):
os.system('rm ' + getNeoLocation() + 'ImageBoot/.without_copying') os.system('rm -r' + getNeoLocation() + 'ImageBoot/.without_copying')
rc = RemoveUnpackDirs() rc = RemoveUnpackDirs()
if os.path.exists('/tmp/init4'): if os.path.exists('/tmp/init4'):