mirror of
https://github.com/gutosie/neoboot.git
synced 2025-11-02 20:25:47 +01:00
Update tools.py
This commit is contained in:
@@ -2143,6 +2143,10 @@ class DiskLabelSet(Screen):
|
|||||||
'red': self.SetLabelDisk})
|
'red': self.SetLabelDisk})
|
||||||
|
|
||||||
def SetLabelDisk(self):
|
def SetLabelDisk(self):
|
||||||
|
if os.path.exists('/media/hdd/ImageBoot'):
|
||||||
|
locatin_neo = '/media/hdd'
|
||||||
|
elif os.path.exists('/media/usb/ImageBoot'):
|
||||||
|
locatin_neo = '/media/usb'
|
||||||
if os.path.exists('/proc/mounts'):
|
if os.path.exists('/proc/mounts'):
|
||||||
with open('/proc/mounts', 'r') as f:
|
with open('/proc/mounts', 'r') as f:
|
||||||
lines = f.read()
|
lines = f.read()
|
||||||
@@ -2182,8 +2186,9 @@ class DiskLabelSet(Screen):
|
|||||||
if lines.find('/dev/sdf1 /media/usb') != -1:
|
if lines.find('/dev/sdf1 /media/usb') != -1:
|
||||||
os.system('tune2fs -L usb /dev/sdf1')
|
os.system('tune2fs -L usb /dev/sdf1')
|
||||||
cmd2 = "echo -e '\n\n%s '" % _('Label set OK')
|
cmd2 = "echo -e '\n\n%s '" % _('Label set OK')
|
||||||
self.session.open(Console, _('Disk Label...!'), [cmd, cmd1, cmd2])
|
os.system('echo UUID=' + getMyUUID() + ' ' + locatin_neo + ' auto defaults 0 0 >> /etc/fstab')
|
||||||
self.close()
|
cmd3 = "echo -e '\n\n%s '" % _('UUID set OK')
|
||||||
|
self.session.open(Console, _('Disk Label...!'), [cmd, cmd1, cmd2,cmd3])
|
||||||
|
|
||||||
|
|
||||||
class MultiBootMyHelp(Screen):
|
class MultiBootMyHelp(Screen):
|
||||||
|
|||||||
Reference in New Issue
Block a user