summaryrefslogtreecommitdiffstats
path: root/rescue
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2009-02-11 15:41:44 +0000
committerOlivier Blin <oblin@mandriva.com>2009-02-11 15:41:44 +0000
commitb0481b1e1275b2a4d930791ec58b2cf56b2199e0 (patch)
tree074fc677c27ccd8ce9306956e803fb0d91cdb94f /rescue
parent927d3b6f5911a1f439f84c6e6ba7cd2544a6882e (diff)
downloaddrakx-b0481b1e1275b2a4d930791ec58b2cf56b2199e0.tar
drakx-b0481b1e1275b2a4d930791ec58b2cf56b2199e0.tar.gz
drakx-b0481b1e1275b2a4d930791ec58b2cf56b2199e0.tar.bz2
drakx-b0481b1e1275b2a4d930791ec58b2cf56b2199e0.tar.xz
drakx-b0481b1e1275b2a4d930791ec58b2cf56b2199e0.zip
indent less
Diffstat (limited to 'rescue')
-rwxr-xr-xrescue/restore-image.sh60
1 files changed, 30 insertions, 30 deletions
diff --git a/rescue/restore-image.sh b/rescue/restore-image.sh
index e91187515..8a216ac8a 100755
--- a/rescue/restore-image.sh
+++ b/rescue/restore-image.sh
@@ -93,41 +93,41 @@ do you want to continue?"
function detect_root()
{
- inst_source_dev=$(sed '\|'$restore_media'|!d;s/[0-9] .*$//;s/^.*\///' /proc/mounts)
- devices=$(grep "^ .*[^0-9]$" < /proc/partitions | grep -v ${inst_source_dev} | awk '$3 > '$MIN_DISKSIZE' { print $4,$3 }')
+ inst_source_dev=$(sed '\|'$restore_media'|!d;s/[0-9] .*$//;s/^.*\///' /proc/mounts)
+ devices=$(grep "^ .*[^0-9]$" < /proc/partitions | grep -v ${inst_source_dev} | awk '$3 > '$MIN_DISKSIZE' { print $4,$3 }')
- if [ -z "${devices}" ]; then
- exit 1
- fi
+ if [ -z "${devices}" ]; then
+ exit 1
+ fi
- devs_found=$(($(echo $devices | wc -w)/2))
+ devs_found=$(($(echo $devices | wc -w)/2))
- root=
- win32_part_dev=
- # win32 detection won't handle complex layouts
- if [ "${devs_found}" = 1 ]; then
- root=$(detect_win32 ${inst_source_dev})
- fi
+ root=
+ win32_part_dev=
+ # win32 detection won't handle complex layouts
+ if [ "${devs_found}" = 1 ]; then
+ root=$(detect_win32 ${inst_source_dev})
+ fi
- if [ -z "${root}" ]; then
- if [ "$devs_found" -gt "1" ]; then
- if [ -n "${inst_source_dev}" ]; then
- opcao=$(dialog --backtitle "$BACKTITLE" --title "$TITLE" --stdout --menu 'Choose one of the detected devices to restore to (check the blocks size column first):' 8 50 0 $devices )
- if [ "$?" != "0" ]; then
- _yesno "\nInterrupt installation?\n "
- if [ "$?" = "0" ]; then
- _shutdown
- fi
- else
- root=${opcao}
- fi
- fi
- else
- root=$(echo ${devices} | cut -d ' ' -f 1)
- fi
+ if [ -z "${root}" ]; then
+ if [ "$devs_found" -gt "1" ]; then
+ if [ -n "${inst_source_dev}" ]; then
+ opcao=$(dialog --backtitle "$BACKTITLE" --title "$TITLE" --stdout --menu 'Choose one of the detected devices to restore to (check the blocks size column first):' 8 50 0 $devices )
+ if [ "$?" != "0" ]; then
+ _yesno "\nInterrupt installation?\n "
+ if [ "$?" = "0" ]; then
+ _shutdown
+ fi
+ else
+ root=${opcao}
+ fi
+ fi
+ else
+ root=$(echo ${devices} | cut -d ' ' -f 1)
fi
-
- echo "${root}"
+ fi
+
+ echo "${root}"
}
function detect_win32()