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