summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--abs/core/LinHES-system/add_storage.py25
1 files changed, 15 insertions, 10 deletions
diff --git a/abs/core/LinHES-system/add_storage.py b/abs/core/LinHES-system/add_storage.py
index db0d9af..626640e 100644
--- a/abs/core/LinHES-system/add_storage.py
+++ b/abs/core/LinHES-system/add_storage.py
@@ -222,24 +222,29 @@ class disk_device:
return options,i
- def add_fstab(self):
+ def add_fstab(self,bind=False):
new_fstab_list=['UUID=', 'mount_point', 'auto', 'defaults', '0', '1']
fstab=self.read_fstab()
+
#determine mount_path
self.new_mount_point="%s/%s_%s" %(self.top_mount_dir,self.model.replace(' ',''),self.serial_number.replace(' ',''))
+ if bind:
+ new_fstab_list=["/myth" , self.new_mount_point , "none" , "rw,bind", '0', '0']
+ else:
#determine options
- new_options = self.find_options_type(fstab)[0]
- #find blkid
- #self.block_partition="%s1" %self.block_path
- uuid=self.find_uuid(self.block_partition)
+ new_options = self.find_options_type(fstab)[0]
+
+ #find blkid
+ #self.block_partition="%s1" %self.block_path
+ uuid=self.find_uuid(self.block_partition)
- #construct new line
- new_fstab_list[0]="UUID=%s" %uuid
- new_fstab_list[1]=self.new_mount_point
- new_fstab_list[3]=new_options
+ #construct new line
+ new_fstab_list[0]="UUID=%s" %uuid
+ new_fstab_list[1]=self.new_mount_point
+ new_fstab_list[3]=new_options
new_fstab_line='\t'.join(new_fstab_list)
new_fstab_line="%s\n" %new_fstab_line
@@ -545,7 +550,7 @@ def myth_main():
print " Drive: %s" %(i.get_name())
i.set_mmount(True)
i.set_partition("3")
- i.add_fstab()
+ i.add_fstab(True)
i.mount_disk()
i.write_config()
i.add_sg(DB,host,SG_MAP,'99')