From 37e4ba7a75f703a4d56a28b5609a3636fcfc4c02 Mon Sep 17 00:00:00 2001 From: wangdi Date: Sun, 18 May 2003 12:15:19 +0000 Subject: [PATCH] removing the link of orignal file --- lustre/kernel_patches/scripts/rpatch | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lustre/kernel_patches/scripts/rpatch b/lustre/kernel_patches/scripts/rpatch index d6d9950..636ff5f 100755 --- a/lustre/kernel_patches/scripts/rpatch +++ b/lustre/kernel_patches/scripts/rpatch @@ -21,7 +21,13 @@ do_remove() { FILES=$(cat $P/pc/$1.pc) for file in $FILES ; do - if [ -f "$file"~"$1" ]; then + base_dir=`pwd` + if [ -L "$file"~"orig" ]; then + if [ `readlink "$file"~"orig"` = "$base_dir/""$file"~"$1" ]; then + rm -rf "$file"~"orig" + fi + fi + if [ -f "$file"~"$1" ]; then mv -f "$file"~"$1" "$file" else rm -f "$file" -- 1.8.3.1