From 858f0c53e9673a41bd5b3f7014b28b2f0e28cdef Mon Sep 17 00:00:00 2001
From: Bob Igo <bob@stormlogic.com>
Date: Wed, 12 Aug 2009 09:18:05 -0400
Subject: mv_install.py now restores asound.state and mplayer.conf

---
 abs/core-testing/LinHES-config/PKGBUILD      |  2 +-
 abs/core-testing/LinHES-config/mv_install.py | 15 +++++++++++++++
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/abs/core-testing/LinHES-config/PKGBUILD b/abs/core-testing/LinHES-config/PKGBUILD
index 3dd79eb..c29165f 100644
--- a/abs/core-testing/LinHES-config/PKGBUILD
+++ b/abs/core-testing/LinHES-config/PKGBUILD
@@ -1,6 +1,6 @@
 pkgname=LinHES-config
 pkgver=2.0
-pkgrel=73
+pkgrel=74
 conflicts=(MythVantage-config MythVantage-config-dev LinHES-config-dev )
 pkgdesc="Install and configure your system"
 depends=(bc libstatgrab  mysql-python expect curl dnsutils parted 
diff --git a/abs/core-testing/LinHES-config/mv_install.py b/abs/core-testing/LinHES-config/mv_install.py
index 0b34650..bace1a5 100755
--- a/abs/core-testing/LinHES-config/mv_install.py
+++ b/abs/core-testing/LinHES-config/mv_install.py
@@ -1190,20 +1190,35 @@ def upgrade(hostoptions):
     time.sleep(3)
     copy_it("upgrade")
     cmd = "rm -rf %s/etc.old" %data_config.MOUNTPOINT
+    cmd = "rm -rf %s/varlibalsa.old" %data_config.MOUNTPOINT
     runcmd(cmd)
 
     cp_and_log("/tmp/etc/", data_config.MOUNTPOINT+"/etc.old/")
+    cp_and_log("/tmp/var/lib/alsa/", data_config.MOUNTPOINT+"/varlibalsa.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')
+
     mdfile = mdadm_find("/tmp")
     cp_and_log("/tmp"+mdfile, data_config.MOUNTPOINT+"/etc")
+
+    # R5.5 -> R6
+    srcfile = "%s/varlibalsa.old/asound.state" %(data_config.MOUNTPOINT)
+    destfile = "%s/etc/asound.state" %(data_config.MOUNTPOINT)
+    cp_and_log(srcfile, destfile)
+    # R6 -> R6
     srcfile = "%s/etc.old/asound.state" %(data_config.MOUNTPOINT)
     destfile = "%s/etc/asound.state" %(data_config.MOUNTPOINT)
     cp_and_log(srcfile, destfile)
+
+    srcfile = "%s/etc.old/mplayer/mplayer.conf" %(data_config.MOUNTPOINT)
+    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")
-- 
cgit v0.12