mirror of
https://github.com/gutosie/neoboot.git
synced 2025-11-02 04:15:47 +01:00
Add files via upload
This commit is contained in:
@@ -167,7 +167,7 @@ class ManagerDevice(Screen):
|
||||
d2 = device
|
||||
name = _('HARD DISK: ')
|
||||
mypixmap = '' + LinkNeoBoot + '/images/dev_hdd.png'
|
||||
model = file('/sys/block/' + device2 + '/device/model').read()
|
||||
model = open('/sys/block/' + device2 + '/device/model').read()
|
||||
model = str(model).replace('\n', '')
|
||||
des = ''
|
||||
if devicetype.find('usb') != -1:
|
||||
@@ -292,11 +292,11 @@ class ManagerDevice(Screen):
|
||||
self.device_uuid = 'UUID=' + result.split('UUID=')[1].split(' ')[0].replace('"', '')
|
||||
if not path.exists(self.mountp):
|
||||
mkdir(self.mountp, 493)
|
||||
file('/etc/fstab.tmp', 'w').writelines([l for l in file('/etc/fstab').readlines() if '/media/hdd' not in l])
|
||||
open('/etc/fstab.tmp', 'w').writelines([l for l in open('/etc/fstab').readlines() if '/media/hdd' not in l])
|
||||
rename('/etc/fstab.tmp', '/etc/fstab')
|
||||
file('/etc/fstab.tmp', 'w').writelines([l for l in file('/etc/fstab').readlines() if self.device not in l])
|
||||
open('/etc/fstab.tmp', 'w').writelines([l for l in open('/etc/fstab').readlines() if self.device not in l])
|
||||
rename('/etc/fstab.tmp', '/etc/fstab')
|
||||
file('/etc/fstab.tmp', 'w').writelines([l for l in file('/etc/fstab').readlines() if self.device_uuid not in l])
|
||||
open('/etc/fstab.tmp', 'w').writelines([l for l in open('/etc/fstab').readlines() if self.device_uuid not in l])
|
||||
rename('/etc/fstab.tmp', '/etc/fstab')
|
||||
out = open('/etc/fstab', 'a')
|
||||
line = self.device_uuid + '\t/media/hdd\tauto\tdefaults\t0 0\n'
|
||||
@@ -382,7 +382,7 @@ class DevicesConf(Screen, ConfigListScreen):
|
||||
d2 = device
|
||||
name = _('HARD DISK: ')
|
||||
mypixmap = '' + LinkNeoBoot + '/images/dev_hdd.png'
|
||||
model = file('/sys/block/' + device2 + '/device/model').read()
|
||||
model = open('/sys/block/' + device2 + '/device/model').read()
|
||||
model = str(model).replace('\n', '')
|
||||
des = ''
|
||||
if devicetype.find('usb') != -1:
|
||||
@@ -492,9 +492,9 @@ class DevicesConf(Screen, ConfigListScreen):
|
||||
self.device_type = 'ntfs'
|
||||
if not path.exists(self.mountp):
|
||||
mkdir(self.mountp, 493)
|
||||
file('/etc/fstab.tmp', 'w').writelines([l for l in file('/etc/fstab').readlines() if self.device not in l])
|
||||
open('/etc/fstab.tmp', 'w').writelines([l for l in open('/etc/fstab').readlines() if self.device not in l])
|
||||
rename('/etc/fstab.tmp', '/etc/fstab')
|
||||
file('/etc/fstab.tmp', 'w').writelines([l for l in file('/etc/fstab').readlines() if self.device_uuid not in l])
|
||||
open('/etc/fstab.tmp', 'w').writelines([l for l in open('/etc/fstab').readlines() if self.device_uuid not in l])
|
||||
rename('/etc/fstab.tmp', '/etc/fstab')
|
||||
out = open('/etc/fstab', 'a')
|
||||
line = self.device_uuid + '\t' + self.mountp + '\t' + self.device_type + '\tdefaults\t0 0\n'
|
||||
|
||||
Reference in New Issue
Block a user