summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-11-12 10:06:18 +0000
committerOlivier Blin <oblin@mandriva.com>2008-11-12 10:06:18 +0000
commit10fdf6b99e8ecfdfe62da17a8c7ceaa0437d2a71 (patch)
tree60cb1859241090a00be2baa702ba0b04679b8606
parentfa34e5743b3fb0d3e6350a46eb0b660ccf0ddc13 (diff)
downloaddrakx-backup-do-not-use-10fdf6b99e8ecfdfe62da17a8c7ceaa0437d2a71.tar
drakx-backup-do-not-use-10fdf6b99e8ecfdfe62da17a8c7ceaa0437d2a71.tar.gz
drakx-backup-do-not-use-10fdf6b99e8ecfdfe62da17a8c7ceaa0437d2a71.tar.bz2
drakx-backup-do-not-use-10fdf6b99e8ecfdfe62da17a8c7ceaa0437d2a71.tar.xz
drakx-backup-do-not-use-10fdf6b99e8ecfdfe62da17a8c7ceaa0437d2a71.zip
do not hardcode /tmp/media in detect_root
-rwxr-xr-xrescue/restore-image.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/rescue/restore-image.sh b/rescue/restore-image.sh
index a5021bdbd..c60df3756 100755
--- a/rescue/restore-image.sh
+++ b/rescue/restore-image.sh
@@ -11,7 +11,8 @@ fi
export PATH="/sbin:/bin:/usr/sbin:/usr/bin"
-images_dir="/tmp/media/images"
+restore_media="/tmp/media"
+images_dir="$restore_media/images"
images="$images_dir/list"
image=""
@@ -73,7 +74,7 @@ do you want to continue?\n "
function detect_root()
{
- dev=$(sed '/\/tmp\/media/!d;s/[0-9] .*$//;s/^.*\///' /proc/mounts)
+ dev=$(sed '\|'$restore_media'|!d;s/[0-9] .*$//;s/^.*\///' /proc/mounts)
devices=$(grep "^ .*[^0-9]$" < /proc/partitions | grep -v ${dev} | awk '$3 > '$MIN_DISKSIZE' { print $4,$3 }')
devs_found=$(echo $devices | wc -w)