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

svn at pcbsd.org svn at pcbsd.org
Thu Nov 12 10:09:19 PST 2009


Author: kris
Date: 2009-11-12 10:09:19 -0800 (Thu, 12 Nov 2009)
New Revision: 4976

Added:
   pcbsd/trunk/pc-sysinstall/examples/pcinstall.cfg.netinstall
Modified:
   pcbsd/trunk/pc-sysinstall/backend/functions-extractimage.sh
   pcbsd/trunk/pc-sysinstall/pcinstall.cfg
Log:

Started adding support to pc-sysinstall for rsync restores



Modified: pcbsd/trunk/pc-sysinstall/backend/functions-extractimage.sh
===================================================================
--- pcbsd/trunk/pc-sysinstall/backend/functions-extractimage.sh	2009-11-12 17:42:05 UTC (rev 4975)
+++ pcbsd/trunk/pc-sysinstall/backend/functions-extractimage.sh	2009-11-12 18:09:19 UTC (rev 4976)
@@ -93,7 +93,46 @@
 
 };
 
+# Function which does the rsync download from the server specifed in cfg
+start_rsync_copy()
+{
+  # Load our rsync config values
+  get_value_from_cfg rsyncPath
+  if [ -z "${VAL}" ]; then
+    exit_err "ERROR: rsyncPath is unset! Please check your config and try again."
+  fi
+  RSYNCPATH="${VAL}" ; export RSYNCPATH
 
+  get_value_from_cfg rsyncHost
+  if [  -z "${VAL}" ]; then
+    exit_err "ERROR: rsyncHost is unset! Please check your config and try again."
+  fi
+  RSYNCHOST="${VAL}" ; export RSYNCHOST
+
+  get_value_from_cfg rsyncUser
+  if [ -z "${VAL}" ]; then
+    exit_err "ERROR: rsyncUser is unset! Please check your config and try again."
+  fi
+  RSYNCUSER="${VAL}" ; export RSYNCUSER
+
+  get_value_from_cfg rsyncPort
+  if [ -z "${VAL}" ]; then
+    exit_err "ERROR: rsyncPort is unset! Please check your config and try again."
+  fi
+  RSYNCPORT="${VAL}" ; export RSYNCPORT
+
+  rsync -avvzsR \
+  --rsync-path="rsync --fake-super" \
+  -e "ssh -p ${RSYNCPORT}" \
+  ${RSYNCUSER}@${RSYNCHOST}:${RSYNCPATH}/./ ${FSMNT}
+  if [ "$?" != "0" ]
+  then
+    exit_err "ERROR: Failed rsync command!"
+  fi
+
+};
+
+
 # Entrance function, which starts the installation process
 init_extraction()
 {

Modified: pcbsd/trunk/pc-sysinstall/pcinstall.cfg
===================================================================
--- pcbsd/trunk/pc-sysinstall/pcinstall.cfg	2009-11-12 17:42:05 UTC (rev 4975)
+++ pcbsd/trunk/pc-sysinstall/pcinstall.cfg	2009-11-12 18:09:19 UTC (rev 4976)
@@ -38,9 +38,12 @@
 #installType=PCBSD
 installType=FreeBSD
 #installMedium=dvd
-installMedium=ftp
+installMedium=rsync
 
-ftpPath=ftp://192.168.0.2/netinstall
+rsyncPath=life-preserver/back-2009-11-10T18_55_00
+rsyncUser=lifep
+rsyncHost=192.168.0.50
+rsyncPort=22
 
 #packageType=uzip
 packageType=tar



More information about the Commits mailing list