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

jhoekx at users.sourceforge.net jhoekx at users.sourceforge.net
Fri Jul 8 16:58:12 CEST 2011


Revision: 675
          http://rear.svn.sourceforge.net/rear/?rev=675&view=rev
Author:   jhoekx
Date:     2011-07-08 14:58:11 +0000 (Fri, 08 Jul 2011)

Log Message:
-----------
layout: add disk space usage during rescue image creation to image and menus.

Modified Paths:
--------------
    trunk/usr/share/rear/layout/prepare/default/50_confirm_layout.sh
    trunk/usr/share/rear/layout/recreate/default/10_ask_confirmation.sh
    trunk/usr/share/rear/layout/recreate/default/20_run_script.sh

Added Paths:
-----------
    trunk/usr/share/rear/layout/save/GNU/Linux/51_current_disk_usage.sh

Modified: trunk/usr/share/rear/layout/prepare/default/50_confirm_layout.sh
===================================================================
--- trunk/usr/share/rear/layout/prepare/default/50_confirm_layout.sh	2011-07-08 14:31:57 UTC (rev 674)
+++ trunk/usr/share/rear/layout/prepare/default/50_confirm_layout.sh	2011-07-08 14:58:11 UTC (rev 675)
@@ -10,6 +10,7 @@
 choices=(
     "View disk layout (disklayout.conf)"
     "Edit disk layout (disklayout.conf)"
+    "View original disk space usage"
     "Go to Rear shell"
     "Continue recovery"
     "Abort Rear"
@@ -19,12 +20,13 @@
     case "$REPLY" in
         (1) less $LAYOUT_FILE;;
         (2) vi $LAYOUT_FILE;;
-        (3) rear_shell "" "cd $VAR_DIR/layout/
+        (3) less $VAR_DIR/layout/config/df.txt;;
+        (4) rear_shell "" "cd $VAR_DIR/layout/
 vi $LAYOUT_FILE
 less $LAYOUT_FILE
 ";;
-        (4) break;;
         (5) break;;
+        (6) break;;
     esac
 
     # Reprint menu options when returning from less, shell or vi

Modified: trunk/usr/share/rear/layout/recreate/default/10_ask_confirmation.sh
===================================================================
--- trunk/usr/share/rear/layout/recreate/default/10_ask_confirmation.sh	2011-07-08 14:31:57 UTC (rev 674)
+++ trunk/usr/share/rear/layout/recreate/default/10_ask_confirmation.sh	2011-07-08 14:58:11 UTC (rev 675)
@@ -10,6 +10,7 @@
 choices=(
     "View restore script (diskrestore.sh)"
     "Edit restore script (diskrestore.sh)"
+    "View original disk space usage"
     "Go to Rear shell"
     "Continue recovery"
     "Abort Rear"
@@ -19,12 +20,13 @@
     case "$REPLY" in
         (1) less $LAYOUT_CODE;;
         (2) vi $LAYOUT_CODE;;
-        (3) rear_shell "" "cd $VAR_DIR/layout/
+        (3) less $VAR_DIR/layout/config/df.txt;;
+        (4) rear_shell "" "cd $VAR_DIR/layout/
 vi $LAYOUT_CODE
 less $LAYOUT_CODE
 ";;
-        (4) break;;
         (5) break;;
+        (6) break;;
     esac
 
     # Reprint menu options when returning from less, shell or vi

Modified: trunk/usr/share/rear/layout/recreate/default/20_run_script.sh
===================================================================
--- trunk/usr/share/rear/layout/recreate/default/20_run_script.sh	2011-07-08 14:31:57 UTC (rev 674)
+++ trunk/usr/share/rear/layout/recreate/default/20_run_script.sh	2011-07-08 14:58:11 UTC (rev 675)
@@ -13,6 +13,7 @@
         # FIXME: Implement layout/prepare as part of a function ?
         choices=(
             "View Rear log"
+            "View original disk space usage"
             "Go to Rear shell"
 #            "Edit disk layout (disklayout.conf)"
             "Edit restore script (diskrestore.sh)"
@@ -25,16 +26,17 @@
 #            timestamp=$(stat --format="%Y" $LAYOUT_FILE)
             case "$REPLY" in
                 (1) less $LOGFILE;;
-                (2) rear_shell;;
+                (2) less $VAR_DIR/layout/config/df.txt;;
+                (3) rear_shell;;
 #                (3) vi $LAYOUT_FILE;;
-                (3) vi $LAYOUT_CODE;;
-                (4) if (( $timestamp < $(stat --format="%Y" $LAYOUT_CODE) )); then
+                (4) vi $LAYOUT_CODE;;
+                (5) if (( $timestamp < $(stat --format="%Y" $LAYOUT_CODE) )); then
                         break
                     else
                         Print "Script $LAYOUT_CODE has not been changed, restarting has no impact."
                     fi
                     ;;
-                (5) break;;
+                (6) break;;
             esac
 
             # If disklayout.conf has changed, generate new diskrestore.sh

Added: trunk/usr/share/rear/layout/save/GNU/Linux/51_current_disk_usage.sh
===================================================================
--- trunk/usr/share/rear/layout/save/GNU/Linux/51_current_disk_usage.sh	                        (rev 0)
+++ trunk/usr/share/rear/layout/save/GNU/Linux/51_current_disk_usage.sh	2011-07-08 14:58:11 UTC (rev 675)
@@ -0,0 +1,2 @@
+# Save the current disk usage in the rescue image
+df -h > $VAR_DIR/layout/config/df.txt
\ No newline at end of file


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