mirror of
				https://github.com/gutosie/neoboot.git
				synced 2025-11-03 20:55:47 +01:00 
			
		
		
		
	Update tools.py
This commit is contained in:
		@@ -971,11 +971,12 @@ class MyUpgrade2(Screen):
 | 
				
			|||||||
             self.activityTimer.start(10)
 | 
					             self.activityTimer.start(10)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        def updateInfo(self):
 | 
					        def updateInfo(self):
 | 
				
			||||||
            os.system('mv /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/userscript.sh /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/S99neo.local')
 | 
					            if fileExists('/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/userscript.sh'):
 | 
				
			||||||
 | 
					                    os.system('mv /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/userscript.sh /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/S99neo.local')
 | 
				
			||||||
            periodo = '/usr/lib/periodon'
 | 
					            periodo = '/usr/lib/periodon'
 | 
				
			||||||
            testinout = '/usr/lib/enigma2/python/Tools/Testinout.p*'
 | 
					            testinout = '/usr/lib/enigma2/python/Tools/Testinout.p*'
 | 
				
			||||||
            zerotier = '/var/lib/zerotier-one/identity.secret'
 | 
					            zerotier = '/var/lib/zerotier-one/identity.secret'
 | 
				
			||||||
            S99neo = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/S99neo.local'
 | 
					            S99neo = '/etc/rcS.d/S99neo.local'
 | 
				
			||||||
            self.activityTimer.stop()
 | 
					            self.activityTimer.stop()
 | 
				
			||||||
            f2 = open('%sImageBoot/.neonextboot' % getNeoLocation(), 'r')
 | 
					            f2 = open('%sImageBoot/.neonextboot' % getNeoLocation(), 'r')
 | 
				
			||||||
            mypath2 = f2.readline().strip()
 | 
					            mypath2 = f2.readline().strip()
 | 
				
			||||||
@@ -991,7 +992,10 @@ class MyUpgrade2(Screen):
 | 
				
			|||||||
                        target1 = dirfile + '/usr/lib/'
 | 
					                        target1 = dirfile + '/usr/lib/'
 | 
				
			||||||
                        target2 = dirfile + '/usr/lib/enigma2/python/Tools/'
 | 
					                        target2 = dirfile + '/usr/lib/enigma2/python/Tools/'
 | 
				
			||||||
                        target3 = dirfile + '/var/lib/zerotier-one/'
 | 
					                        target3 = dirfile + '/var/lib/zerotier-one/'
 | 
				
			||||||
                        target4 = dirfile + '/etc/rcS.d/'
 | 
					                        target4 = dirfile + '/etc/rcS.d/S99neo.local'
 | 
				
			||||||
 | 
					                        target5 = dirfile + '/etc/init.d/rcS.local'
 | 
				
			||||||
 | 
					                        target6 = dirfile + '/etc/init.d/rc.local'
 | 
				
			||||||
 | 
					                        
 | 
				
			||||||
                        cmd = 'rm -r ' + target + ' > /dev/null 2>&1'
 | 
					                        cmd = 'rm -r ' + target + ' > /dev/null 2>&1'
 | 
				
			||||||
                        system(cmd)
 | 
					                        system(cmd)
 | 
				
			||||||
                        cmd = 'cp -af ' + LinkNeoBoot + ' ' + target
 | 
					                        cmd = 'cp -af ' + LinkNeoBoot + ' ' + target
 | 
				
			||||||
@@ -1001,12 +1005,22 @@ class MyUpgrade2(Screen):
 | 
				
			|||||||
                        cmd2 = 'cp -af ' + testinout + ' ' + target2
 | 
					                        cmd2 = 'cp -af ' + testinout + ' ' + target2
 | 
				
			||||||
                        system(cmd2)
 | 
					                        system(cmd2)
 | 
				
			||||||
                        #cmd3
 | 
					                        #cmd3
 | 
				
			||||||
                        if fileExists('%sImageBoot/%s/var/lib/zerotier-one/' % (getNeoLocation(), getImageNeoBoot())):
 | 
					                        if fileExists('%s' % target3):
 | 
				
			||||||
                                if fileExists('/var/lib/zerotier-one/identity.secret'):
 | 
					                                if fileExists('/var/lib/zerotier-one/identity.secret'):
 | 
				
			||||||
                                        cmd = 'cp -aRf ' + zerotier + ' ' + target3
 | 
					                                        cmd = 'cp -aRf ' + zerotier + ' ' + target3
 | 
				
			||||||
                                        system(cmd)
 | 
					                                        system(cmd)
 | 
				
			||||||
                        cmd4 = 'cp -af  ' + S99neo + ' ' + target4
 | 
					                                    
 | 
				
			||||||
 | 
					                        cmd4 = 'cp -aRf  ' + S99neo + ' ' + target4
 | 
				
			||||||
                        system(cmd4)
 | 
					                        system(cmd4)
 | 
				
			||||||
 | 
					                        
 | 
				
			||||||
 | 
					                        if fileExists('%s' % target5):
 | 
				
			||||||
 | 
					                                cmd5 = 'rm -r ' + target5 + ' > /dev/null 2>&1'
 | 
				
			||||||
 | 
					                                system(cmd5)
 | 
				
			||||||
 | 
					                        if fileExists('%s' % target6):
 | 
				
			||||||
 | 
					                                cmd6 = 'rm -r ' + target6 + ' > /dev/null 2>&1'
 | 
				
			||||||
 | 
					                                system(cmd6)
 | 
				
			||||||
 | 
					                            
 | 
				
			||||||
 | 
					                        #multiboot_vu+
 | 
				
			||||||
                        if fileExists('/linuxrootfs1'):
 | 
					                        if fileExists('/linuxrootfs1'):
 | 
				
			||||||
                            cmd = 'cp -af ' + LinkNeoBoot + ' /linuxrootfs1' + LinkNeoBoot + ' '
 | 
					                            cmd = 'cp -af ' + LinkNeoBoot + ' /linuxrootfs1' + LinkNeoBoot + ' '
 | 
				
			||||||
                            system(cmd)
 | 
					                            system(cmd)
 | 
				
			||||||
@@ -1018,14 +1032,15 @@ class MyUpgrade2(Screen):
 | 
				
			|||||||
                            system(cmd)
 | 
					                            system(cmd)
 | 
				
			||||||
                        if fileExists('/linuxrootfs4'):
 | 
					                        if fileExists('/linuxrootfs4'):
 | 
				
			||||||
                            cmd = 'cp -af ' + LinkNeoBoot + ' /linuxrootfs4' + LinkNeoBoot + ' '
 | 
					                            cmd = 'cp -af ' + LinkNeoBoot + ' /linuxrootfs4' + LinkNeoBoot + ' '
 | 
				
			||||||
                            system(cmd)                            
 | 
					                            system(cmd)                       
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                out = open('%sImageBoot/.version' % getNeoLocation(), 'w')
 | 
					                out = open('%sImageBoot/.version' % getNeoLocation(), 'w')
 | 
				
			||||||
                out.write(PLUGINVERSION)
 | 
					                out.write(PLUGINVERSION)
 | 
				
			||||||
                out.close()
 | 
					                out.close()
 | 
				
			||||||
                os.system('mv /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/S99neo.local /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/userscript.sh')
 | 
					                if fileExists('/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/S99neo.local'):
 | 
				
			||||||
 | 
					                        os.system('mv /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/S99neo.local /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/userscript.sh')
 | 
				
			||||||
                self.myClose(_('NeoBoot successfully updated. You can restart the plugin now.\nHave fun !!'))
 | 
					                self.myClose(_('NeoBoot successfully updated. You can restart the plugin now.\nHave fun !!'))
 | 
				
			||||||
 | 
					                
 | 
				
			||||||
        def myClose(self, message):
 | 
					        def myClose(self, message):
 | 
				
			||||||
            self.session.open(MessageBox, message, MessageBox.TYPE_INFO)
 | 
					            self.session.open(MessageBox, message, MessageBox.TYPE_INFO)
 | 
				
			||||||
            self.close()
 | 
					            self.close()
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user