diff options
Diffstat (limited to 'abs/core/LinHES-config/mv_install.py')
-rwxr-xr-x | abs/core/LinHES-config/mv_install.py | 38 |
1 files changed, 32 insertions, 6 deletions
diff --git a/abs/core/LinHES-config/mv_install.py b/abs/core/LinHES-config/mv_install.py index c7a002d3..1d5f6fe 100755 --- a/abs/core/LinHES-config/mv_install.py +++ b/abs/core/LinHES-config/mv_install.py @@ -66,6 +66,14 @@ def kill_dhcp_chroot(): os.chdir(stddir) except: pass + #force kill + try: + cmd = "lsof -t /new_boot|xargs kill -9" + runcmd(cmd) + except: + print " !!!Problem killing all /new_boot pids" + + def statgrab(disk): cmd = "statgrab -M disk. |grep %s.write_bytes" % hostoptions["rootdisk"] @@ -590,14 +598,30 @@ def copy_it(install_type): if ( install_type == "upgrade"): logging.info("Upgrading system") - create_squashlist() - cmd = " unsquashfs -e %s -f -d %s /.livesys/medium/larch/system.sqf" %(data_config.SQUASHFILE, data_config.MOUNTPOINT) - #runcmd(cmd) - rc = runcmd(cmd)[0] - if rc != 0 : - error_out("Running unsquashfs") + cmdlist = ['rsync -avrp /image_mount/root/* /new_boot', + 'rsync -arvp /image_mount/lib/* /new_boot/lib/', + 'rsync -arvp /image_mount/usr /new_boot', + 'rsync -arvp /image_mount/var /new_boot'] + + #'rsync -arvp /image_mount/lib /new_boot', + + for cmd in cmdlist: + #runcmd(cmd) + rc = runcmd(cmd)[0] + if rc != 0 : + error_out("Running %s" %cmd) + + #create_squashlist() + #cmd = " unsquashfs -e %s -f -d %s /.livesys/medium/larch/system.sqf" %(data_config.SQUASHFILE, data_config.MOUNTPOINT) + + #rc = runcmd(cmd)[0] + #if rc != 0 : + # error_out("Running unsquashfs") #logging.debug(cmd) #cmdout=commands.getoutput(cmd) + + + # Create the missing dir i = ("sys", "proc", "dev", "tmp", "mnt", "media", "media/cdrom", "media/dvd", "var/log/mythtv", "var/lock", "var/tmp", "usr/lib/locale") mountpoint = data_config.MOUNTPOINT @@ -949,6 +973,8 @@ def fix_permissions(): runcmd(cmd) cmd = " chown -R mythtv:mythtv %s" %(data_config.MOUNTPOINT+"/var/log/mythtv") runcmd(cmd) + cmd = " chmod +s %s" %(data_config.MOUNTPOINT+"/usr/bin/ping") + runcmd(cmd) def apply_new_auth(): logging.info("_____Applying Password updates_______") |