1diff -rc grub-0.97-orig/util/grub-install.in grub-0.97/util/grub-install.in
2*** grub-0.97-orig/util/grub-install.in 2008-09-18 11:32:13.000000000 +0200
3--- grub-0.97/util/grub-install.in 2008-09-18 11:36:40.000000000 +0200
4***************
5*** 194,217 ****
6 # Usage: resolve_symlink file
7 # Find the real file/device that file points at
8 resolve_symlink () {
9! tmp_fname=$1
10! # Resolve symlinks
11! while test -L $tmp_fname; do
12! tmp_new_fname=`ls -al $tmp_fname | sed -n 's%.*-> \(.*\)%\1%p'`
13! if test -z "$tmp_new_fname"; then
14! echo "Unrecognized ls output" 2>&1
15! exit 1
16! fi
17!
18! # Convert relative symlinks
19! case $tmp_new_fname in
20! /*) tmp_fname="$tmp_new_fname"
21! ;;
22! *) tmp_fname="`echo $tmp_fname | sed 's%/[^/]*$%%'`/$tmp_new_fname"
23! ;;
24! esac
25! done
26! echo "$tmp_fname"
27 }
28
29 # Usage: find_device file
30--- 194,200 ----
31 # Usage: resolve_symlink file
32 # Find the real file/device that file points at
33 resolve_symlink () {
34! readlink -f $1
35 }
36
37 # Usage: find_device file