diff options
Diffstat (limited to 'abs/core/LinHES-config/mv_install.py')
-rw-r--r-- | abs/core/LinHES-config/mv_install.py | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/abs/core/LinHES-config/mv_install.py b/abs/core/LinHES-config/mv_install.py index 20ec7bf..9556a0e 100644 --- a/abs/core/LinHES-config/mv_install.py +++ b/abs/core/LinHES-config/mv_install.py @@ -891,10 +891,13 @@ def copy_it(install_type): if ( install_type == "upgrade"): logging.info("Upgrading system") - cmdlist = ['rsync -arp --exclude /home --exclude /data/srv/mysql /image_mount/root/* /new_boot', - 'rsync -arp /image_mount/lib/* /new_boot/lib/', - 'rsync -arp /image_mount/usr /new_boot', - 'rsync -arp /image_mount/var /new_boot'] + #cmdlist = ['rsync -arp --exclude /home --exclude /data/srv/mysql /image_mount/root/* /new_boot', + #'rsync -arp /image_mount/lib/* /new_boot/lib/', + #'rsync -arp /image_mount/usr /new_boot', + #'rsync -arp /image_mount/var /new_boot'] + + cmdlist = ['rsync -arp --exclude var-lib-pacman --exclude boot-orig --exclude /home --exclude /data/srv/mysql /image_mount/* /new_boot'] + for cmd in cmdlist: #runcmd(cmd) @@ -920,7 +923,7 @@ def copy_it(install_type): #needed to retain dhcp address between reboots. cp_and_log("/etc/dhcpcd.duid", data_config.MOUNTPOINT+"/etc/dhcpcd.duid") cp_and_log("/var/lib/dhcpcd/*.lease", data_config.MOUNTPOINT+"/var/lib/dhcpcd/") - + # General fixup cmd = "chmod 777 %s/tmp" %(data_config.MOUNTPOINT) runcmd(cmd) @@ -1824,9 +1827,12 @@ def find_upgrade(): cp_and_log(data_config.MOUNTPOINT+"/var/lib/alsa/", "/tmp/alsa") cp_and_log(data_config.MOUNTPOINT+"/var/lib/oss/", "/tmp/oss") cp_and_log("/tmp/etc/mdadm.conf", "/etc/mdadm.conf") + cp_and_log("/tmp/etc/dhcpcd.duid", "/etc/dhcpcd.duid") + else: logging.info("Could not find systemconfig file %s", srcfile) cp_and_log(data_config.MOUNTPOINT+"/etc/", "/tmp/etc/") + cp_and_log("/tmp/etc/dhcpcd.duid", "/etc/dhcpcd.duid") cp_and_log(data_config.MOUNTPOINT+"/var/lib/alsa/", "/tmp/alsa") cp_and_log("/tmp/etc/mdadm.conf", "/etc") timezone_to_db("/tmp/etc/timezone") @@ -1989,6 +1995,8 @@ def upgrade(hostoptions): destfile = "%s/etc/mplayer/mplayer.conf" %(data_config.MOUNTPOINT) cp_and_log(srcfile, destfile) + + if not os.path.exists("/tmp/etc/KnoppMyth-version"): logging.debug(" standard upgrade, restoring auth files") cp_and_log(data_config.MOUNTPOINT+"/etc.old/passwd", data_config.MOUNTPOINT+"/etc/passwd") |