summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-system/add_storage.py
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2012-09-20 21:09:28 (GMT)
committerJames Meyer <james.meyer@operamail.com>2012-09-20 21:09:28 (GMT)
commit269509031d79a1e0b455fa2ad2daeb8477ddc470 (patch)
tree76000a0868e8085428f086dab3b7760b9e91b21a /abs/core/LinHES-system/add_storage.py
parent15f2d77dce9976b0ae864fdaef9c719c9983f2a0 (diff)
downloadlinhes_pkgbuild-269509031d79a1e0b455fa2ad2daeb8477ddc470.zip
linhes_pkgbuild-269509031d79a1e0b455fa2ad2daeb8477ddc470.tar.gz
linhes_pkgbuild-269509031d79a1e0b455fa2ad2daeb8477ddc470.tar.bz2
LinHES-system: set_windowmanager.sh add_storage.py
add_storage.py: fix xfs formats, also redo saving of system_drive_list. Previously it would write the full list before processing any drives, now it writes the known list one drive ata time store database values when calling set_windowmanger.sh manually.
Diffstat (limited to 'abs/core/LinHES-system/add_storage.py')
-rw-r--r--abs/core/LinHES-system/add_storage.py25
1 files changed, 20 insertions, 5 deletions
diff --git a/abs/core/LinHES-system/add_storage.py b/abs/core/LinHES-system/add_storage.py
index eec497f..93a67c7 100644
--- a/abs/core/LinHES-system/add_storage.py
+++ b/abs/core/LinHES-system/add_storage.py
@@ -196,7 +196,10 @@ class disk_device:
new_fstype = self.find_fstype(current_media_mount)
#do format
- cmd = "mkfs -t %s %s " %(new_fstype,self.block_partition)
+ if new_fstype == "xfs":
+ cmd = "mkfs -t %s -f %s " %(new_fstype,self.block_partition)
+ else:
+ cmd = "mkfs -t %s %s " %(new_fstype,self.block_partition)
print " Formating %s with %s" %(self.block_partition,new_fstype)
runcmd(cmd)
return
@@ -491,7 +494,7 @@ def main(scan_only, destruction, no_mount, install_call , dir_fe_only):
known_drive_list=[]
known_drive_list = read_known_list()
process_list=[]
-
+ no_process_list=[]
for i in system_drive_list:
@@ -520,6 +523,8 @@ def main(scan_only, destruction, no_mount, install_call , dir_fe_only):
if prompt_to_add(i) :
print "\n Disk will be added to the storage pool!"
process_list.append(i)
+ else:
+ no_process_list.append(i)
else:
process_list.append(i)
print " End of scan"
@@ -533,12 +538,19 @@ def main(scan_only, destruction, no_mount, install_call , dir_fe_only):
f.close()
sys.exit(0)
+ for i in no_process_list:
+ system_drive_list.append(i)
+
if len(process_list) > 0:
DB = MythDB()
host=gethostname()
+ for y in process_list:
+ system_drive_list.remove(y)
+ write_known_drive_list(system_drive_list)
else:
print "\nDid not find any new storage to add.\n"
+ write_known_drive_list(system_drive_list)
#BE = MythBE(db=DB)
@@ -566,6 +578,8 @@ def main(scan_only, destruction, no_mount, install_call , dir_fe_only):
i.mkdirs(FS_LIST_FE)
i.set_disk_num(disk_num)
i.write_config()
+ system_drive_list.append(i)
+ write_known_drive_list(system_drive_list)
i.symlink_disk()
#always create the FE groups(video)..do not need to create Be
@@ -574,10 +588,9 @@ def main(scan_only, destruction, no_mount, install_call , dir_fe_only):
i.add_sg(DB,host,SG_MAP_FE)
-
-
print "-----"
-
+ cmd = "systemconfig.py -m fileshare"
+ runcmd(cmd)
#i.add_sg(DB,host,SG_MAP)
def myth_main(no_mount,install_call,dir_fe_only):
@@ -640,6 +653,8 @@ def myth_main(no_mount,install_call,dir_fe_only):
i.add_sg(DB,host,SG_MAP_FE,'99',install_call)
i.symlink()
+ cmd = "systemconfig.py -m fileshare"
+ runcmd(cmd)
class reconstruct_path:
def __init__(self,conf_file):