diff --git a/NeoBoot/ex_init.py b/NeoBoot/ex_init.py index 9fce9a4..eef0d51 100644 --- a/NeoBoot/ex_init.py +++ b/NeoBoot/ex_init.py @@ -1,6 +1,6 @@ import sys, extract -if len(sys.argv) < 15: +if len(sys.argv) < 13: pass else: - extract.NEOBootMainEx(sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4], sys.argv[5], sys.argv[6], sys.argv[7], sys.argv[8], sys.argv[9], sys.argv[10], sys.argv[11], sys.argv[12], sys.argv[13], sys.argv[14], sys.argv[15]) \ No newline at end of file + extract.NEOBootMainEx(sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4], sys.argv[5], sys.argv[6], sys.argv[7], sys.argv[8], sys.argv[9], sys.argv[10], sys.argv[11], sys.argv[12], sys.argv[13]) \ No newline at end of file diff --git a/NeoBoot/extract.py b/NeoBoot/extract.py index 49e80f0..d4286a2 100644 --- a/NeoBoot/extract.py +++ b/NeoBoot/extract.py @@ -71,7 +71,7 @@ mediahome = media + '/ImageBoot/' extensions_path = '/usr/lib/enigma2/python/Plugins/Extensions/' dev_null = ' > /dev/null 2>&1' -def NEOBootMainEx(source, target, stopenigma, CopyFiles, CopyKernel, TvList, Montowanie, LanWlan, Sterowniki, InstallSettings, ZipDelete, RepairFTP, SoftCam, MediaPortal, BlackHole): +def NEOBootMainEx(source, target, stopenigma, CopyFiles, CopyKernel, TvList, Sterowniki, InstallSettings, ZipDelete, RepairFTP, SoftCam, MediaPortal, BlackHole): media_target = mediahome + target list_one = ['rm -r ' + media_target + dev_null, 'mkdir ' + media_target + dev_null, 'chmod -R 0777 ' + media_target] for command in list_one: @@ -222,41 +222,7 @@ def NEOBootMainEx(source, target, stopenigma, CopyFiles, CopyKernel, TvList, Mon rc = os.system(cmd) os.system('echo "Skopiowano wtyczki."') - - if not os.path.exists('%s/ImageBoot/%s/etc/enigma2' % (media, target)): - cmd = 'mkdir -p %s/ImageBoot/%s/etc/enigma2' % (media, target) - rc = os.system(cmd) - cmd = 'touch %s/ImageBoot/%s/etc/enigma2/settings' % (media, target) - rc = os.system(cmd) - cmd = 'grep "config.Nims" /etc/enigma2/settings >> %s/ImageBoot/%s/etc/enigma2/settings' % (media, target) - rc = os.system(cmd) - cmd = 'grep "config.OpenWebif" /etc/enigma2/settings >> %s/ImageBoot/%s/etc/enigma2/settings' % (media, target) - rc = os.system(cmd) - cmd = 'grep "config.osd" /etc/enigma2/settings >> %s/ImageBoot/%s/etc/enigma2/settings' % (media, target) - rc = os.system(cmd) - cmd = 'grep "config.timezone" /etc/enigma2/settings >> %s/ImageBoot/%s/etc/enigma2/settings' % (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 TvList == 'True': - if not os.path.exists('%s/ImageBoot/%s/etc/enigma2' % (media, target)): - cmd = 'mkdir -p %s/ImageBoot/%s/etc/enigma2' % (media, target) - rc = os.system(cmd) - cmd = 'cp /etc/enigma2/*.tv %s/ImageBoot/%s/etc/enigma2' % (media, target) - rc = os.system(cmd) - cmd = 'cp /etc/enigma2/*.radio %s/ImageBoot/%s/etc/enigma2' % (media, target) - rc = os.system(cmd) - cmd = 'cp /etc/enigma2/*.tv %s/ImageBoot/%s/etc/enigma2' % (media, target) - rc = os.system(cmd) - cmd = 'cp /etc/enigma2/lamedb %s/ImageBoot/%s/etc/enigma2' % (media, target) - rc = os.system(cmd) - os.system('echo "Skopiowano list\xc4\x99 tv."') - - if Montowanie == 'True': - cmd = 'grep "UUID=" /etc/fstab >> %s/ImageBoot/%s/etc/fstab' % (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) if os.path.exists(filename): filename2 = filename + '.tmp' @@ -278,37 +244,27 @@ def NEOBootMainEx(source, target, stopenigma, CopyFiles, CopyKernel, TvList, Mon 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)): + 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 LanWlan == 'True': - if os.path.exists('%s/ImageBoot/%s/etc/vtiversion.info' % (media, target)): - os.system('echo "Nie skopiowano LAN-WLAN, nie zalecane dla tego image."') - elif os.path.exists('/etc/vtiversion.info') and os.path.exists('%s/usr/lib/enigma2/python/Plugins/PLi' % (media, target)): - os.system('echo "Nie skopiowano LAN-WLAN, nie zalecane dla tego image."') - elif os.path.exists('/etc/bhversion') and os.path.exists('%s/usr/lib/enigma2/python/Plugins/PLi' % (media, target)): - os.system('echo "Nie skopiowano LAN-WLAN, nie zalecane dla tego image."') - else: - if os.path.exists('/etc/wpa_supplicant.wlan0.conf'): - cmd = 'cp -Rpf /etc/wpa_supplicant.wlan0.conf %s/ImageBoot/%s/etc/wpa_supplicant.wlan0.conf > /dev/null 2>&1' % (media, target) - rc = os.system(cmd) - if os.path.exists('/etc/network/interfaces'): - cmd = 'cp -r /etc/network/interfaces %s/ImageBoot/%s/etc/network/interfaces > /dev/null 2>&1' % (media, target) - rc = os.system(cmd) - if os.path.exists('/etc/wpa_supplicant.conf'): - cmd = 'cp -Rpf /etc/wpa_supplicant.conf %s/ImageBoot/%s/etc/wpa_supplicant.conf > /dev/null 2>&1' % (media, target) - rc = os.system(cmd) - if os.path.exists('/etc/resolv.conf'): - cmd = 'cp -Rpf /etc/resolv.conf %s/ImageBoot/%s/etc/resolv.conf > /dev/null 2>&1' % (media, target) - rc = os.system(cmd) - if os.path.exists('/etc/wl.conf.wlan3'): - cmd = 'cp -r /etc/wl.conf.wlan3 %s/ImageBoot/%s/etc/wl.conf.wlan3 > /dev/null 2>&1' % (media, target) - rc = os.system(cmd) + + if TvList == 'True': + if not os.path.exists('%s/ImageBoot/%s/etc/enigma2' % (media, target)): + cmd = 'mkdir -p %s/ImageBoot/%s/etc/enigma2' % (media, target) + rc = os.system(cmd) + cmd = 'cp /etc/enigma2/*.tv %s/ImageBoot/%s/etc/enigma2' % (media, target) + rc = os.system(cmd) + cmd = 'cp /etc/enigma2/*.radio %s/ImageBoot/%s/etc/enigma2' % (media, target) + rc = os.system(cmd) + cmd = 'cp /etc/enigma2/*.tv %s/ImageBoot/%s/etc/enigma2' % (media, target) + rc = os.system(cmd) + cmd = 'cp /etc/enigma2/lamedb %s/ImageBoot/%s/etc/enigma2' % (media, target) + rc = os.system(cmd) + os.system('echo "Skopiowano list\xc4\x99 tv."') if Sterowniki == 'True': if os.path.exists('%s/ImageBoot/%s/lib/modules' % (media, target)): @@ -412,7 +368,7 @@ def NEOBootMainEx(source, target, stopenigma, CopyFiles, CopyKernel, TvList, Mon # 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)): + 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' @@ -434,6 +390,24 @@ def NEOBootMainEx(source, target, stopenigma, CopyFiles, CopyKernel, TvList, Mon 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)): + cmd = 'mkdir -p %s/ImageBoot/%s/etc/enigma2' % (media, target) + rc = os.system(cmd) + cmd = 'touch %s/ImageBoot/%s/etc/enigma2/settings' % (media, target) + rc = os.system(cmd) + cmd = 'grep "config.Nims" /etc/enigma2/settings >> %s/ImageBoot/%s/etc/enigma2/settings' % (media, target) + rc = os.system(cmd) + cmd = 'grep "config.OpenWebif" /etc/enigma2/settings >> %s/ImageBoot/%s/etc/enigma2/settings' % (media, target) + rc = os.system(cmd) + cmd = 'grep "config.osd" /etc/enigma2/settings >> %s/ImageBoot/%s/etc/enigma2/settings' % (media, target) + rc = os.system(cmd) + cmd = 'grep "config.timezone" /etc/enigma2/settings >> %s/ImageBoot/%s/etc/enigma2/settings' % (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 = 'grep "UUID=" /etc/fstab >> %s/ImageBoot/%s/etc/fstab' % (media, target) + rc = os.system(cmd) + namefile = media + '/ImageBoot/' + target + '/etc/fstab' namefile2 = namefile + '.tmp' if os.path.exists(namefile2): @@ -1095,6 +1069,16 @@ def NEOBootExtract(source, target, ZipDelete, BlackHole): if os.path.exists('' + getNeoLocation() + 'ImagesUpload/xp1000'): os.chdir('xp1000') + if os.path.exists('' + getNeoLocation() + 'ImagesUpload/formuler1'): + os.chdir('formuler1') + if os.path.exists('' + getNeoLocation() + 'ImagesUpload/formuler2'): + os.chdir('formuler2') + if os.path.exists('' + getNeoLocation() + 'ImagesUpload/formuler3'): + os.chdir('formuler3') + if os.path.exists('' + getNeoLocation() + 'ImagesUpload/formuler4turbo'): + os.chdir('formuler4turbo') + + #Instalacja image ubi_reader os.system('echo "Instalacja - ubi_reader w toku..."') if os.path.exists('' + getNeoLocation() + 'ImagesUpload/vuplus/root_cfe_auto.*'): diff --git a/NeoBoot/plugin.py b/NeoBoot/plugin.py index fd85c6e..0312331 100644 --- a/NeoBoot/plugin.py +++ b/NeoBoot/plugin.py @@ -48,7 +48,7 @@ LinkNeoBoot = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot' # save this copyright notice. This document/program is distributed WITHOUT any # warranty, use at YOUR own risk. -PLUGINVERSION = '8.00' +PLUGINVERSION = '8.01' UPDATEVERSION = '8.17' def Freespace(dev): diff --git a/NeoBoot/unpack.py b/NeoBoot/unpack.py index a635ccb..adb8a92 100644 --- a/NeoBoot/unpack.py +++ b/NeoBoot/unpack.py @@ -92,8 +92,6 @@ class InstallImage(Screen, ConfigListScreen): self.CopyFiles = ConfigYesNo(default=True) self.CopyKernel = ConfigYesNo(default=True) self.TvList = ConfigYesNo(default=False) - self.Montowanie = ConfigYesNo(default=True) - self.LanWlan = ConfigYesNo(default=False) self.Sterowniki = ConfigYesNo(default=False) self.InstallSettings = ConfigYesNo(default=False) self.ZipDelete = ConfigYesNo(default=False) @@ -136,8 +134,6 @@ class InstallImage(Screen, ConfigListScreen): self.list.append(getConfigListEntry(_('Copy files from Flash to the installed image ?'), self.CopyFiles )) self.list.append(getConfigListEntry(_('Copy the kernel of the installed system (recommended ?'), self.CopyKernel )) self.list.append(getConfigListEntry(_('Copy the channel list ?'), self.TvList)) - self.list.append(getConfigListEntry(_('Copy mounting disks ? (Recommended)'), self.Montowanie)) - self.list.append(getConfigListEntry(_('Copy network settings LAN-WLAN ?'), self.LanWlan)) self.list.append(getConfigListEntry(_('Copy the drivers ? (Recommended only other image.)'), self.Sterowniki)) self.list.append(getConfigListEntry(_('Copy Settings to the new Image'), self.InstallSettings)) self.list.append(getConfigListEntry(_('Delete Image zip after Install ?'), self.ZipDelete)) @@ -210,15 +206,13 @@ class InstallImage(Screen, ConfigListScreen): message += _('Please, wait...\n') message += "'" cmd1 = 'python ' + pluginpath + '/ex_init.py' - cmd = '%s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s' % (cmd1, + cmd = '%s %s %s %s %s %s %s %s %s %s %s %s %s %s ' % (cmd1, source, target.replace(' ', '.'), str(self.stopenigma.value), str(self.CopyFiles.value), str(self.CopyKernel.value), str(self.TvList.value), - str(self.Montowanie.value), - str(self.LanWlan.value), str(self.Sterowniki.value), str(self.InstallSettings.value), str(self.ZipDelete.value),