[Rear-users] SF.net SVN: rear:[702] trunk/usr/share/rear

gdha at users.sourceforge.net gdha at users.sourceforge.net
Mon Aug 22 16:20:15 CEST 2011


Revision: 702
          http://rear.svn.sourceforge.net/rear/?rev=702&view=rev
Author:   gdha
Date:     2011-08-22 14:20:15 +0000 (Mon, 22 Aug 2011)

Log Message:
-----------
improve rsync scheme in url_scheme and transfer the image using the OUTPUT_URL

Modified Paths:
--------------
    trunk/usr/share/rear/lib/global-functions.sh
    trunk/usr/share/rear/output/ISO/Linux-i386/90_transfer_image.sh

Modified: trunk/usr/share/rear/lib/global-functions.sh
===================================================================
--- trunk/usr/share/rear/lib/global-functions.sh	2011-08-19 14:08:01 UTC (rev 701)
+++ trunk/usr/share/rear/lib/global-functions.sh	2011-08-22 14:20:15 UTC (rev 702)
@@ -31,7 +31,9 @@
 
 url_scheme() {
     local url=$1
-    echo ${url%%://*}
+    local scheme=${url%%://*}
+    # rsync scheme does not have to start with rsync:// it can also be scp style
+    echo $scheme | grep -q ":" && echo rsync || echo $scheme
 }
 
 url_host() {
@@ -136,4 +138,4 @@
 
     Log "Unmounting '$mountpoint' failed."
     return 1
-}
\ No newline at end of file
+}

Modified: trunk/usr/share/rear/output/ISO/Linux-i386/90_transfer_image.sh
===================================================================
--- trunk/usr/share/rear/output/ISO/Linux-i386/90_transfer_image.sh	2011-08-19 14:08:01 UTC (rev 701)
+++ trunk/usr/share/rear/output/ISO/Linux-i386/90_transfer_image.sh	2011-08-22 14:20:15 UTC (rev 702)
@@ -30,8 +30,8 @@
         ;;
     (rsync)
         LogPrint "Transferring ISO image to $OUTPUT_URL"
-        rsync -a $v "$ISO_DIR/$ISO_PREFIX.iso" "$server:$path"
-        StopIfError "Problem transferring ISO image to $server:$path"
+        rsync -a $v "$ISO_DIR/$ISO_PREFIX.iso" "$OUTPUT_URL"
+        StopIfError "Problem transferring ISO image to $OUTPUT_URL"
         ;;
     (*) BugError "Support for $scheme is not implemented yet.";;
 esac


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the rear-users mailing list