diff options
author | Mageia SVN-Git Migration <svn-git-migration@mageia.org> | 2011-02-06 22:37:08 +0000 |
---|---|---|
committer | Mageia SVN-Git Migration <svn-git-migration@mageia.org> | 2011-02-06 22:37:08 +0000 |
commit | fd8bbba2f02b8bccd69e67c326fd320c0827941d (patch) | |
tree | ade69986b2f99e113c95009736399966d4a3d511 /rescue/Flash/scripts/restore_systemloop | |
parent | 368f416649ed34557702a946ec8c0cec2fd45294 (diff) | |
download | drakx-fd8bbba2f02b8bccd69e67c326fd320c0827941d.tar drakx-fd8bbba2f02b8bccd69e67c326fd320c0827941d.tar.gz drakx-fd8bbba2f02b8bccd69e67c326fd320c0827941d.tar.bz2 drakx-fd8bbba2f02b8bccd69e67c326fd320c0827941d.tar.xz drakx-fd8bbba2f02b8bccd69e67c326fd320c0827941d.zip |
Synthesized commit during git-svn import combining previous Mandriva history with Mageia.
This commit consitsts of the following subversion commits:
------------------------------------------------------------------------
r431 | dmorgan | 2011-02-06 01:58:02 +0000 (Sun, 06 Feb 2011) | 1 line
Add drakx structure on the SVN
------------------------------------------------------------------------
r432 | dmorgan | 2011-02-06 01:59:38 +0000 (Sun, 06 Feb 2011) | 1 line
Import cleaned advertising
------------------------------------------------------------------------
r446 | dmorgan | 2011-02-06 22:37:08 +0000 (Sun, 06 Feb 2011) | 1 line
Import Clean perl-install
------------------------------------------------------------------------
r448 | dmorgan | 2011-02-06 23:02:36 +0000 (Sun, 06 Feb 2011) | 1 line
Add cleaned files
------------------------------------------------------------------------
r449 | dmorgan | 2011-02-06 23:03:52 +0000 (Sun, 06 Feb 2011) | 1 line
Import cleaned kernel
------------------------------------------------------------------------
r450 | dmorgan | 2011-02-06 23:23:30 +0000 (Sun, 06 Feb 2011) | 1 line
Import cleaned tools
------------------------------------------------------------------------
r451 | dmorgan | 2011-02-07 00:01:56 +0000 (Mon, 07 Feb 2011) | 1 line
Import stage1
------------------------------------------------------------------------
r473 | dmorgan | 2011-02-07 11:20:50 +0000 (Mon, 07 Feb 2011) | 1 line
Import images
------------------------------------------------------------------------
r497 | ennael | 2011-02-09 21:02:06 +0000 (Wed, 09 Feb 2011) | 2 lines
readd missing file
------------------------------------------------------------------------
r502 | pterjan | 2011-02-09 23:30:32 +0000 (Wed, 09 Feb 2011) | 1 line
Import rescue
------------------------------------------------------------------------
r603 | ennael | 2011-02-24 13:32:54 +0000 (Thu, 24 Feb 2011) | 2 lines
import cleaned rescue for Mageia
------------------------------------------------------------------------
r2061 | tv | 2011-10-20 20:32:19 +0100 (Thu, 20 Oct 2011) | 1 line
import (cleaned) doc
------------------------------------------------------------------------
Diffstat (limited to 'rescue/Flash/scripts/restore_systemloop')
-rwxr-xr-x | rescue/Flash/scripts/restore_systemloop | 167 |
1 files changed, 0 insertions, 167 deletions
diff --git a/rescue/Flash/scripts/restore_systemloop b/rescue/Flash/scripts/restore_systemloop deleted file mode 100755 index 39c56e030..000000000 --- a/rescue/Flash/scripts/restore_systemloop +++ /dev/null @@ -1,167 +0,0 @@ -#!/bin/bash - -# import functions library -source rescue_common - -tmpdir="/tmp/flash-rescue-root" -rootdir="$tmpdir/pen" - -function prepare() { - - mkdir -p $rootdir - - if ! mount_usbroot $rootdir; then - return 1 - fi - - if [ x"$version" = x"1.0" ]; then - mkdir -p $tmpdir/shared - if ! mount_sharedroot $tmpdir/shared; then - return 1 - fi - fi - - return 0 -} - -function doit() { - - if [ ! -d $dir ]; then - echo - echo "Can't find a backup directory in the Share partition" - echo - return 0 - fi - - cd $dir - i=1 - for file in $(ls -c1 backup-*.bz2 2> /dev/null | sort -r | head -10); do - files[$i]="$file" - let i++ - done - cd - > /dev/null - - if [ $i -eq 1 ]; then - echo - echo 'No backup files found!' - echo - return 0 - fi - - while [ true ]; do - - clear - echo - echo "The following backup files were found:" - echo - - i=1 - while [ -n "${files[$i]}" ]; do - echo "[$i] ${files[$i]}" - let i++ - done - let i-- - echo - echo '[0] Cancel / Return to main menu' - - echo - echo 'Select from the list above, the file that you want to restore.' - echo 'The most recent files come first in the list.' - echo - echo -n "What backup file do you want to restore? [1] " - read option - - if [ -z "$option" ]; then - option=1 - fi - if [ x"$option" = x"0" ]; then - return 0 - fi - - if [ ! -f $dir/${files[$option]} ]; then - echo - echo "Error reading backup file ${files[$option]}!" - echo - echo -n 'Do you want to restore another backup file? [N/y] ' - read confirm - - if [ x"$confirm" = x"y" -o x"$confirm" = x"Y" ]; then - continue - else - return 0 - fi - else - - echo - echo -n 'Restoring backup file. This can take some time: ' - - bunzip2 -c $dir/${files[$option]} > $loop \ - 2> /tmp/rescue-backup.err & - - sleep 2 - - while ps | grep -q bunzip2; do - progress - done - - sync - echo - echo - - errsize=$(ls -la /tmp/rescue-backup.err | cut -d' ' -f5) - if [ $errsize -ne 0 ]; then - echo 'Error restoring user files!' - echo - return 1 - else - echo 'Backup file restored!' - echo - break - fi - fi - done - - return 0 -} - -function cleanup() { - - if [ x"$version" = x"1.0" ]; then - umount $tmpdir/shared > /dev/null 2>&1 - rmdir $tmpdir/shared 2> /dev/null - fi - - umount $rootdir > /dev/null 2>&1 - rmdir $rootdir $tmpdir 2> /dev/null - - return 0 -} - -clear -trap cleanup SIGINT - -version="" -if ! insert_pendrive; then - exit 1 -fi - -if [ x"$version" = x"1.0" ]; then - dir="$tmpdir/shared/backup" - loop="$rootdir/loopbacks/system.loop" -else - dir="$rootdir/backup" - loop="$rootdir/.loopbacks/system.loop" -fi - -if ! prepare; then - cleanup - exit 1 -fi - -if ! doit; then - cleanup - exit 1 -fi - -cleanup -exit 0 |