[PC-BSD Commits] r6490 - in pcbsd/trunk/pc-sysinstall: backend examples

svn at pcbsd.org svn at pcbsd.org
Thu Apr 1 12:33:36 PDT 2010


Author: kris
Date: 2010-04-01 12:33:36 -0700 (Thu, 01 Apr 2010)
New Revision: 6490

Modified:
   pcbsd/trunk/pc-sysinstall/backend/functions-upgrade.sh
   pcbsd/trunk/pc-sysinstall/examples/README
Log:

Added option to keep / preserve users desktop profile data during an upgrade



Modified: pcbsd/trunk/pc-sysinstall/backend/functions-upgrade.sh
===================================================================
--- pcbsd/trunk/pc-sysinstall/backend/functions-upgrade.sh	2010-04-01 18:43:11 UTC (rev 6489)
+++ pcbsd/trunk/pc-sysinstall/backend/functions-upgrade.sh	2010-04-01 19:33:36 UTC (rev 6490)
@@ -191,6 +191,31 @@
     chroot ${FSMNT} /.fixUserProfile.sh >/dev/null 2>/dev/null
     rm ${FSMNT}/.fixUserProfile.sh
 
+
+
+    # if the user wants to keep their original .kde4 profile
+    ############################################################################3
+    get_value_from_cfg "upgradeKeepDesktopProfile"
+    if [ "$VAL" = "YES -o "$VAL" = "yes" ] ; then
+      echo '#!/bin/sh
+      cd /home
+for i in `ls`
+do
+  # Import the old config again
+  if [ -d "${i}/.kde4.preUpgrade" ]
+  then
+    # Copy over the skel directories
+    tar cv -f - -C /home/${i}/.kde4.preUpgrade . 2>/dev/null | tar xvf - -C /home/${i}/.kde4 2>/dev/null
+    chown -R ${i}:${i} /home/${i}/.kde4
+  fi
+done
+' >${FSMNT}/.fixUserProfile.sh
+      chmod 755 ${FSMNT}/.fixUserProfile.sh
+      chroot ${FSMNT} /.fixUserProfile.sh >/dev/null 2>/dev/null
+      rm ${FSMNT}/.fixUserProfile.sh
+
+    fi
+
 };
 
 # Function which merges some configuration files with the new defaults

Modified: pcbsd/trunk/pc-sysinstall/examples/README
===================================================================
--- pcbsd/trunk/pc-sysinstall/examples/README	2010-04-01 18:43:11 UTC (rev 6489)
+++ pcbsd/trunk/pc-sysinstall/examples/README	2010-04-01 19:33:36 UTC (rev 6490)
@@ -242,6 +242,18 @@
 
 
 ########################################################################
+# UPGRADE OPTIONS
+########################################################################
+
+Options specific to performing an upgrade
+
+# upgradeKeepDesktopProfile=(yes/no)
+
+This option allows you to specify if you wish to keep your existing users desktop
+profile data. The default is NO, and your existing profile will be moved to 
+.kde4.preUpgrade automatically. 
+
+########################################################################
 # USER OPTIONS
 ########################################################################
 



More information about the Commits mailing list