diff options
author | maximilian attems <maks@debian.org> | 2006-01-24 12:27:42 +0100 |
---|---|---|
committer | maximilian attems <maks@debian.org> | 2006-01-24 12:27:42 +0100 |
commit | 5ac8871bdc5093eb2b570937dcc37167b904cb8e (patch) | |
tree | 283b2d7b6e8497f960982a2fe0225251900d9773 /hook-functions | |
parent | f2688cc18d0e0420ad4ad069ed6bb32b2869badb (diff) | |
download | initramfs-tools-5ac8871bdc5093eb2b570937dcc37167b904cb8e.tar.gz initramfs-tools-5ac8871bdc5093eb2b570937dcc37167b904cb8e.zip |
sync 0.40ubuntu16
Diffstat (limited to 'hook-functions')
-rw-r--r-- | hook-functions | 10 |
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 ' |