summaryrefslogtreecommitdiff
path: root/hook-functions
diff options
context:
space:
mode:
authormaximilian attems <maks@debian.org>2006-01-24 12:27:42 +0100
committermaximilian attems <maks@debian.org>2006-01-24 12:27:42 +0100
commit5ac8871bdc5093eb2b570937dcc37167b904cb8e (patch)
tree283b2d7b6e8497f960982a2fe0225251900d9773 /hook-functions
parentf2688cc18d0e0420ad4ad069ed6bb32b2869badb (diff)
downloadinitramfs-tools-5ac8871bdc5093eb2b570937dcc37167b904cb8e.tar.gz
initramfs-tools-5ac8871bdc5093eb2b570937dcc37167b904cb8e.zip
sync 0.40ubuntu16
Diffstat (limited to 'hook-functions')
-rw-r--r--hook-functions10
1 files changed, 9 insertions, 1 deletions
diff --git a/hook-functions b/hook-functions
index d3fe0a3..000c701 100644
--- a/hook-functions
+++ b/hook-functions
@@ -54,7 +54,15 @@ manual_add_modules()
# $1 is source
# $2 is relative destination
copy_exec() {
- ln -s ${1} ${DESTDIR}/${2}
+ final_destination=${DESTDIR}/${2}/`basename ${1}`
+ if [ -L "$final_destination" ]; then
+ if ! [ `readlink ${final_destination}` = "${1}" ]; then
+ echo "W:copy_exec: Not copying ${1} to \$DESTDIR${2}/`basename ${1}`, which is already a copy of `readlink ${final_destination}`" >&2
+ return
+ fi
+ else
+ ln -s ${1} ${DESTDIR}/${2}
+ fi
# Copy the dependant libraries
for x in $(ldd ${1} 2>/dev/null | sed -e '