From 269509031d79a1e0b455fa2ad2daeb8477ddc470 Mon Sep 17 00:00:00 2001 From: James Meyer Date: Thu, 20 Sep 2012 16:09:28 -0500 Subject: 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. --- abs/core/LinHES-system/PKGBUILD | 8 ++++---- abs/core/LinHES-system/add_storage.py | 25 ++++++++++++++++++++----- abs/core/LinHES-system/set_windowmanager.sh | 9 ++++++++- 3 files changed, 32 insertions(+), 10 deletions(-) diff --git a/abs/core/LinHES-system/PKGBUILD b/abs/core/LinHES-system/PKGBUILD index d80bd5a..94c982e 100755 --- a/abs/core/LinHES-system/PKGBUILD +++ b/abs/core/LinHES-system/PKGBUILD @@ -1,6 +1,6 @@ pkgname=LinHES-system pkgver=2 -pkgrel=92 +pkgrel=95 arch=('i686' 'x86_64') MVDIR=$startdir/pkg/usr/LH BINDIR=$startdir/pkg/usr/bin @@ -74,7 +74,7 @@ md5sums=('a941af97fe534731a507b1d57c0c2aed' 'dc0be354ce77ba2b89868fc29b942c43' '542e670e78d117657f93141e9689f54d' '41951459ea9d2b0567be521b67e6285a' - 'eeb7bb20905e031142ce0b575aad78c9' + 'ee6b9d277843e7047f46bdd83e1377ec' '4545eb39213d40b5a2bdeda5e066cdc4' '962a3e9eaba2d1466251b7ab0956705d' 'd03aedeeeda0f5e9c1eb437411c88477' @@ -83,7 +83,7 @@ md5sums=('a941af97fe534731a507b1d57c0c2aed' '0e7b910fe26e9096e5531cd38f331292' '859a80ddb4c234506379c605114c1343' '47e093e8cfe4b5b96602358e1f540832' - '5e7c8bc96718174cdd48751e7d7ebf0d' + '9f08fb2e821297841f1849c6221b87cb' 'b8f0414427c5d9afdc32ceb3ae56f82a' '6519d209e151cdc39ae7e1091d189c3e' 'd1cdf28fcb1c88f0e504905771dd6040' @@ -98,7 +98,7 @@ md5sums=('a941af97fe534731a507b1d57c0c2aed' '54ebcc024db2e0ebe8121305d8926767' '45f46d1f9193c8dde18e56369ec29a1e' 'a8edbe7bc37e9932e8749d9f5f89c16f' - '14cea9e87654441b766a97576233ba5a' + 'afd621cd8a8cf5fcff5d00b9f340a9a9' 'eb879fee9603a05d5420d4ce8ed9e450' 'f1870a9522c79e6b248fcbf81dec3280' '84492954db16740f949d795b74383189' 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): diff --git a/abs/core/LinHES-system/set_windowmanager.sh b/abs/core/LinHES-system/set_windowmanager.sh index 535e3d9..75c4cee 100644 --- a/abs/core/LinHES-system/set_windowmanager.sh +++ b/abs/core/LinHES-system/set_windowmanager.sh @@ -51,7 +51,9 @@ function set_wm(){ enhanced) STYLE="enhanced" + HSTYLE="1" stylemsg enhanced + myth_settings_wrapper.sh -c load -t custom 1 HOSTSupplemental ;; *) @@ -63,14 +65,19 @@ function set_wm(){ STYLE="$style" stylemsg "Default" fi - + HSTYLE=0 ;; esac + + echo WM=\"${outline}\" > /etc/X11/WINDOWMANAGER echo "STARTUP_STYLE=$STYLE" >> /etc/X11/WINDOWMANAGER echo ${outline_2} >> /etc/X11/WINDOWMANAGER + myth_settings_wrapper.sh -c load -t custom "${windowmanager}" HostWindowManager + myth_settings_wrapper.sh -c load -t custom "${HSTYLE}" HostEnhancedWMStyle + } -- cgit v0.12