diff options
author | James Meyer <james.meyer@operamail.com> | 2012-09-10 22:47:02 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2012-09-10 22:47:02 (GMT) |
commit | 64127038ec022ae71473719254c71f5efa79bf82 (patch) | |
tree | ac21a7c22c91977349bc66fce46dcff266f2c7b0 /abs/core/LinHES-config/mv_install.py | |
parent | 9390f29e452fe94e48ffbb7674f8ce5cc045cc3a (diff) | |
download | linhes_pkgbuild-64127038ec022ae71473719254c71f5efa79bf82.zip linhes_pkgbuild-64127038ec022ae71473719254c71f5efa79bf82.tar.gz linhes_pkgbuild-64127038ec022ae71473719254c71f5efa79bf82.tar.bz2 |
mv_install: change partition layout to 5 partition instead of the older 3 style
1 = /
2 swap
3 extended { 5,6,7 } home/mysql/myth
Diffstat (limited to 'abs/core/LinHES-config/mv_install.py')
-rwxr-xr-x | abs/core/LinHES-config/mv_install.py | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/abs/core/LinHES-config/mv_install.py b/abs/core/LinHES-config/mv_install.py index a447851..ccfcb8e 100755 --- a/abs/core/LinHES-config/mv_install.py +++ b/abs/core/LinHES-config/mv_install.py @@ -1142,7 +1142,7 @@ def grub_it(): cmd="chroot %s grub-mkconfig -o /boot/grub/grub.cfg" %data_config.MOUNTPOINT runcmd(cmd) -def double_mount(fe_only=False): +def double_mount(fe_only=False, upgrade=False): logging.info(" double bind mount attempt") cmd = "mkdir %s/run/dbus" %data_config.MOUNTPOINT runcmd(cmd) @@ -1150,10 +1150,14 @@ def double_mount(fe_only=False): cmd = " mount --bind /run/dbus %s/run/dbus" %data_config.MOUNTPOINT runcmd(cmd) for i in range(0,5): - if fe_only == True: - cmd = "chroot " + data_config.MOUNTPOINT +" /usr/LH/bin/add_storage.py --double_myth --no_mount --fe_only" + if upgrade == True: + cmd = "chroot " + data_config.MOUNTPOINT +" /usr/LH/bin/add_storage.py --reconstruct --no_mount" else: - cmd = "chroot " + data_config.MOUNTPOINT +" /usr/LH/bin/add_storage.py --double_myth --no_mount" + if fe_only == True: + cmd = "chroot " + data_config.MOUNTPOINT +" /usr/LH/bin/add_storage.py --double_myth --no_mount --fe_only" + else: + cmd = "chroot " + data_config.MOUNTPOINT +" /usr/LH/bin/add_storage.py --double_myth --no_mount" + if runcmd(cmd)[0] == 0: logging.debug(" Add storage worked, breaking out of loop") break @@ -1576,13 +1580,13 @@ def full_install(hostoptions): if rc != 0 : error_out("Running systemconfig") - move_myth_home("backup") + #move_myth_home("backup") mysqldb("start","chroot") double_mount() mysqldb("stop", "chroot") - move_myth_home("restore") #restoring after the bind mound/symlink has occured + #move_myth_home("restore") #restoring after the bind mound/symlink has occured #kill_dhcp_chroot() logging.info("____End Database in CHROOT____") @@ -1793,12 +1797,19 @@ def upgrade(hostoptions): cp_and_log("/tmp/alsa/", data_config.MOUNTPOINT+"/alsa.old/") cp_and_log("/tmp/oss", data_config.MOUNTPOINT+"/var/lib/oss.old") + srcfile = "%s/etc.old/ssh/" %(data_config.MOUNTPOINT) destfile = "%s/etc/ssh/" %(data_config.MOUNTPOINT) cp_and_log2(srcfile, destfile, '*.pub') cp_and_log2(srcfile, destfile, '*.key') cp_and_log2(srcfile, destfile, '*key') + srcfile = "%s/etc.old/storage.d/" %(data_config.MOUNTPOINT) + destfile = "%s/etc/storage.d/" %(data_config.MOUNTPOINT) + cp_and_log2(srcfile, destfile, '*.conf') + cp_and_log2(srcfile, destfile, '*.pkl') + + mdfile = mdadm_find("/tmp") cp_and_log("/tmp"+mdfile, data_config.MOUNTPOINT+"/etc") @@ -1908,6 +1919,8 @@ def upgrade(hostoptions): #run systemconfig in chroot mount_bind_chroot() + #make symlink only..no need to double_mount as fstab should already have that, unless it's a clean upgrade + double_mount(upgrade=True) logging.info("Running systemconfig in chroot time") cmd = "chroot %s %s/bin/systemconfig.sh all,this_is_install" %(data_config.MOUNTPOINT, MVROOT) rc = runcmd(cmd)[0] |