mirror of
https://github.com/gutosie/neoboot.git
synced 2025-11-02 04:15:47 +01:00
Update tools.py
This commit is contained in:
@@ -2091,6 +2091,7 @@ class BootManagers(Screen):
|
|||||||
'green': self.CreateBootManagers})
|
'green': self.CreateBootManagers})
|
||||||
|
|
||||||
def CreateBootManagers(self):
|
def CreateBootManagers(self):
|
||||||
|
if not fileExists('/.multinfo'):
|
||||||
cmd0 = "echo -e '\n\n%s '" % _('Creation Boot Manager , please wait...')
|
cmd0 = "echo -e '\n\n%s '" % _('Creation Boot Manager , please wait...')
|
||||||
if getBoxHostName() == "et5x00":
|
if getBoxHostName() == "et5x00":
|
||||||
cmd1 = 'cp -af ' + LinkNeoBoot + '/bin/neoinitmips /sbin/neoinitmips'
|
cmd1 = 'cp -af ' + LinkNeoBoot + '/bin/neoinitmips /sbin/neoinitmips'
|
||||||
@@ -2101,8 +2102,11 @@ class BootManagers(Screen):
|
|||||||
cmd1,
|
cmd1,
|
||||||
cmd2])
|
cmd2])
|
||||||
self.close()
|
self.close()
|
||||||
|
else:
|
||||||
|
self.myClose(_('Sorry, Neoboot can be installed or upgraded only when booted from Flash'))
|
||||||
|
|
||||||
def RemoveBootManagers(self):
|
def RemoveBootManagers(self):
|
||||||
|
if not fileExists('/.multinfo'):
|
||||||
cmd0 = "echo -e '\n\n%s '" % _('Creation Boot Manager , please wait...')
|
cmd0 = "echo -e '\n\n%s '" % _('Creation Boot Manager , please wait...')
|
||||||
if getBoxHostName() == "et5x00":
|
if getBoxHostName() == "et5x00":
|
||||||
cmd1 = 'cp -af ' + LinkNeoBoot + '/bin/neoinitmipsvu /sbin/neoinitmips'
|
cmd1 = 'cp -af ' + LinkNeoBoot + '/bin/neoinitmipsvu /sbin/neoinitmips'
|
||||||
@@ -2113,6 +2117,8 @@ class BootManagers(Screen):
|
|||||||
cmd1,
|
cmd1,
|
||||||
cmd2])
|
cmd2])
|
||||||
self.close()
|
self.close()
|
||||||
|
else:
|
||||||
|
self.myClose(_('Sorry, Neoboot can be installed or upgraded only when booted from Flash'))
|
||||||
|
|
||||||
def myClose(self, message):
|
def myClose(self, message):
|
||||||
self.session.open(MessageBox, message, MessageBox.TYPE_INFO)
|
self.session.open(MessageBox, message, MessageBox.TYPE_INFO)
|
||||||
|
|||||||
Reference in New Issue
Block a user