[Rear-users] SF.net SVN: rear:[649] trunk/usr/share/rear/verify/USB

dag- at users.sourceforge.net dag- at users.sourceforge.net
Thu Jun 30 11:39:45 CEST 2011


Revision: 649
          http://rear.svn.sourceforge.net/rear/?rev=649&view=rev
Author:   dag-
Date:     2011-06-30 09:39:44 +0000 (Thu, 30 Jun 2011)

Log Message:
-----------
Only select possible backups to restore when using NETFS
(eg. not when using REQUESTRESTORE)

Added Paths:
-----------
    trunk/usr/share/rear/verify/USB/NETFS/
    trunk/usr/share/rear/verify/USB/NETFS/default/
    trunk/usr/share/rear/verify/USB/NETFS/default/54_choose_backup_archive.sh

Removed Paths:
-------------
    trunk/usr/share/rear/verify/USB/default/54_choose_backup_archive.sh

Copied: trunk/usr/share/rear/verify/USB/NETFS/default/54_choose_backup_archive.sh (from rev 644, trunk/usr/share/rear/verify/USB/default/54_choose_backup_archive.sh)
===================================================================
--- trunk/usr/share/rear/verify/USB/NETFS/default/54_choose_backup_archive.sh	                        (rev 0)
+++ trunk/usr/share/rear/verify/USB/NETFS/default/54_choose_backup_archive.sh	2011-06-30 09:39:44 UTC (rev 649)
@@ -0,0 +1,29 @@
+# Detect all backups on the USB device
+backups=()
+backup_times=()
+for rear_run in $BUILD_DIR/netfs/rear/$(uname -n)/* ;do
+    Debug "Rear run $rear_run detected."
+    backup_name=$rear_run/${BACKUP_PROG_ARCHIVE}${BACKUP_PROG_SUFFIX}${BACKUP_PROG_COMPRESS_SUFFIX}
+    if [ -e $backup_name ] ; then
+        Debug "Rear backup $backup_name detected."
+        backups=( "${backups[@]}" "$backup_name")
+        backup_times=( "${backup_times[@]}" "${rear_run##*/}")
+    fi
+done
+
+# The user has to choose the backup
+LogPrint "Select a backup archive."
+select choice in "${backup_times[@]}" "Abort"; do
+    [ "$choice" != "Abort" ]
+    StopIfError "User chose to abort recovery."
+    n=( $REPLY ) # trim blanks from reply
+    let n-- # because bash arrays count from 0
+    if [ "$n" -lt 0 ] || [ "$n" -ge "${#backup_times[@]}" ] ; then
+        LogPrint "Invalid choice $REPLY, please try again or abort."
+        continue
+    fi
+    LogPrint "Backup archive ${backups[$n]} chosen."
+    backuparchive=${backups[$n]}
+    break
+done 2>&1
+

Deleted: trunk/usr/share/rear/verify/USB/default/54_choose_backup_archive.sh
===================================================================
--- trunk/usr/share/rear/verify/USB/default/54_choose_backup_archive.sh	2011-06-30 09:38:45 UTC (rev 648)
+++ trunk/usr/share/rear/verify/USB/default/54_choose_backup_archive.sh	2011-06-30 09:39:44 UTC (rev 649)
@@ -1,29 +0,0 @@
-# Detect all backups on the USB device
-backups=()
-backup_times=()
-for rear_run in $BUILD_DIR/netfs/rear/$(uname -n)/* ;do
-    Debug "Rear run $rear_run detected."
-    backup_name=$rear_run/${BACKUP_PROG_ARCHIVE}${BACKUP_PROG_SUFFIX}${BACKUP_PROG_COMPRESS_SUFFIX}
-    if [ -e $backup_name ] ; then
-        Debug "Rear backup $backup_name detected."
-        backups=( "${backups[@]}" "$backup_name")
-        backup_times=( "${backup_times[@]}" "${rear_run##*/}")
-    fi
-done
-
-# The user has to choose the backup
-LogPrint "Select a backup archive."
-select choice in "${backup_times[@]}" "Abort"; do
-    [ "$choice" != "Abort" ]
-    StopIfError "User chose to abort recovery."
-    n=( $REPLY ) # trim blanks from reply
-    let n-- # because bash arrays count from 0
-    if [ "$n" -lt 0 ] || [ "$n" -ge "${#backup_times[@]}" ] ; then
-        LogPrint "Invalid choice $REPLY, please try again or abort."
-        continue
-    fi
-    LogPrint "Backup archive ${backups[$n]} chosen."
-    backuparchive=${backups[$n]}
-    break
-done 2>&1
-


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