From 5fa2c1d83401ddf73cbd388345d96b031754437d Mon Sep 17 00:00:00 2001 From: gutosie Date: Tue, 19 Feb 2019 17:36:43 +0100 Subject: [PATCH] 2.09 --- NeoBoot/files/devices.py | 7 ++++++- NeoBoot/files/stbbranding.py | 13 +++++++++++++ NeoBoot/files/tools.py | 4 ++-- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/NeoBoot/files/devices.py b/NeoBoot/files/devices.py index 0451787..f0db564 100644 --- a/NeoBoot/files/devices.py +++ b/NeoBoot/files/devices.py @@ -73,7 +73,6 @@ class ManagerDevice(Screen): except: name = '' desc = '' - else: name = '' desc = '' @@ -207,6 +206,10 @@ class ManagerDevice(Screen): self.updateList() def saveMypoints(self): + if fileExists('/etc/fstab.org'): + cmd = 'cp -f /etc/fstab.org /etc/fstab' + system(cmd) + sel = self['list'].getCurrent() if sel: parts = sel[1].split() @@ -335,6 +338,7 @@ class DevicesConf(Screen, ConfigListScreen): else: des = _('Size: ') + _('unavailable') item = NoSave(ConfigSelection(default='/media/' + device, choices=[('/media/' + device, '/media/' + device), + ('/media/neoboot', '/media/neoboot'), ('/media/hdd', '/media/hdd'), ('/media/hdd2', '/media/hdd2'), ('/media/hdd3', '/media/hdd3'), @@ -408,6 +412,7 @@ class DevicesConf(Screen, ConfigListScreen): out.close() system('cp -r -f /etc/fstab /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files') self.device_uuid2 = result.split('UUID=')[1].split(' ')[0].replace('"', '') + if fileExists('/usr/lib/enigma2/python/Plugins/SystemPlugins/DeviceManager2'): out1 = open('/etc/devicemanager.cfg', 'a') line1 = '"' + self.device_uuid2 + '"' + ':' + self.mountp + '\n' diff --git a/NeoBoot/files/stbbranding.py b/NeoBoot/files/stbbranding.py index a1cb36f..7b8e25f 100644 --- a/NeoBoot/files/stbbranding.py +++ b/NeoBoot/files/stbbranding.py @@ -53,6 +53,19 @@ def getCPUtype(): cpu='MIPS' return cpu +#check install +def getFSTAB(): + cpu='UNKNOWN' + if os.path.exists('/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/bin/install'): + with open('/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/bin/install', 'r') as f: + lines = f.read() + f.close() + if lines.find('UUID') != -1: + install='OKinstall' + elif not lines.find('UUID') != -1: + install='NOinstall' + return install + #zwraca typ chipa prcesora def getCPUSoC(): chipset='UNKNOWN' diff --git a/NeoBoot/files/tools.py b/NeoBoot/files/tools.py index a95d1d7..cad3f12 100644 --- a/NeoBoot/files/tools.py +++ b/NeoBoot/files/tools.py @@ -487,7 +487,6 @@ class UnistallMultiboot(Screen): cmd3 = 'ln -sfn /sbin/init.sysvinit /sbin/init' cmd4 = 'chmod 777 /sbin/init; sleep 2' cmd4a = "echo -e '\nNeoBoot restoring media mounts....'" - cmd5 = 'mv /etc/init.d/volatile-media.sh.org /etc/init.d/volatile-media.sh; sleep 2' cmd6 = 'rm /media/neoboot/ImageBoot/.neonextboot;rm /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location; sleep 2' cmd7 = 'rm /media/neoboot/ImageBoot/.Flash; rm /media/neoboot/ImageBoot/.version' cmd7a = "echo -e '\n\nOdinstalowywanie neoboota...'" @@ -503,7 +502,6 @@ class UnistallMultiboot(Screen): cmd3, cmd4, cmd4a, - cmd5, cmd6, cmd7, cmd7a, @@ -511,6 +509,8 @@ class UnistallMultiboot(Screen): cmd8a, cmd9, cmd9a]) + if fileExists('/etc/init.d/volatile-media.sh.org'): + system('mv /etc/init.d/volatile-media.sh.org /etc/init.d/volatile-media.sh; sleep 2 ') self.close()