diff --git a/NeoBoot/extract.py b/NeoBoot/extract.py index 12b244c..49e80f0 100644 --- a/NeoBoot/extract.py +++ b/NeoBoot/extract.py @@ -271,7 +271,7 @@ def NEOBootMainEx(source, target, stopenigma, CopyFiles, CopyKernel, TvList, Mon out.close() os.rename(filename2, filename) - cmd = 'echo "mount -a" >> %s/ImageBoot/%s/etc/init.d/udev' % (media, target) + cmd = 'echo "mount -a /media/hdd; mount -a /media/usb" >> %s/ImageBoot/%s/etc/init.d/udev' % (media, target) rc = os.system(cmd) cmd = 'echo "exit 0" >> %s/ImageBoot/%s/etc/init.d/udev' % (media, target) rc = os.system(cmd) @@ -281,7 +281,7 @@ def NEOBootMainEx(source, target, stopenigma, CopyFiles, CopyKernel, TvList, Mon 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" >> %s/ImageBoot/%s/etc/init.d/mdev' % (media, target) + 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) diff --git a/NeoBoot/plugin.py b/NeoBoot/plugin.py index b7a97fc..fd85c6e 100644 --- a/NeoBoot/plugin.py +++ b/NeoBoot/plugin.py @@ -265,14 +265,16 @@ class NeoBootInstallation(Screen): self['config'] = MenuList(self.list) self['key_red'] = Label(_('Instruction')) self['key_green'] = Label(_('Installation')) - self['key_yellow'] = Label(_('Info disc')) +# self['key_yellow'] = Label(_('Info disc')) + self['key_yellow'] = Label(_('Set Disk Label')) self['key_blue'] = Label(_('Device Manager')) self['label1'] = Label(_('Welcome to NeoBoot %s Plugin installation.') % PLUGINVERSION) self['label3'] = Label(_('WARNING !!! First, mount the device.')) self['label2'] = Label(_('Here is the list of mounted devices in Your STB\nPlease choose a device where You would like to install NeoBoot')) self['actions'] = ActionMap(['WizardActions', 'ColorActions', 'DirectionActions'], {'red': self.Instrukcja, 'green': self.install, - 'yellow': self.datadrive, +# 'yellow': self.datadrive, + 'yellow': self.SetDiskLabel, 'blue': self.devices, 'back': self.close}) self.updateList() @@ -280,6 +282,10 @@ class NeoBootInstallation(Screen): def Instrukcja(self): self.session.open(MyHelp) + def SetDiskLabel(self): + from Plugins.Extensions.NeoBoot.files.devices import SetDiskLabel + self.session.open(SetDiskLabel) + def datadrive(self): try: message = "echo -e '\n" @@ -384,9 +390,14 @@ class NeoBootInstallation(Screen): def install(self): if checkInternet(): + system('blkid -c /dev/null /dev/sd* > ' + LinkNeoBoot + '/bin/reading_blkid; chmod 755 ' + LinkNeoBoot + '/bin/reading_blkid ') if getFSTAB2() != 'OKinstall': self.session.open(MessageBox, _('NeoBot - First use the Device Manager and mount the drives correctly !!!'), MessageBox.TYPE_INFO, 8) self.close() + if getLabelDisck() != 'LABEL=': + self.session.open(MessageBox, _('NeoBot - First use yellow button and Set Disk Label !!!'), MessageBox.TYPE_INFO, 8) + self.close() + else: self.first_installation() else: @@ -429,9 +440,7 @@ class NeoBootInstallation(Screen): system(cmd2) if os.path.isfile('' + LinkNeoBoot + '/.location'): os.system('rm -f ' + LinkNeoBoot + '/.location' ) - - system('blkid -c /dev/null /dev/sd* > ' + LinkNeoBoot + '/bin/reading_blkid; chmod 755 ' + LinkNeoBoot + '/bin/reading_blkid ') - + out = open('/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location', 'w') out.write(self.mysel) out.close()